wiki:SystemNotesFreeBSDold

To build using a FreeBSD port instead see http://git.bind10.isc.org/~jreed/freebsd/ .

These notes are quite dated. Keep in mind that many things have changed since they were created. In particular, Kea does not require python3 or SQLite. It can also use either OpenSSL or Botan, so Botan is no longer a strict dependency.

How to install BIND 10 on FreeBSD 9.1

These instructions known to work on FreeBSD version 9.1 (uname -a: FreeBSD ci-02.lab.isc.org 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64).

  • install portconf:
    cd /usr/ports/ports-mgmt/portconf
    make install clean
    
  • edit /usr/local/etc/ports.conf (create the file if it does not exist), and add following lines and then save the file:
    databases/py-sqlite3: PYTHON_VERSION=python3.1
    devel/py-elementtree: PYTHON_VERSION=python3.1
    devel/py-setproctitle: PYTHON_VERSION=python3.1
    devel/googletest: PYTHON_VERSION=python3.1
    
  • install Botan:
    cd /usr/ports/security/botan
    make install clean
       (accept all defaults: *SSL, *GMP, *ECC; *DEBUG, *ICU; *THREADS; *EXAMPLES, *IPV6, *NLS, *PYMALLOC, *THREADS, *UCS4)
    
  • install Python 3.1:
    cd /usr/ports/lang/python31
    make install clean
       (accept all defaults: *EXAMPLES, *IPV6, *NLS, *PYMALLOC, *THREADS, *UCS4)
    
  • install Py-sqlite3:
    cd /usr/ports/databases/py-sqlite3
    make install clean
       (accept all defaults: *FTS3, *URI, *METADATA, *SECURE_DELETE, *UNLOCK_NOTIFY, *THREADSAFE)
    
  • install Google Test:
    cd /usr/ports/devel/googletest
    make install clean
    
  • install Log4CPlus:
    cd /usr/ports/devel/log4cplus
    make install clean
    
  • install PkgConfig:
    cd /usr/ports/devel/pkgconf [for 9.1; located in /usr/ports/devel/pkg-config in FreeBSD 8.3]
    make install clean
    
  • install Automake:
    cd /usr/ports/devel/automake
    make install clean (accept defaults: *NLS)
    
  • install Git:
    cd /usr/ports/devel/git
    make install clean (accept all defaults: *CONTRIB, *CURL, *CVS, *ETCSHELLS, *ICONV, *NLS, *P4, *PERL; *IPV6, *OPENSSL, *CA_BUNDLE, *PROXY; *EXAMPLES, *IPV6)
    
  • install BIND 10:
    git clone git://git.bind10.isc.org/bind10
    cd bind10
    autoreconf -i
    ./configure  --without-werror  [--with-gtest, --prefix, --with-boost-include, --with-pythonpath]
    make
    make install
    [make check]
    

For recent versions of FreeBSD (it looks like the case for FreeBSD 8.x and higher) and g++, build can fail as reported in #1991. It seems to be a bug of FreeBSD ports: http://www.freebsd.org/cgi/query-pr.cgi?pr=174753 Hopefully it will be fixed, but until then, known workaround is one of the following:

  • Specify the --without-werror option to ./configure (this doesn't change the resulting binary generated by the compiler): ./configure --without-werror.
  • Use clang++ instead of g++. Note, however, that it is also known that clang++ (installed via ports/devel/clang as of 2012/12/18) causes a different build problem and doesn't work. ports/devel/clang-devel (3.2.r163622_2 as of this writing) is known to work.
  • Fetch and extract Boost header files by hand and use them instead of the ones installed via ports. Note that BIND 10 doesn't require compiled Boost library, so you don't have to build it; the only thing to do is to extract the header (source) files, and specify the path with the --with-boost-include configure option.

How to install BIND 10 on FreeBSD 8.2/8.3

I did further test now on my FreeBSD 8.2-RELEASE box. py-sqlite3 with Python 3.2 does not work well on FreeBSD ports. py-sqlite3 with Python 3.1 works well. (Update on 2012/12/19: Python 3.2 and sqlite3 worked fine on FreeBSD 8.3 and the ports mostly as of the day).

There is a known build issue with a combination of recent versions of FreeBSD and g++, but there is a workaround. See below.

  • start empty /usr/local and /etc/make.conf

# Or, PYTHON_VERSION=python2.6 or python2.7
# python3.2 is not installed.
# python library ports are not installed:
# py26-sqlite3, py26-elementtree, ...
# py27-sqlite3, ...

  • install ports/ports-mgmt/portconf:
    cd /usr/ports/ports-mgmt/portconf
    make install clean
    
  • edit /usr/local/etc/ports.conf (create the file if it does not exist), and add following lines:
    databases/py-sqlite3: PYTHON_VERSION=python3.1
    devel/py-elementtree: PYTHON_VERSION=python3.1
    devel/py-setproctitle: PYTHON_VERSION=python3.1
    devel/googletest: PYTHON_VERSION=python3.1
    
  • install ports/security/botan:

# botan depends on boost-libs and python2.6 or python 2.7.
# /usr/local/bin/python will be python2.7.

# devel/boost-libs is automatically installed by dependency.

  • install other ports
  lang/python31
  devel/py-elementtree
  devel/py-setproctitle
  databases/py-sqlite3
  devel/googletest
  devel/log4cplus
  devel/pkg-config (or devel/pkgconf)
  devel/automake    # automake depends on devel/autoconf
  # devel/git
  • install BIND 10
    fetch BIND 10 from git.
    autoreconf
    # configure may require --pythonpath
    Do "./configure;make check"

For recent versions of FreeBSD (it looks like the case for FreeBSD 8.x and higher) and g++, build can fail as reported in #1991. It seems to be a bug of FreeBSD ports: http://www.freebsd.org/cgi/query-pr.cgi?pr=174753 Hopefully it will be fixed, but until then, known workaround is one of the following:

  • Specify the --without-werror option to ./configure (this doesn't change the resulting binary generated by the compiler): ./configure --without-werror.
  • Use clang++ instead of g++. Note, however, that it is also known that clang++ (installed via ports/devel/clang as of 2012/12/18) causes a different build problem and doesn't work. ports/devel/clang-devel (3.2.r163622_2 as of this writing) is known to work.
  • Fetch and extract Boost header files by hand and use them instead of the ones installed via ports. Note that BIND 10 doesn't require compiled Boost library, so you don't have to build it; the only thing to do is to extract the header (source) files, and specify the path with the --with-boost-include configure option.

Originally provided by Fujiwara-san: https://lists.isc.org/pipermail/bind10-dev/2011-August/002564.html

Last modified 17 months ago Last modified on Jun 24, 2016, 12:15:31 PM