On 04/28/10 14:15, Kern Sibbald wrote:
> I suspect that is something that we have seen before. If you explicitly add
> libraries (I suspect that you did, because Linker flags is set, which is
> not "normal"), Bacula could then link against previously installed libraries
> rather than its own library that it has just built, and you will get errors.
>
> Either don't use any Linker flags (as you have done), or deinstall the old
> Bacula and its shared libraries prior to building, or point linker flags to
> the Bacula build src/lib directory before pointing it to a directory where a
> previous version of Bacula is installed (in your case /usr/local/lib.
>
This is indeed the problem. I don't think that deinstalling the older
version of bacula first is a proper solution, though. I like the idea
of changing the order of the linker paths, however, I can't seem to find
where LDFLAGS is getting set. I think it's getting set by the configure
script, but I may be wrong. (It's set in the port Makefile, but
removing this declaration doesn't prevent it from getting set elsewhere.)
A possible solution is to modify the Makefile.in found in each source
directory to reverse the order of the linker paths; i.e. from:
bacula-sd: Makefile $(SDOBJS) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE)
../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
@echo "Linking $@ ..."
$(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@
$(SDOBJS) $(FDLIBS) \
-lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS)
$(WRAPLIBS) \
$(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
to:
bacula-sd: Makefile $(SDOBJS) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE)
../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
@echo "Linking $@ ..."
$(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -L../lib $(LDFLAGS) -o $@
$(SDOBJS) $(FDLIBS) \
-lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS)
$(WRAPLIBS) \
$(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
However this seems less than ideal and I'm not sure what else it could
possibly break. If it doesn't break anything for BSD, at least, we can
patch it through the ports system.
> Best regards,
>
> Kern
>
> On Wednesday 28 April 2010 19:59:21 Dan Langille wrote:
>
>> I tried to compile 5.0.2 on FreeBSD 8. I'm not sure if I've messed
>> something up yet, but just in case it's not me... :)
>>
>> The full output is at: http://www.langille.org/tmp/bacula.errors
>>
>> The error part is:
>>
>> Linking bacula-dir ...
>> /var/ports/usr/home/dan/src/sysutils/bacula-server/work/bacula-5.0.2/libtoo
>> l --silent --tag=CXX --mode=link /usr/bin/c++ -L/usr/local/lib -L../lib
>> -L../cats -L../findlib -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 -lbacpy -lbaccfg -lbac -lm -L/usr/local/lib -lpq
>> -lcrypt -lpthread -lintl -lwrap /usr/local/lib/libintl.so
>> /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lssl -lcrypto
>>
>> dird.o(.text+0x2588): In function `main':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> dird.o(.text+0x26e3): In function `main':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> dird.o(.text+0x2746): In function `main':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> job.o(.text+0x28b3): In function `cancel_job(UAContext*, JCR*)':
>> : undefined reference to `JCR::my_thread_send_signal(int)'
>>
>> job.o(.text+0x2a35): In function `cancel_job(UAContext*, JCR*)':
>> : undefined reference to `JCR::my_thread_send_signal(int)'
>>
>> job.o(.text+0x3875): In function `cancel_storage_daemon_job(JCR*)':
>> : undefined reference to `JCR::my_thread_send_signal(int)'
>>
>> jobq.o(.text+0xbf8): In function `jobq_add(jobq_t*, JCR*)':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> jobq.o(.text+0xe5f): In function `jobq_server':
>> : unLinking bacula-dir ...
>>
>> /var/ports/usr/home/dan/src/sysutils/bacula-server/work/bacula-5.0.2/libtoo
>> l --silent --tag=CXX --mode=link /usr/bin/c++ -L/usr/local/lib -L../lib
>> -L../cats -L../findlib -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 -lbacpy -lbaccfg -lbac -lm -L/usr/local/lib -lpq
>> -lcrypt -lpthread -lintl -lwrap /usr/local/lib/libintl.so
>> /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lssl -lcrypto
>>
>> dird.o(.text+0x2588): In function `main':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> dird.o(.text+0x26e3): In function `main':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> dird.o(.text+0x2746): In function `main':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> job.o(.text+0x28b3): In function `cancel_job(UAContext*, JCR*)':
>> : undefined reference to `JCR::my_thread_send_signal(int)'
>>
>> job.o(.text+0x2a35): In function `cancel_job(UAContext*, JCR*)':
>> : undefined reference to `JCR::my_thread_send_signal(int)'
>>
>> job.o(.text+0x3875): In function `cancel_storage_daemon_job(JCR*)':
>> : undefined reference to `JCR::my_thread_send_signal(int)'
>>
>> jobq.o(.text+0xbf8): In function `jobq_add(jobq_t*, JCR*)':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> jobq.o(.text+0xe5f): In function `jobq_server':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> jobq.o(.text+0x1023): In function `jobq_server':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> jobq.o(.text+0x20cd): In function `sched_wait':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> msgchan.o(.text+0x3c8): In function `msg_thread':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> ua_output.o(.text+0x344): In function `do_messages(UAContext*, char
>>
> const*)':
>
>> : undefined reference to `rwl_writelock_p(s_rwlock_tag*, char const*, int)'
>>
>> ua_server.o(.text+0x273): In function `connect_thread':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> ua_server.o(.text+0x2fc): In function `handle_UA_client_request(void*)':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> *** Error code 1defined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> jobq.o(.text+0x1023): In function `jobq_server':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> jobq.o(.text+0x20cd): In function `sched_wait':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> msgchan.o(.text+0x3c8): In function `msg_thread':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> ua_output.o(.text+0x344): In function `do_messages(UAContext*, char
>>
> const*)':
>
>> : undefined reference to `rwl_writelock_p(s_rwlock_tag*, char const*, int)'
>>
>> ua_server.o(.text+0x273): In function `connect_thread':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> ua_server.o(.text+0x2fc): In function `handle_UA_client_request(void*)':
>> : undefined reference to `set_jcr_in_tsd(JCR*, bool)'
>>
>> *** Error code 1
>>
>> # uname -a
>> FreeBSD ducky.unixathome.org 8.0-STABLE FreeBSD 8.0-STABLE #0: Tue Apr 13
>> 19:28:24 BST 2010
>> [email protected]:/usr/obj/usr/src/sys/NGAIO i386
>>
>> # gcc -v
>> Using built-in specs.
>> Target: i386-undermydesk-freebsd
>> Configured with: FreeBSD/i386 system compiler
>> Thread model: posix
>> gcc version 4.2.1 20070719 [FreeBSD]
>>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Bacula-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>
>
------------------------------------------------------------------------------
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel