View previous topic :: View next topic |
Author |
Message |
laurentgedm Apprentice


Joined: 23 Feb 2005 Posts: 164 Location: Brussels
|
Posted: Tue May 29, 2007 5:53 pm Post subject: pkg-config doesn't find QT libs |
|
|
Hi,
i'm trying to compile a program that makes use of qt-mt. Qt is installed here, version 3.3.8.
./configure calls pkg-config to look for the presence of the qt-mt library, version >=3.3.3.
But it doesn't find it!
I have the .pc file for QT:
Code: | # cat /usr/qt/3/lib/pkgconfig/qt-mt.pc
prefix=/usr/qt/3
exec_prefix=${prefix}
libdir=${prefix}/lib64
includedir=${prefix}/include
qt_config=qt warn_on release incremental link_prl nocrosscompiler dlopen_opengl minimal-config small-config medium-config large-config full-config styles tools kernel widgets dialogs iconview workspace network canvas table xml opengl sql release dll thread largefile stl system-mng mng system-jpeg jpeg system-png png gif system-zlib cups bigcodecs x11sm xshape xcursor xrandr xrender xftfreetype tablet xkb dylib create_prl link_prl qt warn_on depend_includepath qmake_cache x11 x11inc create_libtool create_pc moc x11lib
Name: Qt
Description: Libqt-mt.so.3.3.8 Library
Version: 3.3.8
Libs: -L${libdir} -lqt-mt -L/usr/lib64 -L/usr/X11R6/lib64 -lmng -ljpeg -lpng -lz -lXi -lXrender -lXrandr -lXcursor -lXft -lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lpthread
Cflags: -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT -I${includedir} |
However,
Code: | $ pkg-config --exists "qt-mt"
$ echo $?
0 |
Any idea why this happens?
Here is my env variable:
Code: | PKG_CONFIG_PATH=/usr/qt/3/lib/pkgconfig |
So it should work.
Help would be very appreciated
Thanks |
|
Back to top |
|
 |
laurentgedm Apprentice


Joined: 23 Feb 2005 Posts: 164 Location: Brussels
|
Posted: Tue May 29, 2007 6:12 pm Post subject: |
|
|
Moreover:
Code: | $ pkg-config --list-all | grep qt
qt-mt Qt - Libqt-mt.so.3.3.8 Library
poppler-qt poppler-qt - Qt bindings for poppler |
So, pkg-config DOES know about qt-mt...! |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 18850
|
Posted: Wed May 30, 2007 3:24 am Post subject: |
|
|
What does configure print when it fails to find qt-mt? If configure leaves behind a logfile, check whether a more detailed explanation of the failure was written to the log. |
|
Back to top |
|
 |
laurentgedm Apprentice


