Re: Unsuccessful build unbound --with-pyunbound --with-pythonmodule to have Python scripting support
On 2017-03-10, Deniswrote: > Trying to build Unbound-1.5.9 from /usr/src/usr.sbin/unbound with Python > scripting support on OpenBSD 6.0 amd64 Just use the upstream tarball for this and build it separately, don't retrofit it into /usr/src.
Unsuccessful build unbound --with-pyunbound --with-pythonmodule to have Python scripting support
Trying to build Unbound-1.5.9 from /usr/src/usr.sbin/unbound with Python scripting support on OpenBSD 6.0 amd64 What was done before build: 1. pkg_add swig-2.0.11p2 python-2.7 2. Added into /usr/src/usr.sbin/unbound/Makefile.bsd-wrapper +LDFLAGS="-L/usr/local/lib" +--with-pyunbound \ +--with-pythonmodule \ - PATH="/bin:/usr/bin:/sbbin:/usr/sbin" \ 3. Copied necessary Python related sources (from official unbound-1.5.9 sources) into /usr/src/usr.sbin/unbound/ dir: cp -R libunbound/ /usr/src/usr.sbin/unbound/ && cp -R pythonmod/ /usr/src/usr.sbin/unbound/ 4. Patched /usr/src.usr.sbin/unbound/libunbound/python/libunbound.i: -%include "libunbound/unbound.h" +%include "../unbound.h" 5. While running build from source libtool make an error: ... /usr/local/bin/swig -python -o libunbound/python/libunbound_wrap.c -I. -I/usr/local/include/python2.7 -DPY_MAJOR_VERSION=2 /usr/src/usr.sbin/unbound/libunbound/python/libunbound.i ./libtool --tag=CC --mode=compile cc -I. -I/usr/src/usr.sbin/unbound -I/usr/local/include/python2.7 -O2 -pipe-o libunbound_wrap.lo -c libunbound/python/libunbound_wrap.c libtool: compile: cc -I. -I/usr/src/usr.sbin/unbound -I/usr/local/include/python2.7 -O2 -pipe -c libunbound/python/libunbound_wrap.c -o libunbound_wrap.o ./libtool --tag=CC --mode=link cc -I. -I/usr/src/usr.sbin/unbound -I/usr/local/include/python2.7 -O2 -pipe -L/usr/local/lib -module -avoid-version -no-undefined -shared -o _unbound.la libunbound_wrap.lo -rpath /usr/local/lib/python2.7/site-packages L. -L.libs -lunbound libtool: error: cannot build a shared library See the libtool documentation for more information. Fatal configuration error. *** Error 1 in obj (Makefile:407 '_unbound.la') *** Error 1 in /usr/src/usr.sbin/unbound (Makefile.bsd-wrapper:51 'gnu') 6. My partial obj/Makefile (Which produces Makefile:407 _unbound.la error)is: ... SHELL=/bin/sh VERSION=1.5.9 srcdir=/usr/src/usr.sbin/unbound prefix=/usr/local exec_prefix=${prefix} bindir=${exec_prefix}/bin sbindir=${exec_prefix}/sbin mandir=${datarootdir}/man libdir=${exec_prefix}/lib # datarootdir is here to please some checkers, use datadir. datarootdir=${prefix}/share datadir=${datarootdir} includedir=${prefix}/include doxygen= libtool=./libtool staticexe= EXEEXT= configfile=/var/unbound/etc/unbound.conf CHECKLOCK_SRC=testcode/checklocks.c CHECKLOCK_OBJ= DNSTAP_SRC= DNSTAP_OBJ= WITH_PYTHONMODULE=yes WITH_PYUNBOUND=yes PY_MAJOR_VERSION=2 PYTHON_SITE_PKG=/usr/local/lib/python2.7/site-packages PYTHONMOD_INSTALL=pythonmod-install PYTHONMOD_UNINSTALL=pythonmod-uninstall PYUNBOUND_INSTALL=pyunbound-install PYUNBOUND_UNINSTALL=pyunbound-uninstall UNBOUND_EVENT_INSTALL= UNBOUND_EVENT_UNINSTALL= UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 UNBOUND_VERSION_MICRO=9 ALLTARGET=alltargets INSTALLTARGET=install-all SSLLIB=-lssl ... # Pyunbound python unbound wrapper _unbound.la:libunbound_wrap.lo libunbound.la $(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAG S) -module -avoid-version -no-undefined -shared -o $@ libunbound_wrap.lo -rpath $(PYTHON_SIT E_PKG) L. -L.libs -lunbound ... --- If you need mo info I can make any. Thank you for answer in advance.