question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong prefix in pkgconfig files

See original GitHub issue

As a follow up of the previous pkg-confing issue, I’ve noticed that in the installed pc files the prefix is hardcoded to “/home/qt/work/install” rendering them unusable.

As a workaround I run this sed on Linux and everything builds fine now: for file in $(ls $Qt5_DIR/lib/pkgconfig/*); do sed -i "s|^prefix=.*|prefix=$Qt5_DIR|" $file; done;

I’m running the job on ubuntu-latest.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ddalcinocommented, Aug 27, 2022

I have closed miurahr/aqtinstall#560 because of this: https://github.com/miurahr/aqtinstall/pull/561#issuecomment-1229087569

Note that if you run the above grep commands on Qt installations installed by aqtinstall and by the official GUI installer, you get the same output. In this regard, the lib/pkgconfig/*.pc files installed by aqtinstall are identical to those installed by the official GUI installer.

I’m certain that this was a problem with aqtinstall at the time this issue was created, but as far as I can tell, it is now fixed. Please feel free to prove me wrong.

0reactions
ddalcinocommented, Aug 24, 2022

On a Mac host:

$ python -m aqt version
INFO    : aqtinstall(aqt) v2.2.2 on Python 3.9.13 [CPython Clang 13.1.6 (clang-1316.0.21.2)]
$ python -m aqt install-qt mac android 5.15.2 android
... output ...
$ grep prefix="/home/qt/work/install" 5.15.2/android/lib/pkgconfig/* | wc -l
0
$ rm -rf 5.15.2
$ python -m aqt install-qt linux android 5.15.2 android
... output ...
$ grep prefix="/home/qt/work/install" 5.15.2/android/lib/pkgconfig/* | wc -l
210

The pkgconfig/*.pc files are all patched properly for same-platform installations, but not cross-platform installations.

Edit: Same-platform vs. cross-platform apparently has nothing to do with it: On Mac, the default prefix string is /Users/qt/work/install, and for some reason it is not being patched.

$ python -m aqt install-qt mac android 5.15.2 android
... output ...
$ grep prefix="/Users/qt/work/install" 5.15.2/android/lib/pkgconfig/* | wc -l
210

I’m going to open a separate issue for this at aqtinstall.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pkg-config uses wrong prefix - Stack Overflow
With pkg-config aruco --debug I found out that pkg-config is. Preferring uninstalled version of package 'aruco'.
Read more >
Wrong libdir in pkg-config .pc files if ... - GitHub
1284 dehardcoded the libdir and includedir in the pkg-config .pc files, but if you pass an absolute path to CMAKE_INSTALL_LIBDIR or ...
Read more >
Bug #1876042 “Incorrect prefix in .pc files” - Launchpad Bugs
All pkg-config files contain wrong prefix. It is specified as prefix=${pcfiledir}/../.. which is resolved to /usr/lib while it should be ...
Read more >
pkg-config files installed in wrong directory - Google Groups
Hello, I have defined the following pkg-config file: pkg = import('pkgconfig') pkg.generate(libraries: [ libfuse, '-lpthread' ], libraries_private: '-ldl',
Read more >
[#QTBUG-80922] pkgconfig prefix wrong after installation
In both cases after seemingly successful installation I can see that the pkgconfig files installed do not have the correct installation prefix ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found