Building Qt 5 seems to ignore PKG_CONFIG_PATH



  • I'm trying to build Qt 5 on Linux against some other libraries not in the standard path.

    For example, I build some dependencies and /tmp/xcb. I set PKG_CONFIG_PATH to /tmp/xcb/lib/pkgconfig. But Qt's "configure" always bombs with

    "ERROR: Feature "xcb" was enabled, but the pre-condition 'libs.xcb failed."

    When I look at config.log, it shows that pkg-config did not find xcb. But from the command prompt it finds it just fine when PKG_CONFIG_PATH is set.

    So what gives? Does 'configure' blank out and ignore that env var?

    Any suggestions?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Which version of Qt 5 are you trying to build ?

    In between you can add the library and include path using the -L and -I options to configure. Just one thing to take into account, you need a space between the option and the path in this case.



  • version 5.8.0

    I tried -L and -I with "configure", but still saw the same error in config.log stating that when it tries to compile the xcb.c test it cannot find <xcb/xcb.h>

    I see in config.log that it uses pkg-config to try to find xcb, but according to the log pkg-config doesn't see it.



  • Found the issue:

    I ran "configure" then fixed some paths, but re-running "configure" didn't pick it up.

    Apparently you have to run "configure" with "-recheck-all" to force it to go thru the config checks again, otherwise it relies on cached results.


  • Lifetime Qt Champion

    Indeed it does.

    So you go it to compile as you wanted ?



  • Yes, thank you.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.