Bacula-users

Re: [Bacula-users] FreeBSD & Python link error

2013-03-06 10:21:30
Subject: Re: [Bacula-users] FreeBSD & Python link error
From: Dan Langille <dan AT langille DOT org>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 06 Mar 2013 10:18:10 -0500
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.

Next: figure out how to force python support in bacula-client when 
building bacula-server.

-- 
Dan Langille - http://langille.org/

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users