Ticket #9296 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

configure resets PKG_CONFIG_PATH

Reported by: fredlwm Owned by:
Component: installer Version: VirtualBox 4.1.0
Keywords: Cc:
Guest type: other Host type: Linux


For the first time, I compiled a Qt in another directory, /usr/local/qt, while leaving its pkg-config files in place, not moving them to /usr/lib64/pkgconfig.

But when I ran configure, it returned:

Checking for Qt4:
  ** QtCore not found!
Check /home/fredlwm/tmp/objdir/configure.log for details

***** Checking Qt4 *****
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
** QtCore not found!

$ echo $PKG_CONFIG_PATH returns /usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/local/qt/lib/pkgconfig

Looking in the configure script, I noticed three lines

PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \

Changing them to PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/qt4/lib/pkgconfig \

made VirtualBox configure correctly:

Checking for Qt4: found version 4.7.3, OK.
Checking for Qt4 devtools: Checking for static stc++ library: found, OK.

***** Checking Qt4 *****
compiling the following source file:
#include <cstdio>
#include <QtGlobal>
extern "C" int main(void)
  printf("found version %s", QT_VERSION_STR);
#if QT_VERSION >= 0x040400
  printf(", OK.\n");
  return 0;
  printf(", expected version 4.4.0 or higher\n");
  return 1;
using the following command line:
g++  -g -O -Wall -o /home/fredlwm/tmp/objdir/.tmp_out /home/fredlwm/tmp/objdir/ "-L/usr/local/qt/lib -lQtCore   -lpthread -I/usr/local/qt/include -I/usr/local/qt/include/QtCore -DQT_SHARED -I/usr/local/qt/include -I/usr/local/qt/include/QtCore  "
executing the binary (LD_LIBRARY_PATH=/usr/local/qt/lib)
found version 4.7.3, OK.

I don't know if my modification is the right fix, but it solved my problem.

Change History

comment:1 Changed 9 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the suggestion. Fix is in r38538.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use