Bug 192514 - can't update sysutils/bacula-server to 7.0.4
Summary: can't update sysutils/bacula-server to 7.0.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-08 13:01 UTC by Pavel Timofeev
Modified: 2014-08-09 12:27 UTC (History)
4 users (show)

See Also:


Attachments
Bacula build from ports (94.19 KB, text/plain)
2014-08-08 16:09 UTC, Dan Langille
no flags Details
removes all patches (22.66 KB, patch)
2014-08-08 16:55 UTC, Dan Langille
no flags Details | Diff
go for single db and make MySQL build work (747 bytes, patch)
2014-08-08 20:30 UTC, Dan Langille
no flags Details | Diff
add entry to UPDATING (811 bytes, patch)
2014-08-08 20:36 UTC, Dan Langille
no flags Details | Diff
Allow MySQL option to succeed (583 bytes, patch)
2014-08-08 20:47 UTC, Dan Langille
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2014-08-08 13:01:04 UTC
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 ======

...
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-08 13:06:29 UTC
I'm pretty sure it was tested.

Over to maintainer (in CC)
Comment 2 Pavel Timofeev 2014-08-08 13:08:04 UTC
It fails during installation directly from ports and even in poudriere.
Comment 3 Dan Langille freebsd_committer freebsd_triage 2014-08-08 13:11:10 UTC
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
Comment 4 Pavel Timofeev 2014-08-08 13:14:11 UTC
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.
Comment 5 Pavel Timofeev 2014-08-08 13:18:46 UTC
The link to redports says about version 7.0.4_1, but current ports tree has 7.0.4

Is it important?
Comment 6 Dan Langille freebsd_committer freebsd_triage 2014-08-08 13:21:19 UTC
(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
Comment 7 Dan Langille freebsd_committer freebsd_triage 2014-08-08 13:21:43 UTC
I have to come back to this later today.
Comment 8 Dan Langille freebsd_committer freebsd_triage 2014-08-08 15:51:27 UTC
Can the OP please attcj the full build log?
Comment 9 Guido Falsi freebsd_committer freebsd_triage 2014-08-08 15:56:45 UTC
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.
Comment 10 Dan Langille freebsd_committer freebsd_triage 2014-08-08 16:09:49 UTC
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.
Comment 11 Dan Langille freebsd_committer freebsd_triage 2014-08-08 16:16:20 UTC
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
Comment 12 Dan Langille freebsd_committer freebsd_triage 2014-08-08 16:55:01 UTC
Created attachment 145528 [details]
removes all patches

This should fix the options issues.  It also removes all patches.
Comment 13 Dan Langille freebsd_committer freebsd_triage 2014-08-08 16:55:43 UTC
Please ignore the attached patch.  Wrong PR.  My apologies.
Comment 14 Pavel Timofeev 2014-08-08 19:22:50 UTC
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.
Comment 15 Pavel Timofeev 2014-08-08 19:27:38 UTC
Shouldn't be the MYSQL, PGSQL and SQLITE3 options single type?
Like
OPTIONS_SINGLE= DB
OPTIONS_SINGLE_DB=      MYSQL PGSQL SQLITE
Comment 16 Dan Langille freebsd_committer freebsd_triage 2014-08-08 19:33:23 UTC
Ahh, thank you.  I just compiled with MySQL and reproduced the error.  I will find a patch.
Comment 17 Dan Langille freebsd_committer freebsd_triage 2014-08-08 19:34:07 UTC
(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.
Comment 18 Dan Langille freebsd_committer freebsd_triage 2014-08-08 19:35:00 UTC
(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
Comment 19 Pavel Timofeev 2014-08-08 19:51:35 UTC
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.
Comment 20 Pavel Timofeev 2014-08-08 20:02:00 UTC
> 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?
Comment 21 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:05:58 UTC
(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.
Comment 22 Pavel Timofeev 2014-08-08 20:10:49 UTC
> 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.
Comment 23 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:12:26 UTC
(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.
Comment 24 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:28:13 UTC
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
Comment 25 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:30:15 UTC
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.
Comment 26 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:36:24 UTC
Created attachment 145538 [details]
add entry to UPDATING

Please also patch UPDATING
Comment 27 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:36:56 UTC
Ready for a committer.
Comment 28 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:37:40 UTC
Thank you for reporting this.  Sorry I did not test such a major change with MySQL.
Comment 29 Pavel Timofeev 2014-08-08 20:38:28 UTC
IMO, "make rmconfig && make config-recursive" can be replaced with simple "make config"
Comment 30 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:40:03 UTC
(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.
Comment 31 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:41:58 UTC
(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...
Comment 32 Pavel Timofeev 2014-08-08 20:42:28 UTC
> 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!
Comment 33 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:43:55 UTC
(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.
Comment 34 Dan Langille freebsd_committer freebsd_triage 2014-08-08 20:47:41 UTC
Created attachment 145539 [details]
Allow MySQL option to succeed

Please use this patch.  Other issues will be fixed in a future PR.
Comment 35 commit-hook freebsd_committer freebsd_triage 2014-08-09 12:26:03 UTC
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