You are not logged in.

#1 2007-08-19 05:24:20

shadeheim
Member
Registered: 2006-11-14
Posts: 29

Can't compile programs that require qt

Any package I compile in yaourt that relies on qt gets this error:

checking for Qt... configure: error: Qt (>= Qt 3.1 (20021021)) (headers and libraries) not found. Please check your installation!

qt appears to be installed, as is pkgconfig, but I have ran the command 'source /etc/profile' followed by 'set | grep -i qt' because I was advised to make sure QTDIR points to /opt/qt - it does. Also, the folder appears to be fully populated. Now what?

Update: So, I ran 'qt-config qt3' before 'source /etc/profile'. That seems to fix the above problem but now I'm getting a new error:

Checking if C++ programs can be compiled... no
configure: error: Your Installation isn't able to compile simple C++ programs.
Check config.log for details - if you're using a Linux distribution you might miss
a package named similiar to libstd++-dev.

Last edited by shadeheim (2007-08-19 07:08:43)

Offline

#2 2007-08-19 07:15:13

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Can't compile programs that require qt

Have you checked config.log to get the actual error messages? Can you post them?

Offline

#3 2007-08-19 09:05:44

shadeheim
Member
Registered: 2006-11-14
Posts: 29

Re: Can't compile programs that require qt

Well I thought I had got rid of 'error: Qt (>= Qt 3.2 and < 4.0) (headers and libraries) not found'... but I haven't.

Looked at logs for kwine, basket, kpacupdate, kommander - amongst others

These types of errors seem to happen across program logs:

conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
conftest.cpp:34: error: 'strlcat' was not declared in this scope
conftest.c:67:27: error: Carbon/Carbon.h: No such file or directory
conftest.c:76:25: error: crt_externs.h: No such file or directory

and end with...

conftest.cpp:2:21: error: qglobal.h: No such file or directory
conftest.cpp:3:26: error: qapplication.h: No such file or directory
conftest.cpp:4:21: error: qcursor.h: No such file or directory
conftest.cpp:5:27: error: qstylefactory.h: No such file or directory
conftest.cpp:6:34: error: private/qucomextra_p.h: No such file or directory
conftest.cpp:7:8: warning: "QT_VERSION" is not defined
conftest.cpp:8:2: error: #error 1
conftest.cpp: In function 'int main()':
conftest.cpp:12: error: 'QStyleFactory' was not declared in this scope
conftest.cpp:12: error: expected `;' before '::' token
conftest.cpp:13: error: 'QCursor' was not declared in this scope
conftest.cpp:13: error: expected `;' before 'c'
configure:30490: $? = 1
configure: failed program was:
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qstylefactory.h>
#include <private/qucomextra_p.h>
#if ! (QT_VERSION >= 0x030100)
#error 1
#endif
...
configure:29672: error: Qt (>= Qt 3.1 (20021021)) (headers and libraries) not found. Please check your installation!

and sometimes I also see these errors

conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
conftest.cc:11: error: 'void std::exit(int)' should have been declared inside 'std'

I could try and install other programs for the sake of it, but I guess the logs will show similar errors. The log always repeats the initial error I gave: 'error: Qt (>= Qt 3.2 and < 4.0) (headers and libraries) not found'.

Also, I have kdemod and qt-enhanced installed, but I'm sure this error was happening before I installed it.

Could there be something missing in my path?

PATH: /home/joe/GNUstep/Tools
PATH: /opt/GNUstep/Local/Tools
PATH: /opt/GNUstep/System/Tools
PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin
PATH: /opt/bin
PATH: /opt/java/jre/bin
PATH: /opt/kde/bin
PATH: /opt/mozilla/bin
PATH: /opt/qt/bin

Last edited by shadeheim (2007-08-19 09:27:05)

Offline

#4 2007-08-19 09:33:25

milan
Member
Registered: 2007-03-20
Posts: 38

Re: Can't compile programs that require qt

open /etc/ld.so.conf . Do you have following line in the file:
/opt/qt/lib
If not, add it and then run ldconfig as root.

Cheers!

Offline

#5 2007-08-19 09:40:45

shadeheim
Member
Registered: 2006-11-14
Posts: 29

Re: Can't compile programs that require qt

My ld.so.conf already has it

/usr/X11R6/lib

# End of file
/usr/lib/libfakeroot

/opt/GNUstep/System/Library/Libraries/
/opt/gnome/lib
/opt/qt4/lib
/opt/kde/lib
/opt/qt/lib

Last edited by shadeheim (2007-08-19 09:41:18)

Offline

#6 2007-08-19 10:16:30

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Can't compile programs that require qt

Have you tried changing the PKGBUILD by adding the following to the ./configure line:

 --with-qt-dir=/opt/qt

Last edited by vacant (2007-08-19 10:16:58)

Offline

#7 2007-08-19 16:00:17

shadeheim
Member
Registered: 2006-11-14
Posts: 29

Re: Can't compile programs that require qt

That worked, thanks. Is there any way I can make it search there by default?

Offline

#8 2007-08-20 03:36:31

bsdson.tw
Member
From: Taiwan
Registered: 2005-05-06
Posts: 161

Re: Can't compile programs that require qt

I guess that is because the environmental variable "QTDIR" is first set up by script "/etc/profile.d/qt.sh" and then overwritten by script "/etc/profile.d/qt4.sh".
Check out if both of these 2 files exist, and if so, just remove the execute permission on "/etc/profile.d/qt4.sh".

I guess. tongue

Offline

#9 2007-08-20 06:36:13

shadeheim
Member
Registered: 2006-11-14
Posts: 29

Re: Can't compile programs that require qt

The execute permission is already off for qt4.sh and on for qt.sh. Edit: I'm getting the hang of editing the package builds, but it does get quite tedious.

Last edited by shadeheim (2007-08-20 06:54:12)

Offline

#10 2007-08-20 09:17:57

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Can't compile programs that require qt

shadeheim wrote:

That worked, thanks. Is there any way I can make it search there by default?

I came across this problem trying to build tastymenu. The code in configure.log was

#include <private/qucomextra_p.h>
#if ! (QT_VERSION >= 0x030200 && QT_VERSION < 0x040000)
#error 1

i.e. the package won't compile against qt4. In the future we obviously want packages to build with the latest qt so I'd advise not setting a default.

If you have many packages to build then maybe use sed to change all the PKGBUILDS

s"/opt\/kde/opt\/kde --with-qt-dir=\/opt\/qt/"

Last edited by vacant (2007-08-20 09:18:49)

Offline

#11 2008-05-21 21:41:45

kilolima
Member
Registered: 2008-01-26
Posts: 49
Website

Re: Can't compile programs that require qt

I had this problem with yaourt as well but downloading the package from the aur website and compiling it manually worked fine, so I think this is a yaourt bug.

Offline

Board footer

Powered by FluxBB