bug#63728: GHC cannot find lrt
Mekeor Melire writes: > 2023-05-25 22:25 bug-guix@gnu.org: > >> Attempting to build a trivial Haskell program using ghc fails, as the linker >> cannot find the rt library: > > Does installing gcc-toolchain:static help as a work-around? I merged this bug with #63258. The gcc-toolchain:static workaround fixes the rt problem, but now the binaries aren't linked to libgmp and libffi, even though gmp and libffi packages are installed in the profile: --8<---cut here---start->8--- ~$ ghc -O2 test.hs ~$ ldd ./test linux-vdso.so.1 (0x7ffe0956f000) libgmp.so.10 => not found libc.so.6 => /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so.6 (0x7fbe27e3f000) libm.so.6 => /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libm.so.6 (0x7fbe27d62000) libffi.so.8 => not found libgcc_s.so.1 => /gnu/store/qcg59v4yg239jj1k0xvqqqkqv6l8q6ll-gcc-12.2.0-lib/lib/libgcc_s.so.1 (0x7fbe27d41000) /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/ld-linux-x86-64.so.2 => /gnu/store/ip9mj1pwymxi1yq32zbhwp3n3bycy6yi-glibc-2.35/lib/ld-linux-x86-64.so.2 (0x7fbe2803d000) --8<---cut here---end--->8--- Maybe there should be a ghc-toolchain package that has libgmp and libffi as inputs, and makes sure GHC links them correctly?
bug#63728: (no subject)
merge 63258 63728
bug#63728: GHC cannot find lrt
Attempting to build a trivial Haskell program using ghc fails, as the linker cannot find the rt library: ``` ~ $ ghc -O2 test.hs Linking test ... /home/a/.guix-profile/bin/ld: cannot find -lrt: No such file or directory collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) ``` Glibc and gcc-toolchain are installed in the profile, and ~/.guix-profile/lib/librt.so.1 exists. Maybe this is related to this new bug, or the recent core-updates merge? https://issues.guix.gnu.org/63238
bug#57742: [PATCH core-updates] build: qt-utils: Add prefix when wrapping QT_PLUGIN_PATH variable.
Please ignore the QT patch I just sent, it's exactly the same as yours, and I sent it before I saw your message from 20 minutes ago. Sorry! When I tested the patch I didn't get any of that noise about "Plugin uses incompatible Qt library", although the program I tested with may have configured QT to be less verbose.
bug#57742: [PATCH core-updates] build: qt-utils: Add prefix when wrapping QT_PLUGIN_PATH variable.
This allows extension of QT_PLUGIN_PATH. QT programs will now work under Wayland when qt-wayland is installed. * guix/build/qt-utils.scm (variables-for-wrapping)[QT_PLUGIN_PATH]: Add prefix value to 'wrap-program' procedure call for QT_PLUGIN_PATH variable. --- Tested using Wayland and X (via XWayland), using plugin paths for QT5, QT6, or both. In all cases, QT selects the correct plugin if it's present anywhere in QT_PLUGIN_PATH. guix/build/qt-utils.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm index 2e47f1bc02..b503659521 100644 --- a/guix/build/qt-utils.scm +++ b/guix/build/qt-utils.scm @@ -89,7 +89,7 @@ (define exists? (match file-type '("XDG_CONFIG_DIRS" suffix directory "/etc/xdg") ;; We wrap exactly to avoid potentially mixing Qt5/Qt6 components, which ;; would cause warnings, perhaps problems. -`("QT_PLUGIN_PATH" = directory +`("QT_PLUGIN_PATH" prefix directory ,(format #f "/lib/qt~a/plugins" qt-major-version)) `("QML2_IMPORT_PATH" = directory ,(format #f "/lib/qt~a/qml" qt-major-version)) -- 2.38.1