On Mar 6, 2013, at 10:18 AM, Dan Langille wrote: > On 2013-03-06 09:55, Martin Simmons wrote: >>>>>>> On Tue, 05 Mar 2013 09:46:42 -0500, Dan Langille said: >>> >>> On 2013-02-20 04:14, Geert Stappers wrote: >>> > Op 20130218 om 14:54 schreef Dan Langille: >>> >> I'm trying to add Python support to the FreeBSD port. I'm working >>> >> on a PR submitted to FreeBSD, but >>> >> I'm getting a link error. >>> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171818 >>> >> >>> >> Any ideas? Full link output at the above URL. >>> >> >>> >> The main error is: >>> >> >>> >> Linking bacula-dir ... >>> >> >>> >> /var/ports/usr/home/dan/src/ports/sysutils/bacula-server/work/bacula-5.2.12/libtool >>> >> --silent --tag=CXX --mode=link /usr/bin/c++ -L../lib -L../cats >>> >> -L../findlib -L/usr/local/lib -Wl,-rpath=/usr/lib:/usr/local/lib >>> >> -L/usr/local/lib -o bacula-dir dird.o admin.o authenticate.o >>> >> autoprune.o backup.o bsr.o catreq.o dir_plugins.o dird_conf.o expand.o >>> >> fd_cmds.o getmsg.o inc_conf.o job.o jobq.o migrate.o mountreq.o >>> >> msgchan.o next_vol.o newvol.o pythondir.o recycle.o restore.o >>> >> run_conf.o scheduler.o ua_acl.o ua_cmds.o ua_dotcmds.o ua_query.o >>> >> ua_input.o ua_label.o ua_output.o ua_prune.o ua_purge.o ua_restore.o >>> >> ua_run.o ua_select.o ua_server.o ua_status.o ua_tree.o ua_update.o >>> >> vbackup.o verify.o -lbacfind -lbacsql -lbaccats -lbacpy -lbaccfg -lbac >>> >> -lm -pthread -lutil -lm -lpython2.7 -lutil -lpthread -lintl -lwrap >>> >> /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath >>> >> -Wl,/usr/local/lib -L/usr/lib -lssl -lcrypto >>> >> dird.o(.text+0x234e): In function `main': >>> >> : undefined reference to >>> >> `init_python_interpreter(init_python_interpreter_args*)' >>> >> >>> > >>> > FWIW: the Debian package has a build depend on 'python-dev' >>> > >>> > >>> > Stappers >>> > not familair with FreeBSD equivalents of python-dev >>> >>> >>> And neither am I. For now, this extension to the FreeBSD port is >>> stalled. >> >> Something has messed up long before this error. >> >> init_python_interpreter is defined by bacula itself and should be in >> src/lib/libbacpy.so, but your build doesn't even try to build the src/lib >> directory (see the "Doing make of dependencies" output). >> >> I don't know why the make appears to be incomplete, but my guess is that you >> have to rebuild/reinstall bacula-client with python support first (and add >> libbacpy to pkg-plist.client). > > Martin: that was it. Thank you. Yes, on FreeBSD, sysutils/bacula-client > installs the > shared libraries. Building it first, manually in this case, solves the link > error.
I was wrong. Just now, I rebuilt bacula-client with Python support. I know it's there because I see it in the output from the compile: $ grep -ri python bacula-client.txt checking for python... /usr/local/bin/python2.7 checking for Python support... no Python support: no Compiling pythonlib.c /var/ports/usr/home/dan/src/ports/sysutils/bacula-client/work/bacula-5.2.12/libtool --silent --tag=CXX --mode=link /usr/bin/c++ -L/usr/local/lib -Wl,-rpath=/usr/lib:/usr/local/lib -o libbacpy.la pythonlib.lo -export-dynamic -rpath /usr/local/lib -version-info 5:2:0 -L/usr/lib -lssl -lcrypto -lpthread -lintl Compiling pythonfd.c /var/ports/usr/home/dan/src/ports/sysutils/bacula-client/work/bacula-5.2.12/libtool --silent --tag=CXX --mode=link /usr/bin/c++ -L/usr/local/lib -Wl,-rpath=/usr/lib:/usr/local/lib -L../lib -L../findlib -o bacula-fd filed.o authenticate.o acl.o backup.o estimate.o fd_plugins.o accurate.o filed_conf.o heartbeat.o job.o pythonfd.o restore.o status.o verify.o verify_vol.o xattr.o -lz -lbacfind -lbacpy -lbaccfg -lbac -lm -lpthread -lintl -lwrap /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/lib -lssl -lcrypto ===> bacula-client-5.2.12_1 depends on file: /usr/local/bin/python2.7 - found So, yeah, it's in there. But when the time comes to compile bacula-server: grep -i python bacula-server WITH_PYTHON=yes Enable Python scripting in the director. checking for python... /usr/local/bin/python checking for Python support... yes configure: checking for more Python libs Python support: yes -pthread -lutil -lm -lpython2.7 -lutil Compiling pythondir.c Yeah, bacula-server has support. Is this because I'm using Python 2.7? I ask because this page refers only to Python <= 2.5 http://www.bacula.org/manuals/en/install/install/Installing_Bacula.html The full error output is at http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171818 I'm at a full loss. -- Dan Langille - http://langille.org ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users