[Pdns-users] Re: compiling on x86_64

Vincent Danen vdanen at annvix.org
Thu Feb 10 23:52:33 UTC 2005


On Feb 10, 2005, at 14:59, Vincent Danen wrote:

>>> I'm trying to compile pdns 2.9.17 on an x86_64 linux system.  I had 
>>> to
>> [...]
>>> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/mysql 
>>> -D_GNU_SOURCE
>>> -O2 -pipe -fstack-protector -Wall -O2 -MT gmysqlbackend.lo -MD -MP 
>>> -MF
>>> .deps/gmysqlbackend.Tpo -c gmysqlbackend.cc  -fPIC -DPIC -o
>>> .libs/gmysqlbackend.lo
>>> In file included from gmysqlbackend.cc:10:
>>> ../../pdns/dnspacket.hh: In member function `int 
>>> DNSPacket::parse(const
>>> char*, int)':
>>> ../../pdns/dnspacket.hh:305: error: ambiguous overload for 
>>> 'operator<<'
>>
>> I am also seeing the error on my Ubuntu AMD64 box (gcc 3.3.4). The 
>> problem
>> seems to be that size_t is typedefed as a long int, but the Logger 
>> class
>> only has overloads for int and unsigned int. Adding overloads for 
>> long and
>> unsigned long to Logger should fix it.
>
> Nevermind... I got it.  Seems to be compiling now with this:
>
> --- logger.hh~  2004-09-13 14:54:44.000000000 -0400
> +++ logger.hh   2005-02-10 16:56:55.000000000 -0500
> @@ -111,6 +111,8 @@
>    Logger& operator<<(const string &s);   //!< log a string
>    Logger& operator<<(int);   //!< log an int
>    Logger& operator<<(unsigned int);   //!< log an unsigned int
> +  Logger& operator<<(long);  //!> log a long
> +  Logger& operator<<(unsigned long);  //!< log an unsigned long
>    Logger& operator<<(Urgency);    //!< set the urgency, << style
>
> I guess I'm not so dense as I thought.  =)

Maybe I am...  the build fails further on with this:

g++ -DSYSCONFDIR=\"/usr/local/etc\" -DLIBDIR=\"/usr/local/lib\" 
-DLOCALSTATEDIR=\"/var/run\" -Ibackends/bind -D_GNU_SOURCE -Wall -O2 -o 
pdns_server -rdynamic dnspacket.o nameserver.o qtype.o logger.o 
arguments.o packethandler.o tcpreceiver.o packetcache.o statbag.o 
dnsbackend.o ws.o webserver.o session.o misc.o receiver.o 
ueberbackend.o dynlistener.o dynhandler.o resolver.o communicator.o 
dnsproxy.o randombackend.o unix_utility.o common_startup.o 
bindbackend2.o zoneparser2.o bindparser.o bindlexer.o huffman.o 
gsqlbackend.o sillyrecords.o bindbackend.o  -ldl -pthread
tcpreceiver.o(.gnu.linkonce.t._ZN9DNSPacket5parseEPKci+0x337): In 
function `DNSPacket::parse(char const*, int)':
: undefined reference to `Logger::operator<<(unsigned long)'
communicator.o(.text+0x2d61): In function 
`CommunicatorClass::masterUpdateCheck(PacketHandler*)':
: undefined reference to `Logger::operator<<(unsigned long)'
communicator.o(.text+0x34af): In function 
`CommunicatorClass::slaveRefresh(PacketHandler*)':
: undefined reference to `Logger::operator<<(unsigned long)'
dnsproxy.o(.text+0x2be6): In function `DNSProxy::mainloop()':
: undefined reference to `Logger::operator<<(unsigned long)'
bindbackend2.o(.text+0x66bd): In function 
`Bind2Backend::loadConfig(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*)':
: undefined reference to `Logger::operator<<(unsigned long)'
bindbackend.o(.text+0x9029): more undefined references to 
`Logger::operator<<(unsigned long)' follow
collect2: ld returned 1 exit status
make[3]: *** [pdns_server] Error 1

I guess it's a little more involved than I thought.  I'll try to fiddle 
with this some more and see if I can come up with a solution.

-- 
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20050210/431dfb3b/attachment-0001.sig>


More information about the Pdns-users mailing list