Cmake can't find QT libraries

If it doesn't fit in another category, ask it here.
Post Reply
gerhard54
Posts: 5
Joined: 2011/03/15 16:00:26

Cmake can't find QT libraries

Post by gerhard54 » 2011/03/16 10:48:46

I tried to compile tfla (The Fabolous Logic Analyzer) from the sources and run into the problem, that cmake does not find the qt libraries.
I am quite sure all necessary packages are installed:
[code]
[root@localhost ~]# yum list "qt*"
....
Installed Packages
qt.i386 1:3.3.6-23.el5 installed
qt-designer.i386 1:3.3.6-23.el5 installed
qt-devel.i386 1:3.3.6-23.el5 installed
qt4.i386 4.2.1-1 installed
qt4-devel.i386 4.2.1-1 installed

Available Packages
qt-MySQL.i386 1:3.3.6-23.el5 base
qt-ODBC.i386 1:3.3.6-23.el5 base
qt-PostgreSQL.i386 1:3.3.6-23.el5 base
qt-config.i386 1:3.3.6-23.el5 base
qt-devel-docs.i386 1:3.3.6-23.el5 base
qt4-doc.i386 4.2.1-1 base
qt4-mysql.i386 4.2.1-1 base
qt4-odbc.i386 4.2.1-1 base
qt4-postgresql.i386 4.2.1-1 base
qt4-sqlite.i386 4.2.1-1 base
qtnx.i386 0.9.0-3.el5.centos extras
[/code]
The error message from cmake is:
[code]
[root@localhost build]# cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Qt QTGUI library not found.
Qt QTNETWORK library not found.
Qt QTCORE library not found.
-- Found ieee1284: /usr/lib/libieee1284.so
CMake Error at src/CMakeLists.txt:83 (QT4_ADD_TRANSLATION):
Unknown CMake command "QT4_ADD_TRANSLATION".
[/code]
Has any one encountered a similar proplem and (hopfully) found the solution?

Gerhard

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Cmake can't find QT libraries

Post by pschaff » 2011/03/16 15:26:34

Welcome to the CentOS fora. Reading [url=https://www.centos.org/modules/newbb/viewforum.php?forum=47]FAQ & Readme First[/url] is recommended for new users.

Presumably you mean [url=http://www.google.com/search?q=The+Fabulous+Logic+Analyzer&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&safe=active]The Fabulous Logic Analyzer[/url]. I'd search for a [url=http://www.google.com/search?q=tfla+%22src.rpm%22&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&safe=active]SRPM[/url] and follow [url=http://wiki.centos.org/HowTos/RebuildSRPM]How to Rebuild a Source RPM[/url] to get all the build dependencies correct, and just because it is the [i][b]Right Way [TM][/b][/i] to [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]install software[/url]. :-)

gerhard54
Posts: 5
Joined: 2011/03/15 16:00:26

Re: Cmake can't find QT libraries

Post by gerhard54 » 2011/03/16 20:44:25

Hello Phil,

yes, I was referring to "The Fabulous Logic Analyzer", sorry for the misspelling.

I followed the links you provided, but excuse me, I'm not able to find out how they could help me with my problem.

Yes, I know CentOS is focused on stability and what I try to to do might break this principle. But I am setting up a system to develop µP-based devices. So its about getting it running and using it, not keeping up with updates and fixes. Security is not an issue, as this system will be connected only to my intranet ...

All of this software is NOT available for CentOS (or most other distros) as an rpm or srpm, but I was always able to compile it myself.
With CentOS I ran into this problem with tfla, which is an absolute show stopper for the intended purpose.

Background:
Up to now I used various Suse releases, but got fed up with their shady quality.
Therefore I thought about switching to CentOS.
I set up a trial installation in an virtual environment to find out if the necessary software (kontrollerlab, xoscope, tfla, ...) could be made to work. Unfortunately tfla refuses to compile...

So: can anyone help me just with that problem of making cmake find the QT-libraries?


Gerhard

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Cmake can't find QT libraries

Post by pschaff » 2011/03/16 21:43:37

Did some more looking. I can replicate your error trying to rebuild [url=http://195.135.221.132/repositories/electronics/SLE_11/src/tfla-01-0.5.0-2.1.src.rpm]a SRPM[/url], after making some changes in build dependencies to adapt for CentOS. Seems the CentOS cmake and/or QT may not be recent enough. QT4_ADD_TRANSLATION is a [url=http://www.cmake.org/cmake/help/cmake2.6docs.html]cmake macro[/url] not found in the CentOS version.

Going OT: I got farther trying to build on Scientific Linux 6. Ran into problems with the install step (it wanted to write to /usr/... - confirming yet again why one should build RPMS or other software as a user and not as root), but the build stage did complete. It may be that CentOS is just not up to the job without later packages than the standard ones. Might try qt47 from [atrpms-testing] repo. ATrpms also has a later version of cmake which might be worth a try, as might [url=https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=30407&forum=14]SL6[/url] if you are willing to jump ship on CentOS. Hopefully CentOS-6 will be along real-soon-now.

gerhard54
Posts: 5
Joined: 2011/03/15 16:00:26

Re: Cmake can't find QT libraries

Post by gerhard54 » 2011/03/17 14:32:09

Thank you for looking into the matter!

I will definitely follow the path you suggested and try to build a source rpm.
As soon as I have figured out what changes are needed to make it compile. The missing "translation" macro should not be the killer argument :-?

Gerhard

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Cmake can't find QT libraries

Post by pschaff » 2011/03/17 14:43:14

[quote]
gerhard54 wrote:
Thank you for looking into the matter![/quote]
You are welcome.

[quote]
I will definitely follow the path you suggested and try to build a source rpm.[/quote]
Good plan. :-)

[quote]
As soon as I have figured out what changes are needed to make it compile. The missing "translation" macro should not be the killer argument :-?
[/quote]
I doubt you will be able to proceed without it. An updated cmake seems to be the key to that.

My changes to the spec file to get through the build stage on SL6 were[code]
$ diff -u tfla-01.spec_orig tfla-01.spec
--- tfla-01.spec_orig 2010-11-21 05:36:42.000000000 -0500
+++ tfla-01.spec 2011-03-17 10:40:16.697741905 -0400
@@ -8,8 +8,8 @@
Summary: The Fabulous Logic Analyzer
Source0: http://prdownload.berlios.de/tfla-01/%{name}-%{version}.tar.bz2
Patch0: tfla-01-Fix-build-in-some-cases-by-including-climits-in-spi..patch
-BuildRequires: qt-devel libieee1284 cmake docbook-xsl-stylesheets
-BuildRequires: gcc-c++ libpng-devel libpng freetype2-devel libxslt
+BuildRequires: qt4-devel libieee1284-devel cmake docbook-style-xsl
+BuildRequires: gcc-c++ libpng-devel libpng freetype-devel libxslt

%description
Simple logic analyzer for the PC's parallel port. The schematic which[/code]
Did not tackle the errors where the install part of the rpmbuild tries to write to /usr/... rather than to the buildroot. There may be a better SRPM to start from than the one I picked more or less at random. That one clearly has some defects as far as use on EL distros.

Please update the thread with your progress, to satisfy my curiosity, and for the sake of future forum searchers.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Cmake can't find QT libraries

Post by pschaff » 2011/05/14 13:50:47

Any resolution of your issue yet?

Post Reply

Return to “CentOS 5 - Miscellaneous Questions”