On Aug 5, 2014, at 6:13 PM, Dan Langille <d...@langille.org> wrote: > > On Aug 5, 2014, at 4:37 PM, Laurent Papier <bac...@tuxfan.net> wrote: > >> On Tue, 5 Aug 2014 15:31:43 -0400 >> Dan Langille <d...@langille.org> wrote: >> >>> I am encountering a link error with the Bacula 7.0.4 static client and I >>> don’t know how to fix this. >>> >>> long version: >>> https://redports.org//~dvl/20140805183033-13761-230584/bacula-client-static-7.0.4_1.log >>> >>> Short version: >>> >>> Linking bacula-fd ... >>> /usr/bin/c++ -L/usr/local/lib -liconv -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 restore.o status.o verify.o verify_vol.o >>> xattr.o -lz -lbacfind -lbaccfg -lbac -lm -lpthread -lintl >>> /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lssl -lcrypto >>> -llzo2 >>> /usr/bin/c++ -L/usr/local/lib -liconv -static -L../lib -L../findlib -o >>> static-bacula-fd filed.o authenticate.o acl.o backup.o estimate.o >>> fd_plugins.o accurate.o filed_conf.o heartbeat.o job.o restore.o status.o >>> verify.o verify_vol.o xattr.o -lz -lbacfind -lbaccfg -lbac -lm -lpthread >>> -lintl /usr/local/lib/libintl.a -Wl,-rpath -Wl,/usr/local/lib -lssl >>> -lcrypto >>> backup.o: In function `blast_data_to_storage_daemon(JCR*, char*)': >>> backup.c:(.text+0xd64): undefined reference to `__lzo_init_v2' >>> backup.o: In function `save_file(JCR*, FF_PKT*, bool)': >>> backup.c:(.text+0x2b4e): undefined reference to `lzo1x_1_compress' >>> restore.o: In function `decompress_data(JCR*, int, char**, unsigned int*)': >>> restore.c:(.text+0x457): undefined reference to `lzo1x_decompress_safe' >>> restore.o: In function `do_restore(JCR*)': >>> restore.c:(.text+0x1eab): undefined reference to `__lzo_init_v2' >>> /usr/local/lib/libintl.a(dcigettext.o): In function `_nl_find_msg': >>> dcigettext.c:(.text+0x94b): undefined reference to `libiconv_open' >>> dcigettext.c:(.text+0x9fa): undefined reference to `libiconv' >>> dcigettext.c:(.text+0xbaf): undefined reference to `libiconv_open' >>> /usr/local/lib/libintl.a(relocatable.o): In function >>> `libintl_set_relocation_prefix': >>> relocatable.c:(.text+0x14b): undefined reference to >>> `libiconv_set_relocation_prefix' >>> *** [static-bacula-fd] Error code 1 >>> 1 error >>> >>> — >>> Dan Langille >>> >> >> Hello Dan, >> '-lzo2' is missing from the link command executed to generate the static >> binary. >> I checked the Makefile.in in src/filed provided in 7.0.4 version. If '-lzo2' >> is used for the dynamic binary it should be used for the static one. The >> same variable is used in both case $(LZO_LIBS). >> >> bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) >> ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_T >> YPE) >> @echo "Linking $@ ..." >> $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o >> $@ $(SVROBJS) \ >> $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \ >> $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) >> $(AFS_LIBS) $(LZO_LIBS) >> >> static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a >> ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) >> $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib >> -L../findlib -o $@ $(SVROBJS) \ >> $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) >> \ >> $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) >> $(AFS_LIBS) $(LZO_LIBS) >> strip $@ >> >> Could you check the generated src/filed/Makefile and src/filed/Makefile.in? >> >> In the log: bacula-client-static-7.0.4_1 depends on shared library: >> liblzo2.so. Shouldn't it be liblzo2.a? >> Do you have the static version liblzo2.a installed on your system? > > I had a whole bunch of patches to the FreeBSD port which were unnecessary. I > have removed them and started again. > > The current issue is related to libintl > > Linking bacula-fd ... > /usr/bin/c++ -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 restore.o status.o verify.o verify_vol.o xattr.o -lz -lbacfind > -lbaccfg -lbac -lm -lpthread /usr/local/lib/libintl.so -Wl,-rpath > -Wl,/usr/local/lib -lssl -lcrypto > /usr/bin/c++ -static -L../lib -L../findlib -o static-bacula-fd filed.o > authenticate.o acl.o backup.o estimate.o fd_plugins.o accurate.o filed_conf.o > heartbeat.o job.o restore.o status.o verify.o verify_vol.o xattr.o -lz > -lbacfind -lbaccfg -lbac -lm -lpthread /usr/local/lib/libintl.so > -Wl,-rpath -Wl,/usr/local/lib -lssl -lcrypto > /usr/bin/ld: attempted static link of dynamic object > `/usr/local/lib/libintl.so' > *** [static-bacula-fd] Error code 1 > 1 error > ====== Error in > /var/ports/usr/ports.SVN/sysutils/bacula-client-static/work/bacula-7.0.4/src/filed > ====== > *** [all] Error code 1 > 1 error > ===> Compilation failed unexpectedly. > Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to > the maintainer. > *** [do-build] Error code 1 > > Stop in /usr/ports.SVN/sysutils/bacula-client-static. > *** [install] Error code 1 > > Stop in /usr/ports.SVN/sysutils/bacula-client-static.
I think I know the problem. I was building on my own system, instead of a clean system. A clean compile works. My development contains libintl. Here is the log from a clean build. https://redports.org/~dvl/20140805224410-97410-230652/bacula-client-static-7.0.4_1.log I appreciate your help. It got me headed into the right direction. Thank you. — Dan Langille
signature.asc
Description: Message signed with OpenPGP using GPGMail
------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel