[Pdns-users] Problem with compiling under Solaris 8

Whizzer powerdns at kuis.nl
Sat Apr 5 11:07:37 UTC 2003


Thanks Bert,

But it still doesn't work... Looking at your patch I have one question,
shouldn't it be

+if SOLARIS || solaris
+  makecontext (uc, (void (*)(...))threadWrapper, 4, this, start, d_maxtid,
val);
+else
   makecontext (uc, (void (*)(void))threadWrapper, 4, this, start, d_maxtid,
val);
+endif

instead of

+#if SOLARIS || solaris
+  makecontext (uc, (void (*)(...))threadWrapper, 4, this, start, d_maxtid,
val);
+#else
   makecontext (uc, (void (*)(void))threadWrapper, 4, this, start, d_maxtid,
val);
+#endif

notice the #'s... Again, I'm no programming dude... you can ask me whatever
you want about networking, but not about programming...


This one:

  uc->uc_link = &d_kernel; // come back to kernel after dying
  uc->uc_stack.ss_sp = new char[d_stacksize];

  uc->uc_stack.ss_size = d_stacksize;
  if _solaris_ || solaris
    makecontext (uc, (void (*)(...))threadWrapper, 4, this, start, d_maxtid,
val);
  else
  makecontext (uc, (void (*)(void))threadWrapper, 4, this, start, d_maxtid,
val);
  endif
  d_threads[d_maxtid]=uc;

  uc->uc_link = &d_kernel; // come back to kernel after dying
  uc->uc_stack.ss_sp = new char[d_stacksize];

gives me:

make[3]: Entering directory `/project/pdns-2.9.7/pdns'
source='pdns_recursor.cc' object='pdns_recursor.o' libtool=no \
depfile='.deps/pdns_recursor.Po' tmpdepfile='.deps/pdns_recursor.TPo' \
depmode=gcc3 /bin/ksh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I..  -Ibackends/bind   -DSYSCONFDIR=\"/usr/loca
l/etc\" -DLIBDIR=\"/usr/local/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/
bind  -D_REENTRANT  -Wall -O2 -c -o pdns_recursor.o `test -f
pdns_recursor.cc || echo './'`pdns_recursor.cc
In file included from mtasker.hh:86,
                 from pdns_recursor.cc:32:
mtasker.cc: In member function `void MTasker<EventKey,
   EventVal>::makeThread(void (*)(void*), void*)':
mtasker.cc:227: parse error before `||' token
make[3]: *** [pdns_recursor.o] Error 1


This one:
  uc->uc_stack.ss_size = d_stacksize;
 # if _solaris_ || solaris
    makecontext (uc, (void (*)(...))threadWrapper, 4, this, start, d_maxtid,
val);
  #else
  makecontext (uc, (void (*)(void))threadWrapper, 4, this, start, d_maxtid,
val);
  #endif
  d_threads[d_maxtid]=uc;

gives me this error:

make[3]: Entering directory `/project/pdns-2.9.7/pdns'
source='pdns_recursor.cc' object='pdns_recursor.o' libtool=no \
depfile='.deps/pdns_recursor.Po' tmpdepfile='.deps/pdns_recursor.TPo' \
depmode=gcc3 /bin/ksh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I..  -Ibackends/bind   -DSYSCONFDIR=\"/usr/loca
l/etc\" -DLIBDIR=\"/usr/local/lib\" -DLOCALSTATEDIR=\"/var/run\" -Ibackends/
bind  -D_REENTRANT  -Wall -O2 -c -o pdns_recursor.o `test -f
pdns_recursor.cc || echo './'`pdns_recursor.cc
mtasker.cc: In member function `void MTasker<EventKey,
   EventVal>::makeThread(void (*)(void*), void*) [with EventKey = PacketID,
   EventVal = std::string]':
pdns_recursor.cc:378:   instantiated from here
mtasker.cc:230: invalid conversion from `void (*)()' to `void (*)(...)'
make[3]: *** [pdns_recursor.o] Error 1


O, I tried SOLARIS, _SOLARIS_ and _solaris_, but they keep giving me this
errors...

I hope you have the info you need... If not, just say so, looking at the
timestamp of the patch I guess this is a new problem....

Regards,

Whizzer

----- Original Message -----
From: "bert hubert" <ahu at ds9a.nl>
To: "Whizzer" <powerdns at kuis.nl>
Cc: <pdns-users at mailman.powerdns.com>
Sent: Saturday, April 05, 2003 12:47 PM
Subject: Re: [Pdns-users] Problem with compiling under Solaris 8


> On Sat, Apr 05, 2003 at 12:29:01PM +0200, Whizzer wrote:
>
> > pdns_recursor.cc || echo './'`pdns_recursor.cc
> > mtasker.cc: In member function `void MTasker<EventKey,
> >    EventVal>::makeThread(void (*)(void*), void*) [with EventKey =
PacketID,
> >    EventVal = std::string]':
> > pdns_recursor.cc:378:   instantiated from here
> > mtasker.cc:227: invalid conversion from `void (*)()' to `void (*)(...)'
>
> Can you try this patch, you may need to tweak it a bit:
>
> If the error remains the same, try changing SOLARIS to _solaris_ or
> _SOLARIS_.
>
> Index: mtasker.cc
> ===================================================================
> RCS file: /var/cvsroot/pdns/pdns/mtasker.cc,v
> retrieving revision 1.5
> diff -u -B -b -r1.5 mtasker.cc
> --- mtasker.cc 21 Jan 2003 15:04:02 -0000 1.5
> +++ mtasker.cc 5 Apr 2003 10:46:14 -0000
> @@ -224,7 +224,11 @@
>    uc->uc_stack.ss_sp = new char[d_stacksize];
>
>    uc->uc_stack.ss_size = d_stacksize;
> +#if SOLARIS || solaris
> +  makecontext (uc, (void (*)(...))threadWrapper, 4, this, start,
d_maxtid, val);
> +#else
>    makecontext (uc, (void (*)(void))threadWrapper, 4, this, start,
d_maxtid, val);
> +#endif
>    d_threads[d_maxtid]=uc;
>    d_runQueue.push(d_maxtid++); // will run at next schedule invocation
>  }
>
>
> > make[3]: *** [pdns_recursor.o] Error 1
> > make[3]: Leaving directory `/project/pdns-2.9.7/pdns'
> >
> > But I was to busy yesterday with other things to search for a solution,
so
> > this could be a RTFM problem... I'll try to see if I can find a
solution,
> > otherwise see this posting as my problem ;-)
> >
> > O, the compiler now:
> >
> > grover# gcc -v
> > Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/specs
> > Configured with:
> >
../configure --disable-nls --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/
> > as
> > Thread model: posix
> > gcc version 3.2.2
> >
> > Regards,
> >
> > Whizzer
> >
> >
> > ----- Original Message -----
> > From: "bert hubert" <ahu at ds9a.nl>
> > To: "Whizzer" <powerdns at kuis.nl>
> > Cc: <pdns-users at mailman.powerdns.com>
> > Sent: Friday, April 04, 2003 5:22 PM
> > Subject: Re: [Pdns-users] Problem with compiling under Solaris 8
> >
> >
> > > On Fri, Apr 04, 2003 at 10:05:38AM +0200, Whizzer wrote:
> > > >  Hmm, forgot that information...
> > >
> > > 3.0.3 is a pretty weird compiler, not sure if I want to support it.
Can
> > you
> > > try with 3.2.2?
> > >
> > > Regards,
> > >
> > > bert
> > >
> > > --
> > > http://www.PowerDNS.com      Open source, database driven DNS Software
> > > http://lartc.org           Linux Advanced Routing & Traffic Control
HOWTO
> > >
> >
> > _______________________________________________
> > Pdns-users mailing list
> > Pdns-users at mailman.powerdns.com
> > http://mailman.powerdns.com/mailman/listinfo/pdns-users
>
> --
> http://www.PowerDNS.com      Open source, database driven DNS Software
> http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
>



More information about the Pdns-users mailing list