Compiling dhcpd 3.1-ESV on AIX 5.3

Gordon A. Lang glang at goalex.com
Fri Aug 13 01:23:48 UTC 2010


Ok.  Still hoping someone notices my struggle here, but I'm inching along 
slowly on my own so far....

I executed the linker manually with -bloadmap:x, which led me to notice that 
"collections" and "default_collection" are declared in dhcpd.h as static's 
(without the "extern" modifier).

Why is the linker complaining -- I mean I thought a symbol is never visible 
outside the (object) file unless it is declared with "extern."  I don't get 
any complaints when I compile this code on Solaris.

But on the other hand, why would they be declared in dhcpd.h unless they are 
intended to be common globals, which suggests that maybe I'm remembering the 
"extern" behavior wrong (or maybe defaults have changed since way back 
when).... ?

Are these symbols supposed to be global or are they supposed to be local 
static's in each file?

Is this just an AIX linker thing, or is this something that occurs on other 
platforms as well?

Can I safely ignore the "duplicate symbol" complaints?

Anyone who can shed any light on this, please help me out here.  Or if you 
can't help, at least give me some encouragement.

--
Gordon A. Lang

----- Original Message ----- 
From: "Gordon A. Lang" <glang at goalex.com>
To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
Sent: Wednesday, August 11, 2010 2:19 PM
Subject: Compiling dhcpd 3.1-ESV on AIX 5.3


> Ignore my previous post with this subject, and please instead read this 
> one....
>
> I modified the Makefile.conf to use the AIX 4.3 settings for AIX 5.3 and 
> it helped quite a bit.
> But now I am getting some "duplicate symbol" warnings -- see below -- can 
> anybody shed some light on these warnings?
>
> Making all in server
> gmake[1]: Entering directory 
> `/export/local/netshare/src/dhcp-3.1-ESV/work.aix/server'
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o dhcpd.o dhcpd.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o dhcp.o dhcp.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o bootp.o bootp.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o confpars.o confpars.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o db.o db.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o class.o class.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o failover.o failover.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o omapi.o omapi.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o mdb.o mdb.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o stables.o stables.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o salloc.o salloc.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o ddns.o ddns.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -c -o dhcpleasequery.o dhcpleasequery.c
> gcc -Daix  -o dhcpd dhcpd.o dhcp.o bootp.o confpars.o db.o class.o 
> failover.o omapi.o mdb.o stables.o salloc.o ddns.o dhcpleasequery.o 
> ../common/libdhcp.a ../minires/libres.a ../omapip/libomapi.a 
> ../dst/libdst.a
> ld: 0711-224 WARNING: Duplicate symbol: collections
> ld: 0711-224 WARNING: Duplicate symbol: default_collection
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
> information.
> gmake[1]: Leaving directory 
> `/export/local/netshare/src/dhcp-3.1-ESV/work.aix/server'
> Making all in client
> gmake[1]: Entering directory 
> `/export/local/netshare/src/dhcp-3.1-ESV/work.aix/client'
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -DCLIENT_PATH='"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'   -c -o 
> dhclient.o dhclient.c
> 
> cc -Daix -g  -I/export/local/netshare/src/dhcp-3.1-ESV  -I/export/local/netshare/src/dhcp-3.1-ESV/includes 
>  -DCLIENT_PATH='"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'   -c -o 
> clparse.o clparse.c
> gcc -Daix  -o dhclient dhclient.o clparse.o ../common/libdhcp.a 
> ../minires/libres.a ../omapip/libomapi.a ../dst/libdst.a
> ld: 0711-224 WARNING: Duplicate symbol: local_port
> ld: 0711-224 WARNING: Duplicate symbol: remote_port
> ld: 0711-341 WARNING: Replaced XTY_CM symbol remote_port requires an
>        alignment more strict than the alignment of the symbol that 
> replaces it.
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
> information.
> gmake[1]: Leaving directory 
> `/export/local/netshare/src/dhcp-3.1-ESV/work.aix/client'
>
>
> --
> Gordon A. Lang
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
> 




More information about the dhcp-users mailing list