Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 512726 - net-misc/owncloud-client-1.6.0 with Qt5 - CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find Qt5Keychain (missing: QTKEYCHAIN_LIBRARY
Summary: net-misc/owncloud-client-1.6.0 with Qt5 - CMake Error at /usr/share/cmake/Mod...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
Depends on:
Blocks: qt5-porting
  Show dependency tree
Reported: 2014-06-08 11:14 UTC by Jérôme Borme
Modified: 2014-06-30 21:19 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---

net-misc:owncloud-client-1.6.0:20140608-111851.log (net-misc:owncloud-client-1.6.0:20140608-111851.log,5.09 KB, text/plain)
2014-06-08 11:31 UTC, Jeroen Roovers (RETIRED)
emerge--info (emerge_info.txt,4.86 KB, text/plain)
2014-06-08 13:56 UTC, Jérôme Borme
owncloud-client-1.6.0 build log (build-owncloud-client.log,4.82 KB, text/plain)
2014-06-08 14:00 UTC, Jérôme Borme
Patch allows to build with qt4 if qt5 is installed on the system. (owncloud-client-1.6.0_ignore_qt5.patch,1.06 KB, patch)
2014-06-16 12:16 UTC, Jan-Matthias Braun
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme Borme 2014-06-08 11:14:31 UTC
If qt5 is installed, net-misc/owncloud-client depends on dev-qt/qtprintsupport, dev-qt/linguist-tools, dev-libs/qtkeychain[qt5]

If qt5 (-core, -gui) is installed, then the build script will use it instead of qt 4.8. If then in this situation, owncloud depends on dev-qt/qtprintsupport (qt overlay), dev-qt/linguist-tools (qt overlay), dev-libs/qtkeychain (main tree).

Typical message in the configure step is:

CMake Error at cmake/modules/QtVersionAbstraction.cmake:19 (find_package):
  By not providing "FindQt5PrintSupport.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5PrintSupport", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5PrintSupport"
  with any of the following names:


I can't say for more, on my system qtkeychain won't compile with qt5, although from the ebuild it seems it should.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-08 11:18:37 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-08 11:31:35 UTC
Created attachment 378460 [details]
Comment 3 Jérôme Borme 2014-06-08 13:56:32 UTC
Created attachment 378498 [details]

As per request.
Comment 4 Jérôme Borme 2014-06-08 14:00:02 UTC
Created attachment 378502 [details]
owncloud-client-1.6.0 build log

Note that this bug report has several related issues:

1. There should be a USE flag in owncloud-client for qt5 and qt4.
2. In case of USE=qt5, the ebuild should depend on dev-qt/qtprintsupport, dev-qt/linguist-tools, dev-libs/qtkeychain[qt5] (perhaps more)
3. And finally, as it happens, owncloud-client-1.6.0 does not build even when qtkeychain is installed.

Regarding the last point, it seems that dev-libs/qtkeychain-0.3.0 refuses to build with qt5 support, and this could be why owncloud-client then does not find the lib.

Here is what happens when I try to force qtkeychain to build with qt5:

# USE="-qt4 qt5" emerge --ask qtkeychain

These are the packages that would be merged, in order:

Calculating dependencies |

!!! Problem resolving dependencies for dev-libs/qtkeychain                    ... done!

!!! The ebuild selected to satisfy "qtkeychain" has unmet requirements.
- dev-libs/qtkeychain-0.3.0::gentoo USE="-qt4 (-qt5)"

  The following REQUIRED_USE flag constraints are unsatisfied:
    any-of ( qt4 qt5 )
Comment 5 Jouni Kosonen 2014-06-08 14:49:28 UTC
(In reply to Jérôme Borme from comment #4)
dev-libs/qtkeychain allows building for *both* qt4 and qt5, it's just that the qt5 use flag is currently masked in profiles/base/use.mask .

These were enough to get owncloud-client compile and install here:

/etc/portage/profile/package.use.mask/qt5: dev-libs/qtkeychain -qt5
/etc/portage/package.use/qt5: dev-libs/qtkeychain qt4 qt5
Comment 6 Jérôme Borme 2014-06-08 15:39:01 UTC
(In reply to Jouni Kosonen from comment #5)
Thanks, it worked.
Comment 7 Andrius Štikonas 2014-06-11 11:31:33 UTC
(In reply to Jérôme Borme from comment #6)
> (In reply to Jouni Kosonen from comment #5)
> Thanks, it worked.

It compiles here but complains that system tray is required.
Comment 8 Jérôme Borme 2014-06-12 08:40:58 UTC
(In reply to Andrius Štikonas from comment #7)
> It compiles here but complains that system tray is required.

Yes same error here. After uninstalling qt5 and emerging again owncloud-client-1.6.0, it launches and finds the system tray just as previous versions did. (My system tray is from fluxbox.)
Comment 9 Michael Hampicke 2014-06-12 16:24:39 UTC
Having the same problem here (systray missing). Is it possible to have qt4 and qt5 installed in slots and compile owncloud-client against qt4?
Comment 10 Jérôme Borme 2014-06-12 17:13:19 UTC
(In reply to Michael Hampicke from comment #9)
> Is it possible to have qt4 and qt5 installed in slots and compile 
> owncloud-client against qt4?

Someone needs to spend time working on the ebuild to make this possible, but as a temporary workaround I uninstalled qt5 to compile owncloud-client, then installed qt5 again from binary packages I prepared in advance. Instructions:

export LIST="=qtdbus-5.3.0 =qtnetwork-5.3.0 =qtopengl-5.3.0 =qtdeclarative-5.3.0 =qtprintsupport-5.3.0 =qtkeychain-0.3.0 =qtwebkit-5.3.0 =qtcore-5.3.0 =qtgui-5.3.0 =qtsvg-5.3.0 =qtwidgets-5.3.0 =qtxmlpatterns-5.3.0 =qtsql-5.3.0 =qtscript-5.3.0 =qttest-5.3.0 =qtxml-5.3.0 =linguist-tools-5.3.0"
quickpkg $LIST
emerge --unmerge $LIST
emerge =net-misc/owncloud-client-1.6.0
emerge --getbinpkgonly $LIST

I expected some trouble with qtkeychain as in this procedure, owncloud-client is linked with qtkeychain compiled only with qt4, and in the end qtkeychain is overwritten with a version compiled prepared for both qt4 and qt5. But I had no problem.
Comment 11 Michael Palimaka (kensington) gentoo-dev 2014-06-12 17:27:20 UTC
You can force a Qt 4 build with -DBUILD_WITH_QT4=ON.
Comment 12 Martin Gysel (bearsh) 2014-06-14 12:55:01 UTC
(In reply to Jérôme Borme from comment #0)

for a qt5 build
also seems to be requiered
Comment 13 Jan-Matthias Braun 2014-06-16 12:16:32 UTC
Created attachment 379022 [details, diff]
Patch allows to build with qt4 if qt5 is installed on the system.

I have taken the information from the previous comments to update the ebuild.

USE flags qt4 and qt5 are now available, which will depend on the corresponding SLOTs. I have included the mentioned additional packages.

qt5 will be ignored, if the qt4 USE flag is enabled.

Caution: I have *not tested to install* the ebuild with qt5 USE flag enabled. I have only tested, if emerge could resolve the dependencies. Therefore, it is probable, that it won't work.
Comment 14 Thomas Capricelli 2014-06-23 22:43:39 UTC
got hit by a similar problem today with portage updated few hours ago. I dont need/want owncloud to be built against qt5, i dont really care as far as it works.

net-misc/owncloud-client-1.6.0 fails with : 

/usr/bin/x86_64-pc-linux-gnu-g++   -march=native -pipe -O2  -Wall -Wextra -Wpedantic -Wno-long-long -fPIC   -Wl,-O1 -Wl,--as-needed CMakeFiles/owncloudcmd.dir/owncloudcmd/simplesslerrorhandler.cpp.o CMakeFiles/owncloudcmd.dir/owncloudcmd/owncloudcmd.cpp.o CMakeFiles/owncloudcmd.dir/owncloudcmd_automoc.cpp.o  -o ../bin/owncloudcmd -rdynamic /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ ../csync/src/ ../csync/src/std/libcstdlib.a -lrt -ldl -lsqlite3 ../csync/src/httpbf/libhttpbf.a -lqt5keychain -lneon -Wl,-rpath,/tmp/portage/net-misc/owncloud-client-1.6.0/work/owncloud-client-1.6.0_build/src:/tmp/portage/net-misc/owncloud-client-1.6.0/work/owncloud-client-1.6.0_build/csync/src: 
/usr/lib64/ undefined reference to `QOpenGLContext::isES() const'
collect2: error: ld returned 1 exit status

cmake output says this :

-- Found Qt5 core, checking for further dependencies...
-- Using Qt 5!
-- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "0.28") 
-- checking for module 'neon'
--   found neon, version 0.30.0
-- Found Neon: /usr/lib64/  
-- neon-config executable: /usr/bin/neon-config
-- libneon has not been compiled with LFS support, rely on OS
-- Found Qt5Keychain: /usr/lib64/
Comment 15 Bernard Cafarelli gentoo-dev 2014-06-26 15:42:04 UTC
Thanks for the report and suggestions, I'll get this fixed before bumping to 1.6.1 (though the qt5 parts will be untested as I do not have it installed)
Comment 16 Bernard Cafarelli gentoo-dev 2014-06-27 14:55:35 UTC
All suggestions (and a few additional changes) merged in 1.6.1 ebuild, thanks everybody!
Comment 17 Thomas Capricelli 2014-06-27 20:28:48 UTC
tested today. Works with USE="qt4 -qt5". Thanks!

As a side note, with "qt4 qt5", there's no error, though i haven't been until the end of compilation. Usually there's a rule "only one of" in the ebuild.
Comment 18 Jérôme Borme 2014-06-28 16:40:20 UTC
(In reply to Thomas Capricelli from comment #17)
> As a side note, with "qt4 qt5", there's no error, though i haven't been
> until the end of compilation.

I tested all cases:
* USE="-qt4 -qt5" -> not possible to resolve dependencies
* USE="-qt4 qt5" -> links with qt5 (and executable complains of lack of of system tray)
* USE="qt4 -qt5" -> links with qt4 and runs normally
* USE="qt4 qt5" -> also links with qt4 and runs normally
Comment 19 Bernard Cafarelli gentoo-dev 2014-06-30 21:19:25 UTC
Thanks for the tests, I updated the REQUIRED_USE line to require qt4 or qt5, but not both (as other applications currently do)