From owner-freebsd-ports@FreeBSD.ORG Wed Jul 21 11:57:51 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72E941065670; Wed, 21 Jul 2010 11:57:51 +0000 (UTC) (envelope-from dan@langille.org) Received: from nyi.unixathome.org (nyi.unixathome.org [64.147.113.42]) by mx1.freebsd.org (Postfix) with ESMTP id 419DB8FC16; Wed, 21 Jul 2010 11:57:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by nyi.unixathome.org (Postfix) with ESMTP id ADB8250B7B; Wed, 21 Jul 2010 12:57:50 +0100 (BST) X-Virus-Scanned: amavisd-new at unixathome.org Received: from nyi.unixathome.org ([127.0.0.1]) by localhost (nyi.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j2JE80fj64-e; Wed, 21 Jul 2010 12:57:49 +0100 (BST) Received: from smtp-auth.unixathome.org (smtp-auth.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) by nyi.unixathome.org (Postfix) with ESMTPSA id 7177450B7A ; Wed, 21 Jul 2010 12:57:49 +0100 (BST) Message-ID: <4C46E0BA.4070602@langille.org> Date: Wed, 21 Jul 2010 07:57:46 -0400 From: Dan Langille Organization: The FreeBSD Diary User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Wesley Shields References: <4C442A0C.5050708@infracaninophile.co.uk> <20100721020738.GA21274@atarininja.org> In-Reply-To: <20100721020738.GA21274@atarininja.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: sysytils/bacula-server link failures WITH_POSTGRESQL X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 11:57:51 -0000 On 7/20/2010 10:07 PM, Wesley Shields wrote: > On Mon, Jul 19, 2010 at 11:33:48AM +0100, Matthew Seaman wrote: >> >> 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. > > After talking to Dan briefly this is a known problem with upgrades. It > looks like the build process looks in /usr/local/lib instead of using > the libraries it just built when it does the linking. It finds the old > library, which is missing the newer symbols, and fails to link. By > pushing /usr/local/lib after the rest of the -L arguments in the > necessary places this appears to build properly now. I'd appreciate > further testing of the patch. Your initial patch is only applicable > after the Makefiles have been generated by configure. > > Dan, my initial testing indicates that this allows the port to build. > I'd appreciate another set of eyeballs on it though. Please let me know > if you would like me to commit this patch or not. > > http://people.freebsd.org/~wxs/bacula-unbreak.diff I'd like to pass this URL on to the bacula-devel mailing list please. That OK with you? -- Dan Langille - http://langille.org/