Bug 316416 - compiling error when qt4 and qt5 are installed
Summary: compiling error when qt4 and qt5 are installed
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: GIT (master)
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-09 13:52 UTC by Johannes K.
Modified: 2013-03-15 15:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.9.2


Attachments
cmake and make output (70.49 KB, text/plain)
2013-03-10 12:48 UTC, Johannes K.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes K. 2013-03-09 13:52:48 UTC
Hi

I have qt4 and qt5 installed but I try to install compile kde only with qt4 support by adding this option

-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4

to cmake.
Somehow some application still check for qt5 e.g. akonadi.
But it gives me the following compilation error

Linking CXX executable ../bin/akonadi_agent_server
CMakeFiles/akonadi_agent_server.dir/agentserver.cpp.o: In function `Akonadi::AgentServer::startAgent(QString const&, QString const&, QString const&)':
/home/joker/kdesrc/kdesupport/akonadi/agentserver/agentserver.cpp:66: undefined reference to `akDebug()'

Any Ideas why? Is there a possibility to prevent akonadi and other kde application to compile for qt5?

Thanks for your great work

Reproducible: Always
Comment 1 Christophe Marin 2013-03-10 10:30:18 UTC
>Linking CXX executable ../bin/akonadi_agent_server
CMakeFiles/akonadi_agent_server.dir/agentserver.cpp.o: In function `Akonadi::AgentServer::startAgent(QString const&, QString const&, QString const&)':
>/home/joker/kdesrc/kdesupport/akonadi/agentserver/agentserver.cpp:66: undefined reference to `akDebug()'

It would help if you build with 'VERBOSE=1 make -j1' and paste the command that leads to this error (the line that's just before)
Comment 2 Johannes K. 2013-03-10 12:48:52 UTC
Created attachment 77913 [details]
cmake and make output
Comment 3 Johannes K. 2013-03-10 12:49:53 UTC
Hi

Thanks a lot for your reply.
I just attached the requested output.
Comment 4 Christophe Marin 2013-03-13 18:35:52 UTC
I tested both the Qt4 & Qt5 build. So far, no issue. I can only assume your build error comes from the arch linux decision to make qmake point to the Qt5 version.

Please also read this thread: http://mail.kde.org/pipermail/kde-buildsystem/2013-March/009166.html

Now, I'm also not convinced it makes any sense to build Akonadi using Qt5 for the moment.
Comment 5 Johannes K. 2013-03-15 08:17:00 UTC
Hi Christophe

Thanks a lot for your response.

Yes, I only wanna compile it for qt4 for now.

I just tried to recompile akonadi and now this error didn't show up anymore.
Though I had a different error which probably is due to the fact that I didn't recompile the other apps with qt5 installed.

I tried to prevent the use of the qt5 libs by reordering the qmake list in FindQt4.cmake but it didn't have an effect...
Comment 6 Christophe Marin 2013-03-15 08:37:10 UTC
I've no idea how arch packages things. Are the development and runtime files shipped together or in different packages ?
Comment 7 Johannes K. 2013-03-15 09:20:57 UTC
They ship it with the development files. See here:

http://unix.stackexchange.com/questions/28972/why-are-there-no-dev-packages-in-arch-linux
Comment 8 Christophe Marin 2013-03-15 15:46:41 UTC
Git commit d73b5301992ad8152a296ccb9de00c8f2fc3901f by Christophe Giboudeaux.
Committed on 15/03/2013 at 16:46.
Pushed by cgiboudeaux into branch '1.9'.

Add an option to choose which Qt version we need
Previously we were looking for Qt5 first then Qt4 as a fallback. This fails for arch linux users.

passing -DQT5_BUILD=TRUE is now necessary to build Akonadi with Qt5.
FIXED-IN: 1.9.2

M  +10   -10   CMakeLists.txt

http://commits.kde.org/akonadi/d73b5301992ad8152a296ccb9de00c8f2fc3901f