That's what I was looking for. I looked for the *-devel packages, but not *-static. Duh! Well, the next part. I installed a few of the libraries, but not all. Now I have errors other thank linking:
Linking bacula-fd ... /bin/g++ -L../lib -L../findlib -o bacula-fd filed.o authenticate.o backup.o crypto.o estimate.o fd_plugins.o accurate.o filed_conf.o heartbeat.o hello.o job.o fd_snapshot.o restore.o status.o verify.o verify_vol.o bacl.o bacl_linux.o bacl_osx.o bacl_solaris.o bacl_freebsd.o bxattr.o bxattr_linux.o bxattr_osx.o bxattr_solaris.o bxattr_freebsd.o \ -lz -lbacfind -lbaccfg -lbac -lm -lpthread -ldl -ldl \ -lssl -lcrypto /bin/g++ -static -L../lib -L../findlib -o static-bacula-fd filed.o authenticate.o backup.o crypto.o estimate.o fd_plugins.o accurate.o filed_conf.o heartbeat.o hello.o job.o fd_snapshot.o restore.o status.o verify.o verify_vol.o bacl.o bacl_linux.o bacl_osx.o bacl_solaris.o bacl_freebsd.o bxattr.o bxattr_linux.o bxattr_osx.o bxattr_solaris.o bxattr_freebsd.o \ -lz -lbacfind -lbaccfg -lbac -lm -lpthread -ldl -ldl \ -lssl -lcrypto /bin/ld: cannot find -lz ../lib/libbac.a(plugins.o): In function `load_plugins(void*, void*, char const*, char const*, bool (*)(Plugin*))': /opt/bacula/src/bacula-9.0.6/src/lib/plugins.c:156: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /bin/ld: cannot find -lstdc++ ../lib/libbac.a(priv.o): In function `drop(char*, char*, bool)': /opt/bacula/src/bacula-9.0.6/src/lib/priv.c:83: warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libbac.a(guid_to_name.o): In function `guid_list::gid_to_name(unsigned int, char*, int)': /opt/bacula/src/bacula-9.0.6/src/lib/guid_to_name.c:112: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libbac.a(priv.o): In function `drop(char*, char*, bool)': /opt/bacula/src/bacula-9.0.6/src/lib/priv.c:76: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /opt/bacula/src/bacula-9.0.6/src/lib/priv.c:57: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libbac.a(guid_to_name.o): In function `guid_list::uid_to_name(unsigned int, char*, int)': /opt/bacula/src/bacula-9.0.6/src/lib/guid_to_name.c:99: 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(int, char const*, dlist*)': /opt/bacula/src/bacula-9.0.6/src/lib/bnet.c:345: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open': (.text+0x6a23): warning: the use of `mktemp' is dangerous, better use `mkstemp' ../lib/libbac.a(address_conf.o): In function `add_address(dlist**, IPADDR::i_type, unsigned short, int, char const*, char const*, char*, int) [clone .constprop.4]': /opt/bacula/src/bacula-9.0.6/src/lib/address_conf.c:321: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking collect2: error: ld returned 1 exit status make[1]: *** [static-bacula-fd] Error 1 make[1]: Leaving directory `/opt/bacula/src/bacula-9.0.6/src/filed' ====== Error in /opt/bacula/src/bacula-9.0.6/src/filed ====== make: *** [all] Error 1 [bacula@dvlnx107 bacula-9.0.6]$ Thanks, Mike -----Original Message----- From: Tilman Schmidt [mailto:til...@imap.cc] Sent: Friday, February 09, 2018 8:59 AM To: Mike Eggleston <mike.eggles...@firstcash.com> Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] trying to build a static bacula-fd On Fri, Feb 9, 2018, at 14:26, Mike Eggleston wrote: > Configure complets: > > ./configure --enable-client-only -enable-static-client-only > --enable-static-fd --disable-libtool --without-ssl --without-mysql Good. > The compile now fails with: [...] > /bin/g++ -static -L../lib -L../findlib -o static-bacula-fd filed.o > authenticate.o backup.o crypto.o estimate.o fd_plugins.o accurate.o > filed_conf.o heartbeat.o hello.o job.o fd_snapshot.o restore.o > status.o verify.o verify_vol.o bacl.o bacl_linux.o bacl_osx.o > bacl_solaris.o bacl_freebsd.o bxattr.o bxattr_linux.o bxattr_osx.o > bxattr_solaris.o bxattr_freebsd.o \ > -lz -lbacfind -lbaccfg -lbac -lm -lpthread -ldl -ldl \ > -lssl -lcrypto > /bin/ld: cannot find -lz > /bin/ld: cannot find -lpthread > /bin/ld: cannot find -ldl > /bin/ld: cannot find -ldl > /bin/ld: cannot find -lssl > /bin/ld: cannot find -lcrypto > /bin/ld: cannot find -lstdc++ > /bin/ld: cannot find -lm > /bin/ld: cannot find -lc > collect2: error: ld returned 1 exit status Looks like you don't have static versions of those libraries installed. Something like: yum install libc-static libstdc++-static ... should help. You may have to hunt around a bit for the correct packages to install. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users