dhcpd 4.x statically linked binaries
Ray Phillips
r.phillips at jkmrc.com
Fri Jun 1 00:38:46 UTC 2007
> > How can I get statically-linked binaries for 4.x?
>
>You can tell the configure script to use alternate compile options like so:
>
>CFLAGS="-static" ./configure
>make
>
>When I do this on my own box, I do get a bunch of warnings about various
>functions which need shared libraries (getservent, gethostbyname,
>and so on), so you may need to do more to get "true" static binaries
>(maybe I need to change glibc somehow, or use uClibc).
Thanks Shane, that seemed to work although I've only compiled it so
far, not run it:
$ uname -prs
NetBSD 3.1 i386
$ gcc -v
Using built-in specs.
Configured with:
/home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure
--enable-long-long --disable-multilib --enable-threads
--disable-symvers --build=i386-unknown-netbsdelf2.0.
--host=i386--netbsdelf --target=i386--netbsdelf
Thread model: posix
gcc version 3.3.3 (NetBSD nb3 20040520)
$
It seems GNU make is required now:
$ ./configure CFLAGS="-static" > configure.log 2>&1
$ make
Making all in includes
cd .. && make am--refresh
make all-am
cd .. && make am--refresh
make: don't know how to make omapip/*.h. Stop
make: stopped in
/usr/home/ray/installers/isc/dhcp/4/4.0.0/a1/dhcp-4.0.0a1/includes
*** Error code 2
Stop.
make: stopped in
/usr/home/ray/installers/isc/dhcp/4/4.0.0/a1/dhcp-4.0.0a1/includes
*** Error code 1
Stop.
make: stopped in /usr/home/ray/installers/isc/dhcp/4/4.0.0/a1/dhcp-4.0.0a1
$
GNU make produced some warnings like this both with and without using
FLAGS="-static" with ./configure:
WARNING: `aclocal-1.9' is missing on your system. You should only need it if
you modified `acinclude.m4' or `configure.ac'. You might want
to install the `Automake' and `Perl' packages. Grab them from
any GNU archive site.
cd . && /bin/sh
/usr/home/ray/installers/isc/dhcp/4/4.0.0/a1/0/dhcp-4.0.0a1/mis
sing --run automake-1.9 --foreign
automake-1.9: not found
WARNING: `automake-1.9' is missing on your system. You should only need it if
you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
You might want to install the `Automake' and `Perl' packages.
Grab them from any GNU archive site.
cd . && /bin/sh
/usr/home/ray/installers/isc/dhcp/4/4.0.0/a1/0/dhcp-4.0.0a1/miss
ing --run autoconf
autoconf: not found
WARNING: `autoconf' is missing on your system. You should only need it if
you modified `configure.ac'. You might want to install the
`Autoconf' and `GNU m4' packages. Grab them from any GNU
archive site.
but otherwise I couldn't see any errors in its output.
$ file client/dhclient
client/dhclient: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for NetBSD 3.1, statically linked, not stripped
$ file server/dhcpd client/dhclient
server/dhcpd: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for NetBSD 3.1, statically linked, not stripped
client/dhclient: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for NetBSD 3.1, statically linked, not stripped
$
I'll have to come to grips with IPv6 and set up a test network to try
out the binaries.
Ray
More information about the dhcp-users
mailing list