Joined: 23 Feb 2005 Posts: 164 Location: Brussels
|
Posted: Wed May 30, 2007 4:36 am Post subject: |
|
|
Thanks for your answer.
Here is what it prints:
Code: | # ./configure
Checking for Python : /usr/bin/python
Checking for SCons : /usr/bin/scons
calling scons configure with parameters
scons: Reading SConscript files ...
Checking for pkg-config... ok
Checking for qt-mt >= 3.3.3... failed
qt-mt >= 3.3.3 not found. |
Here is the log file:
Code: | $ cat config.log
file SConstruct,line 60:
Configure( confdir = .sconf_temp )
Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
Result: ok
Checking for qt-mt >= 3.3.3...
pkg-config --exists 'qt-mt >= 3.3.3'
scons: *** [.sconf_temp/conftest_1] Error 1
Result: failed |
And the SConstruct script:
Code: | # cat SConstruct
"""
help -> scons -h
compile -> scons
clean -> scons -c
install -> scons install
uninstall -> scons -c install
configure -> scons configure prefix=/tmp/ita debug=full extraincludes=/usr/local/include:/tmp/include prefix=/usr/local
Run from a subdirectory -> scons -u
The variables are saved automatically after the first run (look at cache/kde.cache.py, ..)
"""
import os
import sys
EnsureSConsVersion(0, 96)
if os.path.isfile("/etc/debian_version"):
os.environ['QTDIR'] = "/usr/share/qt3"
env = Environment(tools=['default', 'generic', 'qt'], toolpath=['admin'])
env['QT_LIB'] = 'qt-mt'
env.Append(ENV = {'HOME': os.environ['HOME']})
env.AppendUnique(CCFLAGS='-Dlinux -pipe -DQT_THREAD_SUPPORT -D_REENTRANT')
env.AppendUnique(CPPPATH=['/usr/include/PCSC']) # here needed for config step (for debian)
# FIXME not for for 32 bit mandriva !
if os.path.isfile("/etc/mandriva-release"):
# FIXME should remove /usr/lib/qt3/lib from path (now warning ...)
env.Append(LIBPATH=['/usr/lib/qt3/lib64'])
env['PREFIX'] = ARGUMENTS.get('prefix', '/usr/local')
# FIXME: the confdir is hardcoded to /usr/local/etc, as is done in the sources
#env['CONFDIR'] = ARGUMENTS.get('confdir', '/usr/local/etc')
env['CONFDIR'] = '/usr/local/etc'
env['LIBDIR'] = ARGUMENTS.get('libdir', '/usr/local/lib')
def CheckPKGConfig(context, version):
context.Message( 'Checking for pkg-config... ' )
ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
context.Result( ret )
return ret
def CheckPKG(context, name):
context.Message( 'Checking for %s... ' % name )
ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
context.Result( ret )
return ret
if not env['HELP']:
optionsfile=env['CACHEDIR'] + 'custom.cache.py'
opts = Options(optionsfile)
opts.AddOptions(('CUSTOMISCONFIGURED', 'configuration succeeded'))
opts.AddOptions(('WITHEIDGUI', 'with eidgui'))
opts.AddOptions(('WITHJNI', 'with eidlib JNI'))
opts.AddOptions(('JAVA', 'JAVA_HOME'))
opts.Update(env)
if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('CUSTOMISCONFIGURED')):
conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
'CheckPKG' : CheckPKG })
# pkg-config
if not conf.CheckPKGConfig('0.15.0'):
print 'pkg-config >= 0.15.0 not found.'
Exit(1)
# QT
# FIXME what if QT 4.x installed !?
if not conf.CheckPKG('qt-mt >= 3.3.3'):
print 'qt-mt >= 3.3.3 not found.'
Exit(1)
# pcsclite
if not conf.CheckPKG('libpcsclite >= 1.2.9'):
print 'pcsclite >= 1.2.9 not found.'
Exit(1)
# openssl
if not conf.CheckPKG('openssl >= 0.9.7'):
print 'openssl >= 0.9.7 not found.'
Exit(1)
# can we build QT apps ?
if not conf.CheckLibWithHeader('qt-mt', 'qapplication.h', 'c++', 'QApplication qapp(0,0);' ):
Exit(1)
# openssl
if not (conf.CheckLibWithHeader('crypto', 'openssl/crypto.h', 'C', 'SSLeay();') and
conf.CheckLibWithHeader('ssl', 'openssl/ssl.h', 'C', 'SSL_library_init();')):
print 'OpenSSL not found, exiting'
Exit(1)
# check for wx libs
if conf.CheckLib('wx_gtk-2.4') or conf.CheckLib('wx_gtk2u_core-2.6') or conf.CheckLib('wx_gtk2-2.4') or conf.CheckLib('wx_gtk2_core-2.6'):
env['WITHEIDGUI']=1
# check for headers
headers = Split('''openssl/bio.h openssl/conf.h openssl/ocsp.h openssl/ssl.h
pcsclite.h assert.h ctype.h float.h stdarg.h stdio.h stdlib.h string.h''')
for header in headers:
if not conf.CheckHeader(header):
print 'Did not find %s header file, exiting' % (header)
Exit(1)
# check for STL headers
headers = Split('algorithm map string vector')
for header in headers:
if not conf.CheckCXXHeader(header):
print 'Did not find %s header file, exiting' % (header)
Exit(1)
# check for JNI headers (require presence of Java SDK)
if os.environ.has_key('JAVA_HOME'):
saveEnv = env['CPPPATH']
javaHome = os.environ['JAVA_HOME']
env['JAVA'] = javaHome
env.Append(CPPPATH = [javaHome + '/include', javaHome + '/include/linux'])
if conf.CheckHeader('jni.h'):
env['WITHJNI']=1
env.Replace(CPPPATH = saveEnv)
print
if not env.has_key('WITHEIDGUI'):
print "Not building eidviewer: no wx_gtk 2.4 or 2.6 found"
if not env.has_key('WITHJNI'):
print "Not building eidlibjni: JAVA_HOME needs to point to the Java2 SDK"
print
env['CUSTOMISCONFIGURED']=1
opts.Save(optionsfile, env)
print "NOTE: to start the privacy filter and crl download services automatically at boot-time,"
print "extra steps need to be taken (chkconfig, update-rc.d, install_initd) using the two "
print "/etc/init.d/belgium.be-beid* files."
print
env = conf.Finish()
Export('env')
#env.SConscript('src/SConscript', build_dir='build', duplicate=0)
env.SConscript('src/SConscript')
prefix = env['PREFIX']
env.Alias('install', env.Install(prefix + '/share/beid', 'doc/eID-toolkit_licensingtermsconditions Deutch.rtf'))
env.Alias('install', env.Install(prefix + '/share/beid', 'doc/eID-toolkit_licensingtermsconditions English.rtf'))
env.Alias('install', env.Install(prefix + '/share/beid', 'doc/eID-toolkit_licensingtermsconditions Francais.rtf'))
env.Alias('install', env.Install(prefix + '/share/beid', 'doc/eID-toolkit_licensingtermsconditions Nederlands.rtf'))
env.Alias('install', env.Install(prefix + '/share/beid', 'doc/DeveloperGuide.doc'))
# if you forget to add a version number, the one in the file VERSION will be used instead
#env.dist('beid', '2.52')
env.dist('beid_linux') |
|
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 18850
|
Posted: Thu May 31, 2007 1:47 am Post subject: |
|
|
That looks like it should work. Try running exactly the command it is failing with. In your first post, you ran pkg-config --exists "qt-mt", but the script is running pkg-config --exists 'qt-mt >= 3.3.3' . If you get back a success code when running exactly the same command, my next guess would be to suspect that the script is not quoting arguments well enough.
For that, emerge dev-util/strace and use it to monitor the system calls made by the scons script. The strace output will be noisy enough just monitoring the scons script, so try to avoid letting it trace the entire configure call. Once you have the strace output, post the output of grep -C5 -n scons.strace. |
|
Back to top |
|
 |
laurentgedm Apprentice


Joined: 23 Feb 2005 Posts: 164 Location: Brussels
|
Posted: Tue Jun 05, 2007 8:44 pm Post subject: |
|
|
Okay i tried what you suggested.
Code: | lau@GEDM! ~/BeID $ pkg-config --exists 'qt-mt >= 3.3.3'
lau@GEDM! ~/BeID $ echo $?
0
|
See, the syntax (quotation, etc) is correct. But pkg-config keeps giving 0 as return value when we ask if a version >=3.3.3 is installed.
I merged strace and used it. I did'n find how to limit it to scons, so i did "strace -o output_strace ./configure".
I don't know what to grep. Actually i dont understand a thing in the output of strace.
Here it is: http://www.faniel.com/share/output_strace
Don't know what to do from here...
Last edited by laurentgedm on Wed Jun 06, 2007 7:00 am; edited 1 time in total |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 18850
|
Posted: Tue Jun 05, 2007 11:50 pm Post subject: |
|
|
0 is the success code. Consider true and false: /bin/true returns 0 and /bin/false returns 1. Thus, pkg-config is reporting that qt-mt is available and satisfies the version restriction. It is beginning to look like a bug in SCons that it does not understand the return code. It depends on whether TryAction inverts the sense of the return code.
dev-util/strace reports the results of system calls. You need to make it follow forks if you intend to run it against the main configure script (which I recommend against, owing to the volume of output that will generate). |
|
Back to top |
|
 |
