Opened 9 years ago

Closed 8 years ago

#49203 closed defect (fixed)

bacula 7.0.4_1 +client_only +console_bat does not build because it can't find Qt4

Reported by: gullevek (Clemens Schwaighofer) Owned by: robertoschwald (Robert Oschwald)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: torsten.loehr@…, smccandlish@…, m@…, helpdesk@…
Port: bacula

Description

It seems that in this new version the QMAKE and PKG_CONFIG_PATH vars are not carried over into the bacula configure run. It correctly finds + gets the qt4-mac settings, but in the configure from bacula it fails to find QMAKE and Qt4Gui. Qt4-mac was automatically installed into /opt/local/libexec/qt4/

If I add QMAKE='/opt/local/libexec/qt4/bin/qmake' before the QMAKE check and add export PKG_CONFIG_PATH='/opt/local/libexec/qt4/lib/pkgconfig' before the pkg-config check for Qt4 it builds correctly.

Attachments (2)

patch-portfile_qt4-patch.diff (682 bytes) - added by robertoschwald (Robert Oschwald) 9 years ago.
Patch for Portfile to add patch-configure-qt4.diff to bacula_bat variant. Bump revision to 3.
patch-configure-qt4.diff (435 bytes) - added by robertoschwald (Robert Oschwald) 9 years ago.
Patch for configure to support MacPorts Qt4 when bacula_bat variant is active.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: bacula bat qt4-mac removed
Owner: changed from macports-tickets@… to robertoschwald@…

comment:2 Changed 9 years ago by clemente.aguiar@…

I have exactly the same problem:

:info:configure configure: error: Unable to find Qt4 installation needed by bat
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_bacula/bacula/work/bacula-7.0.4" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --docdir=/opt/local/share/doc/bacula --datarootdir=/opt/local/share --with-pid-dir=/opt/local/var/run --with-subsys-dir=/opt/local/var/run/subsys --sysconfdir=/opt/local/etc/bacula --with-libintl-prefix=/opt/local --with-openssl=/opt/local --with-libiconv-prefix=/opt/local --with-archivedir=/var/tmp --with-working-dir=/opt/local/var/bacula/working --with-included-gettext=/opt/local --enable-smartalloc --enable-largefile --enable-conio --without-sqlite3 --without-postgresql --without-mysql --with-tcp-wrappers --enable-client-only --enable-bat 
:info:configure Exit code: 1
:error:configure Failed to configure bacula, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_bacula/bacula/work/bacula-7.0.4/config.log
:error:configure org.macports.configure for port bacula returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
    while executing
"portconfigure::configure_main org.macports.configure"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:configure Warning: targets not executed for bacula: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Please see the log file for port bacula for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_bacula/bacula/main.log

Last edited 9 years ago by clemente.aguiar@… (previous) (diff)

comment:3 Changed 9 years ago by torsten.loehr@…

Same problem here. gullevek could you please tell us more about Your workaround. I changed the configure, but it keeps rolling back.

comment:4 Changed 9 years ago by torsten.loehr@…

Cc: torsten.loehr@… added

Cc Me!

comment:5 Changed 9 years ago by robertoschwald (Robert Oschwald)

I look into it. I also want to remove bacula-bat to be generated when client-only is selected, as most of the time we need a pure bacula-fd client.

If one needs the gui, he can additionally install bacula-gui (thats the plan).

comment:6 in reply to:  5 Changed 9 years ago by gullevek (Clemens Schwaighofer)

Replying to robertoschwald@…:

I look into it. I also want to remove bacula-bat to be generated when client-only is selected, as most of the time we need a pure bacula-fd client.

If one needs the gui, he can additionally install bacula-gui (thats the plan).

I just post the correct solution to this issue here if other people have the same problem (as it is still not fixed with port bacula 7.0.4)

In the configure file search for "Unable to find Qt4 installation" and add the following two lines above the "abc=$PKGCONFIG --atleast ... part export QMAKE='/opt/local/libexec/qt4/bin/qmake' export PKG_CONFIG_PATH='/opt/local/libexec/qt4/lib/pkgconfig'

Then you can run the normal build command in ports

comment:7 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: smccandlish@… added

Has duplicate #50538.

comment:8 Changed 9 years ago by m@…

So i pasted the 2 lines above the abc= .....

See:

BAT_DIR=
if test x$support_bat = xyes; then
   
	export QMAKE='/opt/local/libexec/qt4/bin/qmake'
	export PKG_CONFIG_PATH='/opt/local/libexec/qt4/lib/pkgconfig'
   
   abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
   pkg=$?
   if test $pkg = 0; then
      BAT_DIR=src/qt-console
   else
      AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
   fi
fi

But if i see the script PKG_CONFIG_PATH should be PKGCONFIG is this correct?

comment:9 Changed 9 years ago by m@…

Cc: m@… added

Cc Me!

comment:10 Changed 9 years ago by m@…

Finaly i found it.

I used these commands to set te directorie to qy4

sudo cp -R /opt/local/libexec/qt4/lib/pkgconfig/ /opt/local/share/pkgconfig

and

sudo ln -s /opt/local/libexec/qt4/bin/* /opt/local/bin

comment:11 Changed 9 years ago by robertoschwald (Robert Oschwald)

But if i see the script PKG_CONFIG_PATH should be PKGCONFIG is this correct?

No. PGK_CONFIG_PATH is the env var for pkgconfig to find additional packages.

sudo cp -R /opt/local/libexec/qt4/lib/pkgconfig/ /opt/local/share/pkgconfig

Shouldn't be needed, as the PGK_CONFIG_PATH var is set correctly. I will investigate why qt4 packages are not found.

comment:12 Changed 9 years ago by m@…

Its not the packeges that can't be found but a folder. See my previeuws comment.

Changed 9 years ago by robertoschwald (Robert Oschwald)

Patch for Portfile to add patch-configure-qt4.diff to bacula_bat variant. Bump revision to 3.

Changed 9 years ago by robertoschwald (Robert Oschwald)

Attachment: patch-configure-qt4.diff added

Patch for configure to support MacPorts Qt4 when bacula_bat variant is active.

comment:13 Changed 9 years ago by robertoschwald (Robert Oschwald)

Attached are a patch file for qt4 configuration and a patch file for the Portfile (which bumps revision to 3).

One with commit-rights needs to add the qt4 patch file to the files dir and patch the Portfile accordinghly to get fix this issue.

I do not have commit rights and therefore will remove myself as maintainer, soon.

comment:14 Changed 9 years ago by mf2k (Frank Schima)

You do not need to have commit rights to be a maintainer. If you remove yourself as maintainer, this port (like all unmaintained ports) will rarely ever get updates or fixes.

comment:15 Changed 9 years ago by robertoschwald (Robert Oschwald)

Ok. But it is not funny at all to maintain ports if you do not have the rights to do so. I even could not close tickets which are e.g. duplicates of this one, like #51272. "Maintainer" to me means something different than this.

Frank, could you please apply the attached patches so we can close this ticket? Thanks.

comment:16 Changed 9 years ago by mf2k (Frank Schima)

Cc: helpdesk@… added

Cc reporter of duplicate #51272.

comment:17 Changed 8 years ago by fbacchella (Fabrice Bacchella)

Any progress ?

comment:18 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: newclosed

Commited in r153697. Thank you for your submission, sorry it took so long.

Note: See TracTickets for help on using tickets.