Cvs compilation problem on Slackware Linux

Help
2009-09-01
2013-05-01
  • Wolfgang Pichl
    Wolfgang Pichl
    2009-09-01

    Hi,
    I am trying to build lprof cvs on Slackware-12.2. I have installed scons-1.2.0 on the system, so I should not need a scons.local from the release. Now I have two problems:

    First, the README file does not really tell one, how to bootstrap the cvs, and I have no experience with scons (if it were GNU autotools, I would know, what to do :-). So, after setting up the environment for Qt4 (see below) I first simply typed 'scons' without any options. And the build started, but quickly ended up with a Qt problem.

    Slackware-12.2 still has Qt-3.3.8, but I have additionally installed Qt-4.5.1 in /usr/local/Trolltech/Qt-4.5.1. Whenever I have to build software against Qt4, I source a small script in order to set up the environment (QTDIR, PATH, PKG_CONFIG_PATH, PYTHONPATH for PyQt). This has always worked perfectly, but with lprof it fails. Scons ends up with the following error:

    File "/usr/local/src/lprof/SConstruct", line 50, in <module>
    Package QtGui was not found in the pkg-config search path.
    Perhaps you should add the directory containing `QtGui.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'QtGui' found
    Package QtCore was not found in the pkg-config search path.
    Perhaps you should add the directory containing `QtCore.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'QtCore' found
    Package Qt3Support was not found in the pkg-config search path.
    Perhaps you should add the directory containing `Qt3Support.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'Qt3Support' found
    Package QtAssistantClient was not found in the pkg-config search path.
    Perhaps you should add the directory containing `QtAssistantClient.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'QtAssistantClient' found
    OSError: 'pkg-config QtGui QtCore Qt3Support QtAssistantClient --libs --cflags'
    exited 1:

    However, PKG_CONFIG_PATH was indeed set correctly in the shell.
    'echo $PKG_CONFIG_PATH' yields:
    /usr/local/Trolltech/Qt-4.5.1/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig
    The files claimed to be missing by scons, such as QtGui.pc or QtCore.pc, are in place and calling pkg-config manually on the command line, such as for instance 'pkg-config QtGui --libs --cflags', yields the correct response. Later I also tried to call scons with the option 'scons qt_directory=/usr/local/Trolltech/Qt-4.5.1', but this did not change anything.

    In summary: it seems that the scons scripts don't inherit the correct PKG_CONFIG_PATH from the calling shell. Really strange :-(
    Can anybody help?

    Many thanks in advance
    Wolfgang Pichl

     
  • rlx2
    rlx2
    2010-11-13

    Hi,

    I have the same problem.  It seems that shell variables like PKG_CONFIG_PATH, CPATH, LIBRARY_PATH are not seen by scons.  I have tried the latest tar distribution and CVS.  The result is that I can't build.  Whatever command, either pkg-config … or gcc … scons can't perform, I just have to cut and paste in the shell and it works outside of scons.  That's very strange to me.