xaviermiller Bodhisattva


Joined: 23 Jul 2004 Posts: 8664 Location: ~Brussels - Belgique
|
Posted: Thu Oct 25, 2007 8:35 pm Post subject: |
|
|
Hello,
Did you finally suceeded ? _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
 |
laurentgedm Apprentice


Joined: 23 Feb 2005 Posts: 164 Location: Brussels
|
Posted: Sat Oct 27, 2007 6:29 pm Post subject: |
|
|
Hi.
I didn't succeed . I tried hard and then gave up because i lacked time. Maybe it will work next year... |
|
Back to top |
|
 |
xaviermiller Bodhisattva


Joined: 23 Jul 2004 Posts: 8664 Location: ~Brussels - Belgique
|
Posted: Mon Oct 29, 2007 11:55 am Post subject: |
|
|
maybe we can take contact with fedICT. In my case, I shortcutted the configure file, but I got compilation errors. _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
 |
The_Bell Apprentice


Joined: 01 Jul 2002 Posts: 157
|
Posted: Fri Nov 23, 2007 2:49 pm Post subject: |
|
|
I'm having the same problem trying to emerge arts.
Any suggestion? _________________ Live long and prosper |
|
Back to top |
|
 |
_tebra_ Guru

Joined: 12 Nov 2004 Posts: 304 Location: Brussels - Belgium
|
Posted: Sat Dec 15, 2007 4:12 pm Post subject: |
|
|
I have bypass the problem by commented these lines
Code: | if not conf.CheckPKG('qt-mt >= 3.3.3'):
print 'qt-mt >= 3.3.3 not found.'
Exit(1) |
in the SConstruct file but now I have this compile error
Code: | Building src/beidcommon/libbeidcommon.la with action:
build_la_file(target, source, env)
building 'libbeidcommon.la' from 'libbeidcommon.so.0.0.0'
cd src/beidcommon && rm -f libbeidcommon.so && ln -s libbeidcommon.so.0.0.0 libbeidcommon.so
cd src/beidcommon && rm -f libbeidcommon.so.0 && ln -s libbeidcommon.so.0.0.0 libbeidcommon.so.0
g++ -o src/beidcommlib/CardMessage.os -c "-Dlinux -pipe -DQT_THREAD_SUPPORT -D_REENTRANT" -fPIC -O -DNDEBUG -DNO_DEBUG -I/usr/qt/3/include -I/usr/include/PCSC -Isrc/beidcommlib src/beidcommlib/CardMessage.cpp
<command line>:1:1: warning: "linux" redefined
<built-in>: warning: this is the location of the previous definition
g++ -o src/beidcommlib/Connection.os -c "-Dlinux -pipe -DQT_THREAD_SUPPORT -D_REENTRANT" -fPIC -O -DNDEBUG -DNO_DEBUG -I/usr/qt/3/include -I/usr/include/PCSC -Isrc/beidcommlib src/beidcommlib/Connection.cpp
<command line>:1:1: warning: "linux" redefined
<built-in>: warning: this is the location of the previous definition
src/beidcommlib/MessageQueue.h:42: error: 'QMutex' does not name a type
src/beidcommlib/QSocketDeviceImpl.h:18: error: expected class-name before '{' token
src/beidcommlib/ServerRecvThread.h:19: error: expected class-name before '{' token
src/beidcommlib/Connection.cpp: In member function 'void EIDCommLIB::CConnection::Close()':
src/beidcommlib/Connection.cpp:55: error: 'class EIDCommLIB::CServerRecvThread' has no member named 'wait'
src/beidcommlib/Connection.cpp: In member function 'void EIDCommLIB::CConnection::AttachSocket(int)':
src/beidcommlib/Connection.cpp:130: error: 'class EIDCommLIB::CServerRecvThread' has no member named 'start'
scons: *** [src/beidcommlib/Connection.os] Error 1
scons: building terminated because of errors.
make: *** [all] Erreur 2 |
|
|
Back to top |
|
 |
