LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-05-2008, 04:24 AM   #1
analgesic
LQ Newbie
 
Registered: Mar 2008
Location: Toronto
Distribution: Debian
Posts: 9

Rep: Reputation: 0
"qmake not found!" -- Qt-4.3.4 is installed, so what must I set to point cmake to it?


Greetings all. A complete newbie here (i.e. as of Saturday), but I'm loving it so far.

I was told that starting with Slackware was the way to go, as it would force me to do the work necessary to understand linux -- and boy were they ever right! I think I'm [just] starting to get the hang of things now, but I've run into a bit of a problem and apparently google is not my friend.

I've installed Qt-4.3.4, but cmake isn't being pointed to the correct directory. I tried running

Quote:
export QTDIR=/usr/local/Trolltech/Qt-4.3.4
and

Quote:
export PATH=$PATH:$QTDIR/bin
but it didn't help. I thought perhaps logging off and then in again was necessary to apply the new PATH, so I did so, only to find that my PATH hadn't changed at all. So I tried

Quote:
export PATH=$PATH:/usr/local/Trolltech/Qt-4.3.4/bin
That edited the PATH, but it didn't help cmake find the correct directory. I know that it's not a problem with Qt, since a few hours earlier I'd used the -i option to manually point an installation to the right directory.

Any suggestions?
 
Old 03-05-2008, 06:02 AM   #2
sagrailo
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Rep: Reputation: 0
The problem is that both Qt 3 and 4 qmake executables have the same name; luckily, the solution is simple. You don't have to mess with QTDIR with Qt 4.x: you just need to create a symlink qmake-qt4 to your Qt 4's qmake binary - CMake's Qt 4 module is looking for executable named qmake-qt4 first, and then to one named qmake. Once Qt 4's qmake found by CMake, it will do the rest.

You may wish also to try installing Qt 4 through corresponding SlackBuild script (tried to put a link here - alas, seems like I'm not allowed as this is my first post, but you should be able to find it easily yourself).

HTH.
 
Old 03-05-2008, 07:56 AM   #3
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
I generally install qt4 to /opt/qt4 ... there are lots of packages out there that do this afaik, although I compiled it from src.
 
Old 03-05-2008, 10:59 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
what are you trying to install ?
 
Old 03-10-2008, 01:35 AM   #5
analgesic
LQ Newbie
 
Registered: Mar 2008
Location: Toronto
Distribution: Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sagrailo View Post
The problem is that both Qt 3 and 4 qmake executables have the same name; luckily, the solution is simple. You don't have to mess with QTDIR with Qt 4.x: you just need to create a symlink qmake-qt4 to your Qt 4's qmake binary - CMake's Qt 4 module is looking for executable named qmake-qt4 first, and then to one named qmake. Once Qt 4's qmake found by CMake, it will do the rest.

You may wish also to try installing Qt 4 through corresponding SlackBuild script (tried to put a link here - alas, seems like I'm not allowed as this is my first post, but you should be able to find it easily yourself).

HTH.
I did find an executable named "qt4qmake" at
/usr/share/apps/kdevappwizard/imports/qt4qmake
but I'm not sure what to do next. Should the symlink go to that location, or to my Qt4 install directory's "qmake" executable? And where should the symlink start from? Is the location specified within cmake's module?

I'd hate to have to re-install Qt 4 (I already had to, as I mistakenly installed the core instead of devel). But that's because it seems like taking the easy way out, rather than actually learning where my current problem lies and how to fix it directly.

Quote:
Originally Posted by duryodhan View Post
I generally install qt4 to /opt/qt4 ... there are lots of packages out there that do this afaik, although I compiled it from src.
Yes, I did as well, though I simply left it in the default install directory since I'm really not sure what I'm doing yet. So I know where qmake is, I just can't figure out how to tell cmake where it is, though I've been able to successfully use cmake by manually pointing it to the Qt4 directory.

Quote:
Originally Posted by H_TeXMeX_H View Post
what are you trying to install ?
qimageblitz
 
Old 03-10-2008, 03:29 AM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Thanks for the link, I just built it from source successfully by running:

Code:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.3.0/bin/qmake .
Your qt version is 4.3.4 so you should run:

Code:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.3.4/bin/qmake .
 
Old 03-10-2008, 01:50 PM   #7
analgesic
LQ Newbie
 
Registered: Mar 2008
Location: Toronto
Distribution: Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by H_TeXMeX_H View Post
Thanks for the link, I just built it from source successfully by running:

Code:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.3.0/bin/qmake .
Your qt version is 4.3.4 so you should run:

Code:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.3.4/bin/qmake .
Huzzah -- it worked!

Now, is there a way I can set cmake to automatically load qmake from that directory?

EDIT: Oh, and where did the "-DQT_QMAKE_EXECUTABLE=..." option come from? I don't remember seeing it in cmake's help file.

Last edited by analgesic; 03-10-2008 at 01:54 PM.
 
Old 03-10-2008, 03:02 PM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Well, you can also do this in interactive mode running 'cmake -i .', it should list it near the end as an option.
 
Old 03-10-2008, 09:52 PM   #9
analgesic
LQ Newbie
 
Registered: Mar 2008
Location: Toronto
Distribution: Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by H_TeXMeX_H View Post
Well, you can also do this in interactive mode running 'cmake -i .', it should list it near the end as an option.
But I can't set cmake to automatically go to the right directory?
 
Old 03-11-2008, 03:28 AM   #10
sagrailo
LQ Newbie
 
Registered: Mar 2008
Posts: 5

Rep: Reputation: 0
Create a symlink qmake-qt4 say in /usr/local/bin (or anywhere else in your $PATH):
ln -s /usr/local/Trolltech/Qt-4.3.0/bin/qmake /usr/local/bin/qmake-qt4

CMake will catch it automatically then.
 
Old 03-12-2008, 09:02 PM   #11
analgesic
LQ Newbie
 
Registered: Mar 2008
Location: Toronto
Distribution: Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Perfect -- many thanks to all for the help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CMake error: QT qmake not found sean_zhang Linux - Software 4 02-19-2008 11:34 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Why my wireless card "atheros" run only as an acces point in "Master" mode. jardiamj Linux - Wireless Networking 3 11-11-2007 12:12 AM
Compiling stellarium: cmake returns "CURL was not found" charlesreid1 Linux - Software 2 10-23-2007 12:02 AM
Samba 3.0.0 installed on RH WS3, but "net join" command not found chloevu Linux - Networking 0 07-13-2004 03:20 PM


All times are GMT -5. The time now is 06:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration