sysytils/bacula-server link failures WITH_POSTGRESQL

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Jul 19 10:34:02 UTC 2010


Dear port maintainer,

Since version 5.0.2 was committed over the weekend, if you select
WITH_POSTGRESQL in the config dialogue for sysutils/bacula-server, it
fails to link:

Linking bacula-dir ...
/usr/ports/sysutils/bacula-server/work/bacula-5.0.2/libtool --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
/usr/local/lib/libbacsql.so: undefined reference to
`rwl_writelock(s_rwlock_tag*)'
*** Error code 1

This seems to be autoconf / libtool flail: removing -L/usr/local/lib
from LDFLAGS in ${WRKSRC}/src/dird/Makefile,
${WRKSRC}/src/stored/Makefile and ${WRKSRC}/src/tools/Makefile allows
linking to work correctly.

# diff -u Makefile{~,}
--- Makefile~    2010-07-19 10:33:43.000000000 +0100
+++ Makefile    2010-07-19 10:40:07.000000000 +0100
@@ -84,7 +84,7 @@
  CFLAGS = -O2 -pipe -fno-strict-aliasing

  CPPFLAGS = -I/usr/local/include
-LDFLAGS =  -L/usr/local/lib
+LDFLAGS =
  TTOOL_LDFLAGS =
  #DEFS = -DHAVE_CONFIG_H
  LIBS = -lpthread  -lintl

This isn't a problem in the WITH_SQLITE or WITH_MYSQL cases -- neither
of those result in LDFLAGS being set in referenced Makefiles.

Would it be sensible to make either WITH_POSTGRESQL or WITH_MYSQL the
default options setting for this port rather than WITH_SQLITE?  In my
experience for backing up any reasonably sized system, you do need a
fully competent RDBMS for the bacula catalog.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW


More information about the freebsd-ports mailing list