djvinz n00b

Joined: 24 Jan 2008 Posts: 4
|
Posted: Thu Jan 24, 2008 6:52 pm Post subject: |
|
|
I'm stuck at exactly the same place..
Had to bypass qt-mt 3.3 also, because i'm using qt4...
I had to modify the SConstruct also, to let it find my /usr/qt/3/include files...
Damn... |
|
Back to top |
|
 |
djvinz n00b

Joined: 24 Jan 2008 Posts: 4
|
Posted: Thu Jan 24, 2008 7:23 pm Post subject: |
|
|
Ok, I found it!
a debian patch did the trick (yes i'm on gentoo too )
you can get the diff for the patch here:
http://ftp.nl.debian.org/debian/pool/main/b/belpic/
unpack the diff.gz, and rename your beid-2.6.0 dir to belpic-2.6.0,
then apply the patch with:
"patch -p 0 -i belpic_2.6.0-3.diff"
you probably will need to "emerge openct opensc" first though..
also i added openct to default runlevel: 'rc-update add openct default'
I also modded the SConstruct file to be like this:
Code: | if os.path.isfile("/etc/debian_version"):
os.environ['QTDIR'] = "/usr/share/qt3"
+os.environ['QTDIR'] = "/usr/qt/3/"
env = Environment(tools=['default', 'generic', 'qt'], toolpath=['admin'])
#env['QT_LIB'] = 'qt-mt'
|
EDIT:
To get my Cherry ST-1044U terminal recognized, I need to add it to the list of CCID-compatible usb reader in openct...
(you can find out the usb id with 'lsusb')
Code: |
driver ccid {
ids = {
usb:03f0/1024, # HP Keyboard with CCID reader
usb:046a/0010, # Cherry smartboard G83-6744
+ usb:046a/002d, # Cherry ST-1044U (vnz)
|
have fun! |
|
Back to top |
|
 |
blietaer Tux's lil' helper

Joined: 27 Apr 2006 Posts: 103
|
Posted: Wed Nov 19, 2008 11:48 am Post subject: |
|
|
Hello,
Do you have a nice procedure somewhere to install BeID under Linux/gentoo?
I tried:
http://www.ping.be/linux/beid.html (sorry it's french..)
and/or
https://bugs.gentoo.org/show_bug.cgi?id=187422
and/or
http://eid.belgium.be/nl/Achtergrondinfo/De_eID_technisch/index.jsp (sorry it's dutch..)
But none worked for me... I am about to tried a mix of all of these, but before f*cking my Gentoo up, I was hoping to find some kind of recipe...do you have any?
Thank you!
Cheers,
Ben
Code: | >>> Emerging (1 of 1) app-misc/beid-runtime-2.6.0-r1 to /
...
* Failed Patch: import_header.patch !
* ( /usr/local/portage/app-misc/beid-runtime/files/2.6.0/import_header.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/app-misc/beid-runtime-2.6.0-r1/temp/import_header.patch-20597.out
*
* ERROR: app-misc/beid-runtime-2.6.0-r1 failed.
* Call stack:
* ebuild.sh, line 49: Called src_unpack
* environment, line 2092: Called epatch 'src_unpack'
* environment, line 1128: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
* The die message:
* Failed Patch: import_header.patch!
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/app-misc/beid-runtime-2.6.0-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-misc/beid-runtime-2.6.0-r1/temp/environment'.
* This ebuild is from an overlay: '/usr/local/portage/'
|
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|