I'm currently finding this bug in a Gentoo Prefix environment, but I don't see why it should be only happening here... When trying to compile a third-party package (in my case ros-kinetic/qt_gui_cpp) which uses sip to create some bindings I find the error: [very long line] ... -lQt5Gui $[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ... x86_64-pc-linux-gnu-g++: error: 0/libQt5Core.so: No such file or directory Thanks to this thread: http://python.6.x6.nabble.com/Incorrect-Makefile-using-prl-files-from-Qt-5-12-4-td5255962.html I was aware of this un-substituted variable $$[QT_INSTALL_LIBS]. I'm currently work-arounding this issue with doing (after emerging dev-qt/qtcore): qt_install_libs_path=`qmake -query QT_INSTALL_LIBS`; sed -i 's@$$\[QT_INSTALL_LIBS\]@'$qt_install_libs_path'@' $EPREFIX/usr/lib/libQt5Gui.prl But I've seen that this variable is un-substituted in more places that I have just probably not have linked yet with: cd $EPREFIX/usr/lib; grep -r QT_INSTALL_LIBS . | grep .prl ./libQt5OpenGL.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5X11Extras.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5Designer.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Xml.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5Sql.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5PrintSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5DesignerComponents.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Designer.so $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Xml.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5Network.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5UiTools.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so /home/user/gentoo/usr/lib64/libGL.so ./libQt5EventDispatcherSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so /home/user/gentoo/usr/lib64/libgthread-2.0.so /home/user/gentoo/usr/lib64/libglib-2.0.so ./libQt5PlatformCompositorSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so ./libQt5DeviceDiscoverySupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5Widgets.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5Concurrent.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5FontDatabaseSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so /home/user/gentoo/usr/lib64/libfontconfig.so /home/user/gentoo/usr/lib64/libfreetype.so /home/user/gentoo/usr/lib64/libz.so ./libQt5XcbQpa.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5ServiceSupport.a $$[QT_INSTALL_LIBS]/libQt5ThemeSupport.a $$[QT_INSTALL_LIBS]/libQt5FontDatabaseSupport.a /home/user/gentoo/usr/lib64/libGL.so /home/user/gentoo/usr/lib64/libfontconfig.so /home/user/gentoo/usr/lib64/libfreetype.so /home/user/gentoo/usr/lib64/libz.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5EdidSupport.a $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libX11-xcb.so /home/user/gentoo/usr/lib64/libxcb-xinput.so /home/user/gentoo/usr/lib64/libxcb-icccm.so /home/user/gentoo/usr/lib64/libxcb-image.so /home/user/gentoo/usr/lib64/libxcb-shm.so /home/user/gentoo/usr/lib64/libxcb-keysyms.so /home/user/gentoo/usr/lib64/libxcb-randr.so /home/user/gentoo/usr/lib64/libxcb-render-util.so /home/user/gentoo/usr/lib64/libxcb-render.so /home/user/gentoo/usr/lib64/libxcb-shape.so /home/user/gentoo/usr/lib64/libxcb-sync.so /home/user/gentoo/usr/lib64/libxcb-xfixes.so /home/user/gentoo/usr/lib64/libxcb-xinerama.so /home/user/gentoo/usr/lib64/libxcb-xkb.so /home/user/gentoo/usr/lib64/libxcb.so /home/user/gentoo/usr/lib64/libXrender.so /home/user/gentoo/usr/lib64/libXext.so /home/user/gentoo/usr/lib64/libX11.so /home/user/gentoo/usr/lib64/libm.so /home/user/gentoo/usr/lib64/libSM.so /home/user/gentoo/usr/lib64/libICE.so /home/user/gentoo/usr/lib64/libxkbcommon-x11.so /home/user/gentoo/usr/lib64/libxkbcommon.so /home/user/gentoo/usr/lib64/libdl.so ./libQt5EdidSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5ServiceSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so ./libQt5AccessibilitySupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so ./libQt5GlxSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so /home/user/gentoo/usr/lib64/libXext.so /home/user/gentoo/usr/lib64/libX11.so /home/user/gentoo/usr/lib64/libm.so ./libQt5Xml.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5ThemeSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so ./libQt5Test.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread ./libQt5FbSupport.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so ./libQt5OpenGLExtensions.prl:QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /home/user/gentoo/usr/lib64/libGL.so Reproducible: Always
I saw this, or something like this early 2019, and I believe it should have been fixed some time after [1], but I don't know if it could still be an issue with prefix. I talk about it a bit in Qt bug 75357 [2] (in the comments mostly). Lines such as QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Widgets.so $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread might be okay; I have them too, though I was confused by them myself quite a bit. If I remember right, they should /not/ be in a build log, however (can't remember for sure right now)... One interesting thing I notice, is that you have '0/libQt5Core.so' instead of, for example, '/libQt5Gui.so', where it seems like QT_INSTALL_LIBS was empty. Where's the '0' coming from, I wonder. 1. https://codereview.qt-project.org/gitweb?p=qt/qtwebengine.git;a=patch;h=c1d74232 2. https://bugreports.qt.io/browse/QTBUG-75357
Closing since this bug (and the Qt versions) is (and are) starting to show its (as well as their) age. Feel free to re-open if it's still being a thing. Thanks for the report!