>>>>> On Wed, 13 Feb 2019 12:13:07 -0700, Bill Arlofski said:
> 
> I am having an issue compiling the 9.4.2 source on two different systems.
> 
> One system is Gentoo, the second is Arch Linux. The error is the same while 
> compiling "authenticate.c" in the src/console directory tree.
> 
> My configure command is the same as I always used (stolen from what the 
> Gentoo 
> package does, with just the version numbers changed to 9.4.2):
> ----8<----
> ./configure --prefix=/usr --build=x86_64-pc-linux-gnu 
> --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info 
> --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-acl 
> --libdir=/usr/lib64 --docdir=/usr/share/doc/bacula-9.4.2 
> --htmldir=/usr/share/doc/bacula-9.4.2/html --with-pid-dir=/var/run 
> --sysconfdir=/etc/bacula --with-subsys-dir=/var/lock/subsys 
> --with-working-dir=/var/lib/bacula --with-logdir=/var/lib/bacula 
> --with-scriptdir=/usr/libexec/bacula --with-systemd=/usr/lib/systemd/system 
> --with-dir-user=bacula --with-dir-group=bacula --with-sd-user=root 
> --with-sd-group=bacula --with-fd-user=root --with-fd-group=bacula 
> --enable-smartalloc --disable-afs --host=x86_64-pc-linux-gnu 
> --disable-build-dird --enable-build-stored --with-sqlite3 
> --enable-batch-insert --disable-bat --without-x --disable-conio 
> --enable-readline --with-readline=/usr --with-openssl --enable-ipv6 
> --with-tcp-wrappers
> ----8<----
> 
> 
> Tail end of the make output:
> ----8<----
> ==== Make of filed is good ====
> make[1]: Leaving directory '/usr/local/src/bacula-9.4.2/src/filed'
> ==>Entering directory /usr/local/src/bacula-9.4.2/src/console
> make[1]: Entering directory '/usr/local/src/bacula-9.4.2/src/console'
> Compiling console.c
> Compiling console_conf.c
> Compiling authenticate.c
> /usr/local/src/bacula-9.4.2/libtool --silent --tag=CXX --mode=link 
> /usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0/x86_64-pc-linux-gnu-g++  -L/usr/lib 
> -L../lib -L../cats -o bconsole console.o console_conf.o authenticate.o  \
> -lreadline -lhistory -lncurses -lbaccfg -lbac -lm -lpthread -ldl -ldl   \
> -lssl -lcrypto
> console.o: In function `get_arguments(char const*)':
> /usr/local/src/bacula-9.4.2/src/console/console.c:545: undefined reference to 
> `BSOCKCORE::fsend(char const*, ...)'
> console.o: In function `get_items(char const*)':
> /usr/local/src/bacula-9.4.2/src/console/console.c:559: undefined reference to 
> `BSOCKCORE::fsend(char const*, ...)'
> console.o: In function `read_and_process_input(_IO_FILE*, BSOCK*)':
> /usr/local/src/bacula-9.4.2/src/console/console.c:307: undefined reference to 
> `BSOCKCORE::fsend(char const*, ...)'
> console.o: In function `putfilecmd(_IO_FILE*, BSOCK*)':
> /usr/local/src/bacula-9.4.2/src/console/console.c:1685: undefined reference 
> to 
> `BSOCKCORE::fsend(char const*, ...)'
> console.o: In function `main':
> /usr/local/src/bacula-9.4.2/src/console/console.c:1315: undefined reference 
> to 
> `BSOCKCORE::connect(JCR*, int, long, long, char const*, char*, char*, int, 
> int)'
> /usr/local/src/bacula-9.4.2/src/console/console.c:1317: undefined reference 
> to 
> `BSOCKCORE::destroy()'
> console.o: In function `select_director':
> /usr/local/src/bacula-9.4.2/src/console/console.c:1038: undefined reference 
> to 
> `BSOCKCORE::destroy()'
> authenticate.o: In function `authenticate_director(BSOCK*, DIRRES*, CONRES*)':
> /usr/local/src/bacula-9.4.2/src/console/authenticate.c:115: undefined 
> reference to `BSOCKCORE::fsend(char const*, ...)'
> /usr/local/src/bacula-9.4.2/src/console/authenticate.c:154: undefined 
> reference to `BSOCKCORE::bstrerror()'
> /usr/local/src/bacula-9.4.2/src/console/authenticate.c:144: undefined 
> reference to `BSOCKCORE::free_tls()'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:153: bconsole] Error 1
> make[1]: Leaving directory '/usr/local/src/bacula-9.4.2/src/console'
> ====== Error in /usr/local/src/bacula-9.4.2/src/console ======
> ----8<----

Do either /usr/lib/libbac.so or /usr/lib/libbac.a exist on that machine, from
an older version of Bacula?  Your linker command has -L/usr/lib before
-L../lib and -L../cats, so that would cause it to link with the old lib
instead of the newly built one.

If that is the problem, then you might be able to fix it by finding out what
added -L/usr/lib in the linker command line before -L../lib.

The long term fix is to only install numbered libraries in /usr/lib, not the
plain libbac.so.

__Martin


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to