New sysutils/bacula-server (7.0.4) can't be built. Looks like it searches libs of bacula-client in wrong place (/usr/lib instead of /usr/local/lib ???). ... c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated --- bacula-dir --- Linking bacula-dir ... /usr/ports/sysutils/bacula-server/work/bacula-7.0.4/libtool --silent --tag=CXX --mode=link /usr/bin/c++ -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 mac.o mac_sql.o mountreq.o msgchan.o next_vol.o newvol.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 -lbacca ts -lbaccfg -lbac -lm -lpthread -lwrap /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lssl -lcrypto /usr/bin/ld: cannot find -lbacfind c++: error: linker command failed with exit code 1 (use -v to see invocation) *** [bacula-dir] Error code 1 make[3]: stopped in /usr/ports/sysutils/bacula-server/work/bacula-7.0.4/src/dird 1 error make[3]: stopped in /usr/ports/sysutils/bacula-server/work/bacula-7.0.4/src/dird ====== Error in /usr/ports/sysutils/bacula-server/work/bacula-7.0.4/src/dird ====== ...
I'm pretty sure it was tested. Over to maintainer (in CC)
It fails during installation directly from ports and even in poudriere.
Indeed it was tested, by both myself and the committer. Here's the redports output for one of my runs: https://redports.org/buildarchive/20140807184600-28511/ Can you show me the output of: uname -a pkg info -x bac
It's a machine where I try to build it from ports tree: root@timbsd:~ # uname -a FreeBSD timbsd 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Tue Jul 8 06:37:44 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 root@timbsd:~ # pkg info -x bac bacula-bat-7.0.4_5 bacula-client-7.0.4 xbacklight-1.2.1_1 xtrabackup-2.1.7_1 And poudriere fail on different machine with same 10.0-RELEASE-p7 amd64.
The link to redports says about version 7.0.4_1, but current ports tree has 7.0.4 Is it important?
(In reply to timp87 from comment #5) > The link to redports says about version 7.0.4_1, but current ports tree has > 7.0.4 > > Is it important? Those runs were based on my redports repo. I have deleted my sysutils directory and reran the build. This would use the FreeBSD ports tree instead. It built: https://redports.org/~dvl/20140808131719-11427-231449/bacula-server-7.0.4.log
I have to come back to this later today.
Can the OP please attcj the full build log?
Hi, sysutils/bacula-server built fine in my poudriere this morning, relevant lines: --- bacula-dir --- Linking bacula-dir ... /wrkdirs/usr/ports/sysutils/bacula-server/work/bacula-7.0.4/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 mac.o mac_sql.o mountreq.o msgchan.o next_vol.o newvol.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 -lbaccats -lbaccfg -lbac -lm -lpthread -lintl -lwrap /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lssl -lcrypto --- all --- ==== Make of dird is good ==== full log here: http://www.madpilot.net/~mad/bacula/bacula-server-7.0.4.log You should really post a link to the full build log, and perhaps give the config.log from the build. If you look the c++ command line above has -L/usr/local/lib as the first option, while yours does not, that's your problem, it could be caused by something in the configure phase of the build.
Created attachment 145526 [details] Bacula build from ports I just build this from ports: # pkg info -x bacula bacula-client-7.0.4 bacula-server-7.0.4 build log attached.
The OP might also want to post this file: # cat /etc/make.conf WRKDIRPREFIX= /var/ports DISTDIR= /var/ports/distfiles PACKAGES= /var/ports/packages INDEXDIR= /var/ports WITH_PKGNG= yes
Created attachment 145528 [details] removes all patches This should fix the options issues. It also removes all patches.
Please ignore the attached patch. Wrong PR. My apologies.
I have nothing in /etc/make.conf Hmm, what I forgot to say is that I'm trying to build it with MYSQL instead of PGSQL. Here is my options: root@timbsd:/usr/ports/sysutils/bacula-server # make showconfig ===> The following configuration options are available for bacula-server-7.0.4: MTX=off: Install mtx for control of autochanger devices MYSQL=on: MySQL database support NLS=on: Native Language Support OPENSSL=on: SSL/TLS support via OpenSSL PGSQL=off: PostgreSQL database support PYTHON=off: Python bindings or support SQLITE3=off: SQLite 3 database support ===> Use 'make config' to modify these settings And I've just tried to build it with PGSQL and, of course, no problem. So try to install it with MYSQL option and I'll see the errors.
Shouldn't be the MYSQL, PGSQL and SQLITE3 options single type? Like OPTIONS_SINGLE= DB OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE
Ahh, thank you. I just compiled with MySQL and reproduced the error. I will find a patch.
(In reply to timp87 from comment #15) > Shouldn't be the MYSQL, PGSQL and SQLITE3 options single type? > Like > OPTIONS_SINGLE= DB > OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE I take your point. Let me see what I can do.
(In reply to timp87 from comment #15) > Shouldn't be the MYSQL, PGSQL and SQLITE3 options single type? > Like > OPTIONS_SINGLE= DB > OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE I see this: OPTIONS_DEFINE?= SQLITE3 MYSQL PGSQL MTX PYTHON NLS OPENSSL
About MYSQL option: I've just noticed that Makefile has a commented line #LDFLAGS+= -L${LOCALBASE}/lib I tried to uncomment it and it worked! About single options: I suggested to make database options single and didn't undestand what you mean.
> About MYSQL option: > I've just noticed that Makefile has a commented line > #LDFLAGS+= -L${LOCALBASE}/lib > I tried to uncomment it and it worked! Yes, looks like this is the problem. Can you confirm? > About single options: > I suggested to make database options single and didn't undestand what you mean. I asked about something like --- Makefile.orig 2014-08-08 23:59:03.000000000 +0400 +++ Makefile 2014-08-09 00:00:11.000000000 +0400 @@ -29,7 +29,9 @@ CPPFLAGS+= -I/usr/include/readline -I${LOCALBASE}/include #LDFLAGS+= -L${LOCALBASE}/lib -OPTIONS_DEFINE?= SQLITE3 MYSQL PGSQL MTX PYTHON NLS OPENSSL +OPTIONS_DEFINE?= MTX PYTHON NLS OPENSSL +OPTIONS_SINGLE= DB +OPTIONS_SINGLE_DB= SQLITE3 MYSQL PGSQL OPTIONS_DEFAULT?= NLS OPENSSL PGSQL MTX_DESC= Install mtx for control of autochanger devices Is it worth?
(In reply to timp87 from comment #20) > > About MYSQL option: > > I've just noticed that Makefile has a commented line > > #LDFLAGS+= -L${LOCALBASE}/lib > > I tried to uncomment it and it worked! > > Yes, looks like this is the problem. Can you confirm? I agree, that is the fix. > > > > > About single options: > > I suggested to make database options single and didn't undestand what you mean. > > I asked about something like > > --- Makefile.orig 2014-08-08 23:59:03.000000000 +0400 > +++ Makefile 2014-08-09 00:00:11.000000000 +0400 > @@ -29,7 +29,9 @@ > CPPFLAGS+= -I/usr/include/readline -I${LOCALBASE}/include > #LDFLAGS+= -L${LOCALBASE}/lib > > -OPTIONS_DEFINE?= SQLITE3 MYSQL PGSQL MTX PYTHON NLS OPENSSL > +OPTIONS_DEFINE?= MTX PYTHON NLS OPENSSL > +OPTIONS_SINGLE= DB > +OPTIONS_SINGLE_DB= SQLITE3 MYSQL PGSQL > OPTIONS_DEFAULT?= NLS OPENSSL PGSQL > MTX_DESC= Install mtx for control of autochanger devices > > Is it worth? Yes, I think so. NOTE: I think it is possible to build bacula-server with support for multiple databases, however the current Makefile does not support that. I'm testing the above options now. I've been making a similar diff.
> Yes, I think so. NOTE: I think it is possible to build bacula-server with support for multiple databases, however the current Makefile does not support that. Looks like it's possible. I tried to build with MYSQL, PGSQL and SQLITE3 together. There were no problems.
(In reply to timp87 from comment #22) > > Yes, I think so. NOTE: I think it is possible to build bacula-server with support for multiple databases, however the current Makefile does not support that. > > Looks like it's possible. I tried to build with MYSQL, PGSQL and SQLITE3 > together. There were no problems. I think we shall leave that option for a future build. In the meantime, I'm getting: You must select one and only one option from the DB single And can't fix that.
Ahh. Here's something for /usr/ports/UPGRADING The config options have changed. You can now select only a single database for bulidling. If you encounter this message: You must select one and only one option from the DB single Please do this: cd /usr/ports/sysutils/bacula-server make rmconfig && make config-recursive
Created attachment 145537 [details] go for single db and make MySQL build work This should work. I may be AFK for the next 48 hours. Any further fixes required for this issue, please proceed without waiting for me.
Created attachment 145538 [details] add entry to UPDATING Please also patch UPDATING
Ready for a committer.
Thank you for reporting this. Sorry I did not test such a major change with MySQL.
IMO, "make rmconfig && make config-recursive" can be replaced with simple "make config"
(In reply to timp87 from comment #29) > IMO, "make rmconfig && make config-recursive" can be replaced with simple > "make config" That was one of the first things I tried. When running make config-recursive, it also redid the bacula-client options.
(In reply to Dan Langille from comment #30) > (In reply to timp87 from comment #29) > > IMO, "make rmconfig && make config-recursive" can be replaced with simple > > "make config" > > That was one of the first things I tried. When running make > config-recursive, it also redid the bacula-client options. OH, that's another thing. The DB options are in effect for the client. That should be changed...
> That was one of the first things I tried. When running make config-recursive, it also redid the bacula-client options. Ah, yea, you're right! > Thank you for reporting this. Sorry I did not test such a major change with MySQL. Thank you for working on that!
(In reply to Dan Langille from comment #31) > (In reply to Dan Langille from comment #30) > > (In reply to timp87 from comment #29) > > > IMO, "make rmconfig && make config-recursive" can be replaced with simple > > > "make config" > > > > That was one of the first things I tried. When running make > > config-recursive, it also redid the bacula-client options. > > OH, that's another thing. The DB options are in effect for the client. > > That should be changed... The SINGLE issue may break slave ports. I think we should save that change for later. For now, lets just fix MySQL.
Created attachment 145539 [details] Allow MySQL option to succeed Please use this patch. Other issues will be fixed in a future PR.
A commit references this bug: Author: wg Date: Sat Aug 9 12:25:09 UTC 2014 New revision: 364431 URL: http://svnweb.freebsd.org/changeset/ports/364431 Log: sysutils/bacula-server: fix build with mysql PR: 192514 Submitted by: maintainer Changes: head/sysutils/bacula-server/Makefile