[Nix-dev] golden-cheetah compiling, but not linking against Qt correctly
Oliver Charles
ollie at ocharles.org.uk
Mon Apr 10 18:31:00 CEST 2017
Hi all,
I've been stuck on this for a while. In nixpkgs, we have a golden-cheetah
expression. In all-packages.nix:
golden-cheetah = libsForQt5.callPackage
../applications/misc/golden-cheetah {};
It builds just fine, but when I try and actually run it:
→ ./result/bin/GoldenCheetah
./result/bin/GoldenCheetah: error while loading shared libraries:
libQt5Svg.so.5: cannot open shared object file: No such file or directory
If we prod the binary with ldd:
→ ldd ./result/bin/.GoldenCheetah-wrapped
linux-vdso.so.1 (0x00007ffc597aa000)
libssl.so.1.0.0 =>
/nix/store/9x03gg4ia71qv6ffj12q4frcm39rq65k-openssl-1.0.2k/lib/libssl.so.1.0.0
(0x00007fae8bbb4000)
libcrypto.so.1.0.0 =>
/nix/store/9x03gg4ia71qv6ffj12q4frcm39rq65k-openssl-1.0.2k/lib/libcrypto.so.1.0.0
(0x00007fae8b778000)
libQt5Svg.so.5 => not found
libQt5MultimediaWidgets.so.5 => not found
libQt5WebKitWidgets.so.5 => not found
libQt5Charts.so.5 => not found
libQt5Widgets.so.5 => not found
libQt5Multimedia.so.5 => not found
libQt5WebKit.so.5 => not found
libQt5Gui.so.5 => not found
libQt5Xml.so.5 => not found
libQt5Sql.so.5 => not found
libQt5Network.so.5 => not found
libQt5Concurrent.so.5 => not found
libQt5SerialPort.so.5 => not found
libQt5Bluetooth.so.5 => not found
libQt5Core.so.5 => not found
libGL.so.1 => /run/opengl-driver/lib/libGL.so.1 (0x00007fae8b57b000)
libpthread.so.0 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libpthread.so.0
(0x00007fae8b35d000)
libpulse-mainloop-glib.so.0 =>
/nix/store/6avy04i2aiiiwb1vni4amf6dhl5cr50r-libpulseaudio-10.0/lib/libpulse-mainloop-glib.so.0
(0x00007fae8b158000)
libpulse.so.0 =>
/nix/store/6avy04i2aiiiwb1vni4amf6dhl5cr50r-libpulseaudio-10.0/lib/libpulse.so.0
(0x00007fae8af06000)
libglib-2.0.so.0 =>
/nix/store/hsqi48x55vxl9xxf3q3am7cv7jzm45q9-glib-2.50.3/lib/libglib-2.0.so.0
(0x00007fae8abf2000)
libstdc++.so.6 =>
/nix/store/mpi06h1i531wdjrmp6dnq4hwyrm52hcy-gcc-5.4.0-lib/lib/libstdc++.so.6
(0x00007fae8a87a000)
libm.so.6 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libm.so.6
(0x00007fae8a567000)
libgcc_s.so.1 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libgcc_s.so.1
(0x00007fae8a351000)
libc.so.6 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libc.so.6
(0x00007fae89fb2000)
libz.so.1 => not found
libdl.so.2 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libdl.so.2
(0x00007fae89dae000)
libXext.so.6 => /run/opengl-driver/lib/libXext.so.6
(0x00007fae89b9c000)
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/ld-linux-x86-64.so.2
(0x00007fae8be22000)
libpulsecommon-10.0.so =>
/nix/store/6avy04i2aiiiwb1vni4amf6dhl5cr50r-libpulseaudio-10.0/lib/pulseaudio/
libpulsecommon-10.0.so (0x00007fae89919000)
libsndfile.so.1 =>
/nix/store/sg8zh61a68nmvc7wkqzhdznbr2pv8w2n-libsndfile-1.0.27/lib/libsndfile.so.1
(0x00007fae896a0000)
libFLAC.so.8 =>
/nix/store/wham49h9mpb0cz61y9qpg573cbc2xil1-flac-1.3.2/lib/libFLAC.so.8
(0x00007fae89447000)
libvorbisenc.so.2 =>
/nix/store/sl3llmcfwizk5rvm7hxqlm3bwiw1igw3-libvorbis-1.3.5/lib/libvorbisenc.so.2
(0x00007fae8919d000)
libvorbis.so.0 =>
/nix/store/sl3llmcfwizk5rvm7hxqlm3bwiw1igw3-libvorbis-1.3.5/lib/libvorbis.so.0
(0x00007fae88f71000)
libogg.so.0 =>
/nix/store/lp127pirk7scs83pfdrjki9igpap9584-libogg-1.3.2/lib/libogg.so.0
(0x00007fae88d6a000)
libdbus-1.so.3 =>
/nix/store/21akz9yprm9blkjkgb2lrzx6hh13kfzp-dbus-1.10.16-lib/lib/libdbus-1.so.3
(0x00007fae88b1a000)
libsystemd.so.0 =>
/nix/store/8qm6wqd3ya2n3d8kijq666y6573sqx02-systemd-232-lib/lib/libsystemd.so.0
(0x00007fae8bfac000)
libpcre.so.1 =>
/nix/store/70y018kangkrrxr6iv8mmh3ar9kq5jj8-pcre-8.40/lib/libpcre.so.1
(0x00007fae888a7000)
libcap.so.2 =>
/nix/store/k59ifmyjdhbw7fr2g96b0rnsqnp27h3a-libcap-2.25-lib/lib/libcap.so.2
(0x00007fae886a2000)
librt.so.1 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/librt.so.1
(0x00007fae8849a000)
libX11.so.6 => /run/opengl-driver/lib/libX11.so.6
(0x00007fae8815a000)
libxcb.so.1 =>
/nix/store/6yr132cr98716pc7rpzsafzcbxqa3670-libxcb-1.12/lib/libxcb.so.1
(0x00007fae87f32000)
libXau.so.6 =>
/nix/store/rjckhm7wf7n9m709c1zi41yzgdcm8lrz-libXau-1.0.8/lib/libXau.so.6
(0x00007fae87d2e000)
libXdmcp.so.6 =>
/nix/store/7sl3vk0fmzw7390j4v4kxvg0jkrn46kn-libXdmcp-1.1.2/lib/libXdmcp.so.6
(0x00007fae87b28000)
libresolv.so.2 =>
/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libresolv.so.2
(0x00007fae87912000)
liblzma.so.5 =>
/nix/store/cgp591zh14lhh1mnp6rm3kw0qlkr55ip-xz-5.2.2/lib/liblzma.so.5
(0x00007fae876ec000)
liblz4.so.1 =>
/nix/store/0fxa061fb7p08p27gii4riyxr25v8yz1-lz4-131/lib/liblz4.so.1
(0x00007fae874da000)
libgcrypt.so.20 =>
/nix/store/l5iq1p83q3gfykj5lknwrjcr04ivsads-libgcrypt-1.7.6/lib/libgcrypt.so.20
(0x00007fae871cb000)
libgpg-error.so.0 =>
/nix/store/zsw7pzr5f3an6f4wxp8mrawnycdkzjv1-libgpg-error-1.27/lib/libgpg-error.so.0
(0x00007fae86fb6000)
Which is certainly no good. patchelf tells me:
→ patchelf --print-rpath ./result/bin/.GoldenCheetah-wrapped
/tmp/nix-build-golden-cheetah-3.5-DEV1703.drv-0/__nix_qt5__/lib:/nix/store/53afm4ss07fm7g4rx5wjp3nky7cgj1yf-mesa-noglu-17.0.3/lib:/nix/store/hsqi48x55vxl9xxf3q3am7cv7jzm45q9-glib-2.50.3/lib:/nix/store/6avy04i2aiiiwb1vni4amf6dhl5cr50r-libpu
lseaudio-10.0/lib:/nix/store/9x03gg4ia71qv6ffj12q4frcm39rq65k-openssl-1.0.2k/lib:/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib:/nix/store/mpi06h1i531wdjrmp6dnq4hwyrm52hcy-gcc-5.4.0-lib/lib
So /tmp stuff is ending up in the rpath, rather than the actual Qt
libraries.
Does anyone know what's going on here? Is golden-cheetah doing something
funky with its build scripts?
https://github.com/GoldenCheetah/GoldenCheetah/blob/master/src/src.pro
- Ollie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170410/7f022f25/attachment.html>
More information about the nix-dev
mailing list