Building 4.1.0 with USE_SOCKETS on Solaris 10 x86
Mr. Jan Walter
hopping_hol at yahoo.com
Sat Mar 7 16:56:35 UTC 2009
Hi there,
I am getting some weird errors trying to build dhcp 4.1.0 on Solaris 10 x86. The stock build does not work reliably, even with the "snoop" workaround. So building with USE_SOCKETS is the last chance.
System Setup: Solarix 10 x86-64, fresh installation using SUNWCprog
cluster plus SUNWgmake, SUNWgm4, SUNWgccruntime, SUNWgcc, SUNWbison,
SUNWbinutils, and latest Solaris 10 patch cluster. I added a symlink in
/usr/sfw/bin from gmake to make since the ISC autoconf does not pick up
GNU make named anything else than 'make'.
Build environment:
export PATH=/usr/sfw/bin:/usr/sfw/i386-sun-solaris2.10/bin/ :$PATH
export CPP=/usr/sfw/bin/cpp
Configure command: ./configure
Make command: make
The output:
make[2]: Entering directory `/opt/build/dhcp-4.1.0/common'
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT alloc.o -MD -MP -MF ".deps/alloc.Tpo" -c -o
alloc.o alloc.c; \
then mv -f ".deps/alloc.Tpo" ".deps/alloc.Po"; else rm -f ".deps/alloc.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT bpf.o -MD -MP -MF ".deps/bpf.Tpo" -c -o bpf.o
bpf.c; \
then mv -f ".deps/bpf.Tpo" ".deps/bpf.Po"; else rm -f ".deps/bpf.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT comapi.o -MD -MP -MF ".deps/comapi.Tpo" -c -o
comapi.o comapi.c; \
then mv -f ".deps/comapi.Tpo" ".deps/comapi.Po"; else rm -f ".deps/comapi.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT conflex.o -MD -MP -MF ".deps/conflex.Tpo" -c
-o conflex.o conflex.c; \
then mv -f ".deps/conflex.Tpo" ".deps/conflex.Po"; else rm -f ".deps/conflex.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT ctrace.o -MD -MP -MF ".deps/ctrace.Tpo" -c -o
ctrace.o ctrace.c; \
then mv -f ".deps/ctrace.Tpo" ".deps/ctrace.Po"; else rm -f ".deps/ctrace.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT discover.o -MD -MP -MF ".deps/discover.Tpo" -c
-o discover.o discover.c; \
then mv -f ".deps/discover.Tpo" ".deps/discover.Po"; else rm -f ".deps/discover.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT dispatch.o -MD -MP -MF ".deps/dispatch.Tpo" -c
-o dispatch.o dispatch.c; \
then mv -f ".deps/dispatch.Tpo" ".deps/dispatch.Po"; else rm -f ".deps/dispatch.Tpo"; exit 1; fi
if
gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
-DLOCALSTATEDIR='"/var"' -g -O2 -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Wall -Werror
-fno-strict-aliasing -MT dlpi.o -MD -MP -MF ".deps/dlpi.Tpo" -c -o
dlpi.o dlpi.c; \
then mv -f ".deps/dlpi.Tpo" ".deps/dlpi.Po"; else rm -f ".deps/dlpi.Tpo"; exit 1; fi
dlpi.c: In function `send_packet':
dlpi.c:538: warning: implicit declaration of function `send_fallback'
dlpi.c: In function `maybe_setup_fallback':
dlpi.c:1307: warning: implicit declaration of function `if_register_fallback'
make[2]: *** [dlpi.o] Error 1
make[2]: Leaving directory `/opt/build/dhcp-4.1.0/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/build/dhcp-4.1.0/common'
make: *** [all-recursive] Error 1
The
above implies that the compile failed, the if statement returns a 1,
clobbering the RC value of gcc in the shell, and that's that. The
-Werror gcc argument, for a reason presumably, makes all warnings
errors.
Now, running ./configure with the CC environment variable set to exclude Werror, the following output:
ld: fatal: symbol `if_reinitialize_send' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `if_reinitialize_receive' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `if_register_send' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `if_deregister_send' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `if_register_receive' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `if_deregister_receive' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `send_packet' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `receive_packet' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `can_unicast_without_arp' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `can_receive_unicast_unconfigured' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `supports_multiple_interfaces' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: symbol `maybe_setup_fallback' is multiply-defined:
(file ../common/libdhcp.a(dlpi.o) type=FUNC; file ../common/libdhcp.a(socket.o) type=FUNC);
ld: fatal: File processing errors. No output written to dhclient
collect2: ld returned 1 exit status
make[1]: *** [dhclient] Error 1
make[1]: Leaving directory `/opt/build/dhcp-4.1.0/client'
make: *** [all-recursive] Error 1
In short, there is a duplicate declaration somewhere, and the #if macros are probably not lining up or something.
Has anyone got this to build and work on Solaris 10 x86?
Cheers,
Jan
More information about the dhcp-hackers
mailing list