Summary: | dev-qt/qtquickcontrols compilation fails due to collect2: fatal error: cannot find 'ld' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | M Ogrodnik <garfield4> |
Component: | [OLD] Library | Assignee: | Qt Bug Alias <qt> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Build log of qtquickcontrols |
Description
M Ogrodnik
2015-09-23 20:10:10 UTC
What's the output of `ls -l /usr/bin/ld*`? ~ $ ls -l /usr/bin/ld* lrwxrwxrwx 1 root root 22 09-03 19:03 /usr/bin/ld -> x86_64-pc-linux-gnu-ld lrwxrwxrwx 1 root root 10 09-15 11:40 /usr/bin/ldapadd -> ldapmodify -rwxrwxrwx 1 root root 60232 09-15 11:40 /usr/bin/ldapcompare -rwxrwxrwx 1 root root 60312 09-15 11:40 /usr/bin/ldapdelete -rwxrwxrwx 1 root root 60296 09-15 11:40 /usr/bin/ldapexop -rwxrwxrwx 1 root root 68536 09-15 11:40 /usr/bin/ldapmodify -rwxrwxrwx 1 root root 60232 09-15 11:40 /usr/bin/ldapmodrdn -rwxrwxrwx 1 root root 60248 09-15 11:40 /usr/bin/ldappasswd -rwxrwxrwx 1 root root 81016 09-15 11:40 /usr/bin/ldapsearch -rwxrwxrwx 1 root root 18608 09-15 11:40 /usr/bin/ldapurl -rwxrwxrwx 1 root root 56152 09-15 11:40 /usr/bin/ldapwhoami lrwxrwxrwx 1 root root 26 09-03 19:03 /usr/bin/ld.bfd -> x86_64-pc-linux-gnu-ld.bfd -rwxr-xr-x 1 root root 5758 08-04 18:31 /usr/bin/ldd -rwxr-xr-x 1 root root 5444 08-04 18:31 /usr/bin/lddlibc4 -rwxr-xr-x 1 root root 26255 09-03 13:33 /usr/bin/lddtree lrwxrwxrwx 1 root root 27 08-04 20:06 /usr/bin/ld.gold -> x86_64-pc-linux-gnu-ld.gold -rwxr-xr-x 1 root root 39560 08-04 16:52 /usr/bin/ldrdf In case of "ld" there's a few links. Continuing from previous response: ~ $ ls -l /usr/bin/x86_64-pc-linux-gnu-ld lrwxrwxrwx 1 root root 31 09-03 19:03 /usr/bin/x86_64-pc-linux-gnu-ld -> /usr/x86_64-pc-linux-gnu/bin/ld ~ $ ls -l /usr/x86_64-pc-linux-gnu/bin/ld lrwxrwxrwx 1 root root 47 09-03 19:03 /usr/x86_64-pc-linux-gnu/bin/ld -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.25.1/ld Hi, This might be irrelevant, but maybe kate install flags should be modified so it's dependant on version of qt/KDE (4 vs. 5) used - emerge tried to install the newest version of kde-apps/kate-15.x while it's available for qt5 users (+flagged unstable) and requires additional frameworks (in my system qt usage was unspecified at the moment), but even if -qt5 is specified in USE explicitly, portage suggests kate-15.x regardless. To omit the need of installing frameworks one must specify explicitly the desired version of kate editor; emerge =kde-apps/kate-4.13.3 (at this moment). The problem of kate is solved in my case, but the problem of emerging qtquickcontrols remains open. Regards, M. Ogrodnik What's the output of ld -v ? (In reply to M Ogrodnik from comment #4) > Hi, > > This might be irrelevant, but maybe kate install flags should be modified so > it's dependant on version of qt/KDE (4 vs. 5) used - emerge tried to install > the newest version of kde-apps/kate-15.x while it's available for qt5 users > (+flagged unstable) and requires additional frameworks (in my system qt > usage was unspecified at the moment), but even if -qt5 is specified in USE > explicitly, portage suggests kate-15.x regardless. To omit the need of > installing frameworks one must specify explicitly the desired version of > kate editor; emerge =kde-apps/kate-4.13.3 (at this moment). > > The problem of kate is solved in my case, but the problem of emerging > qtquickcontrols remains open. > > Regards, > M. Ogrodnik USE flags don't work like that - they are used to control features of individual packages, not to include/exclude which versions get pulled in. (In reply to Michael Palimaka (kensington) from comment #5) > What's the output of ld -v ? Please provide this info. Also, what is /usr/bin/x86_64-pc-linux-gnu-ld.gold? is it a symlink? if so, what does it point to? does the symlink target exist? (In reply to Davide Pesavento from comment #7) > (In reply to Michael Palimaka (kensington) from comment #5) > > What's the output of ld -v ? $ ld -v GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 > Also, what is /usr/bin/x86_64-pc-linux-gnu-ld.gold? is it a symlink? if so, > what does it point to? does the symlink target exist? It is a symlink, its target is: $ ls -l x86_64-pc-linux-gnu-ld.gold lrwxrwxrwx 1 root root 36 08-04 20:06 x86_64-pc-linux-gnu-ld.gold -> /usr/x86_64-pc-linux-gnu/bin/ld.gold which then points another symlink: $ ls -l /usr/x86_64-pc-linux-gnu/bin/ld.gold lrwxrwxrwx 1 root root 52 08-04 20:06 /usr/x86_64-pc-linux-gnu/bin/ld.gold -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.25.1/ld.gold And it turns out eventually that target does not exist: # ls -l /usr/x86_64-pc-linux-gnu/binutils-bin/2.25.1/ld.gold ls: cannot access /usr/x86_64-pc-linux-gnu/binutils-bin/2.25.1/ld.gold: No such file or directory So what's the output of emerge -pv sys-devel/binutils ? (In reply to Davide Pesavento from comment #9) > So what's the output of emerge -pv sys-devel/binutils ? # emerge -pv sys-devel/binutils These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-devel/binutils-2.25.1-r1::gentoo USE="nls zlib -cxx (-multislot) -multitarget -static-libs {-test} -vanilla" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB You don't have gold (ld.gold) because you built binutils with USE="-cxx". And you probably turned it off *after* emerging qtcore:5, so qt was configured to use gold, and the build system expects to find it (with no fallback) when building the other modules too. I'm not sure I want to support this scenario. Please attach your /usr/lib64/qt5/mkspecs/qmodule.pri so that I can confirm the above theory. (In reply to Davide Pesavento from comment #11) > You don't have gold (ld.gold) because you built binutils with USE="-cxx". > And you probably turned it off *after* emerging qtcore:5, so qt was > configured to use gold, and the build system expects to find it (with no > fallback) when building the other modules too. I'm not sure I want to > support this scenario. > > Please attach your /usr/lib64/qt5/mkspecs/qmodule.pri so that I can confirm > the above theory. # cat qmodule.pri CONFIG += qpa largefile nostrip enable_new_dtags sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 QT_BUILD_PARTS += libs tools QT_NO_DEFINES = ALSA CUPS DBUS EGL EGLFS EGL_X11 EVDEV FONTCONFIG FREETYPE HARFBUZZ IMAGEFORMAT_JPEG IMAGEFORMAT_PNG LIBPROXY MITSHM OPENGL OPENSSL OPENVG PULSEAUDIO SHAPE SSL STYLE_GTK TABLET TSLIB XCURSOR XFIXES XINERAMA XINPUT XKB XRANDR XRENDER XSYNC XVIDEO ZLIB QT_QCONFIG_PATH = host_build { QT_CPU_FEATURES.x86_64 = mmx sse sse2 } else { QT_CPU_FEATURES.x86_64 = mmx sse sse2 } QT_COORD_TYPE = double QT_LFLAGS_ODBC = -lodbc QMAKE_AR = x86_64-pc-linux-gnu-ar cqs QMAKE_RANLIB = x86_64-pc-linux-gnu-ranlib QMAKE_STRIP = x86_64-pc-linux-gnu-strip QMAKE_OBJDUMP = x86_64-pc-linux-gnu-objdump QMAKE_LINK = x86_64-pc-linux-gnu-g++ QMAKE_CC = x86_64-pc-linux-gnu-gcc QMAKE_CXX = x86_64-pc-linux-gnu-g++ QMAKE_CFLAGS = -O2 -pipe QMAKE_CXXFLAGS = -O2 -pipe QMAKE_LFLAGS = -Wl,-O1 -Wl,--as-needed styles += mac fusion windows DEFINES += QT_NO_MTDEV QT_CFLAGS_GLIB = -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include QT_LIBS_GLIB = -lgthread-2.0 -pthread -lglib-2.0 QMAKE_INCDIR_LIBUDEV = QMAKE_LIBS_LIBUDEV = -ludev DEFINES += QT_NO_EVDEV DEFINES += QT_NO_TSLIB DEFINES += QT_NO_LIBINPUT sql-drivers = sql-plugins = It actually happened to me too, with dev-qt/qtsvg-5.6.1. I'm trying to reduce my USE flags as much as possible. Sure is a corner case though, particularly since "cxx" is a default USE flag. And searching for the error message leads here with the solution (re-enabling the "cxx" USE flag of sys-devel/binutils, or re-emerging all installed dev-qt/*). I suppose there could possibly be a warning when emerging binutils with "-cxx", if some dev-qt packages are currently installed... Hopefully this should no longer be a problem since we force the system linker now: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64b2ad10079f4c4931520ef102b35f672ee74d99 |