DHCP on Mac OS X Lion 10.7.2
DHCP on Mac OS X Lion 10.7.2
2011
If somebody wants to compile ISC DHCP on Mac OS X Lion the following information may be useful. For setting up a DNS and DHCP service on Algol, I needed to do this, and as is often the case, the simple ./configure ; make ; make install didn’t work. The information on this page is for version 4.2.3-P1 of ISC DHCP.
Some hints are available in the system log if you start named. It prints its build parameters in the console log:
05.01.12 18:34:24.147 named: built with '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--prefix=/usr' '--sysconfdir=/private/etc' '--localstatedir=/private/var' '--enable-atomic=no' '--with-openssl=yes' '--with-gssapi=yes' '--enable-symtable=none' 'CFLAGS=-arch x86_64 -arch i386 -g -Os -pipe -gdwarf-2 -D__APPLE_USE_RFC_2292' 'LDFLAGS=-arch x86_64 -arch i386 ' 'CXXFLAGS=-arch x86_64 -arch i386 -g -Os -pipe '
This is the version included by Apple with Mac OS X 10.7.2 Lion “Client”. I don’t know if the server uses the same version or another one.
% named -version
BIND 9.7.3-P3
So, for building dhcp with the llvm-gcc
% gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
the following did work for me:
% export CFLAGS="-arch x86_64 -g -Os -pipe -gdwarf-2 -D__APPLE_USE_RFC_3542"
% export CXXFLAGS="-arch x86_64 -g -Os -pipe "
% export LDFLAGS="-arch x86_64 "
% ./configure --prefix=/usr/local --disable-dependency-tracking --enable-atomic=no --with-gssapi=yes --enable-symtable=none
% make
I usually install into /usr/local to keep my self-compiled binaries separate from the rest of the OS, so /usr/local/bin and /usr/local/sbin should be in the path.
Hope this helps!
Compiling DHCP on Mac OS X 10.7.2
05.01.2012
Again lost some time trying to figure out how to compile something on Mac OS X Lion...