Hello, 26.10.2007 12:06,, Chris Howells wrote:: > Hi, > > I'm trying to compile a statically linked fd with openssl support from > bacula 2.2.5. Should this configuration work?
If I recall correctly, the glibc is no always available as an .a file, i.e. glibc requires dynamic loading of shared objects. For reasons, look at http://people.redhat.com/drepper/no_static_linking.html and http://gcc.gnu.org/ml/gcc/1998-12/msg00083.html for example. In short, I doubt it's worth the effort. Better spend your time on setting up a usable emergency rescue system with the necessary files and configuration, that may be easier. Arno > My configure line is: > > ./configure --enable-static-fd --enable-client-only --with-openssl > > Unfortunately the compile fails whilst it's trying to link the fd: > > /usr/bin/g++ -L../lib -L../findlib -o bacula-fd filed.o authenticate.o > acl.o backup.o estimate.o filed_conf.o heartbeat.o job.o pythonfd.o > restore.o status.o verify.o verify_vol.o \ > -lacl -lz -lfind -lbac -lm -lpthread -ldl \ > -lssl -lcrypto > /usr/bin/g++ -static -L../lib -L../findlib -o static-bacula-fd filed.o > authenticate.o acl.o backup.o estimate.o filed_conf.o heartbeat.o job.o > pythonfd.o restore.o status.o verify.o verify_vol.o \ > -lacl -lz -lfind -lbac -lm -lpthread -ldl \ > -lssl -lcrypto > ../lib/libbac.a(bsys.o): In function `drop(char*, char*)': > /home/chris/bacula-2.2.5/src/lib/bsys.c:694: warning: Using 'initgroups' > in statically linked applications requires at runtime the shared > libraries from the glibc version used for linking > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libacl.a(__acl_to_any_text.o): > > > In function `__acl_to_any_text': > (.text+0x452): warning: Using 'getgrgid' in statically linked > applications requires at runtime the shared libraries from the glibc > version used for linking > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libacl.a(acl_from_text.o): > > In function `acl_from_text': > (.text+0x5b0): warning: Using 'getgrnam' in statically linked > applications requires at runtime the shared libraries from the glibc > version used for linking > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libacl.a(acl_from_text.o): > > In function `acl_from_text': > (.text+0x485): warning: Using 'getpwnam' in statically linked > applications requires at runtime the shared libraries from the glibc > version used for linking > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libacl.a(__acl_to_any_text.o): > > > In function `__acl_to_any_text': > (.text+0x5f7): warning: Using 'getpwuid' in statically linked > applications requires at runtime the shared libraries from the glibc > version used for linking > ../lib/libbac.a(bnet.o): In function `resolv_host': > /home/chris/bacula-2.2.5/src/lib/bnet.c:424: warning: Using > 'gethostbyname2' in statically linked applications requires at runtime > the shared libraries from the glibc version used for linking > ../lib/libbac.a(address_conf.o): In function `add_address': > /home/chris/bacula-2.2.5/src/lib/address_conf.c:310: warning: Using > 'getservbyname' in statically linked applications requires at runtime > the shared libraries from the glibc version used for linking > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_bind_func': > (.text+0x2d6): undefined reference to `dlsym' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_bind_func': > (.text+0x3b7): undefined reference to `dlerror' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_bind_var': > (.text+0x446): undefined reference to `dlsym' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_bind_var': > (.text+0x527): undefined reference to `dlerror' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_unload': > (.text+0x595): undefined reference to `dlclose' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_load': > (.text+0x676): undefined reference to `dlopen' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_load': > (.text+0x6e0): undefined reference to `dlclose' > /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../../lib/libcrypto.a(dso_dlfcn.o): > In function `dlfcn_load': > (.text+0x715): undefined reference to `dlerror' > collect2: ld returned 1 exit status > make[1]: *** [static-bacula-fd] Error 1 > make[1]: Leaving directory `/home/chris/bacula-2.2.5/src/filed' > > I can reproduce this failure on both Ubuntu 6.06 and 7.04. > > Thanks for any help. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- Arno Lehmann IT-Service Lehmann www.its-lehmann.de ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users