Re: 'libstdc++.so.6' cannot be found in RUNPATH ()
Hi Hinko, Hinko Kocevar writes: > Hi Ludovic, > > Thank you for the insight. > > Is there a way to have the check pass by other means (i.e not skip the check)? One thing you could do is patch the RUNPATH of the library. You can do this with the ‘patchelf’ command. A good starting place might be to look at the Rust bootstrap package. It uses ‘patchelf’ to update the RUNPATH of binaries, and leaves the ‘validate-runpath’ phase in place. > I will resort to skipping the check as immediate solution. > > /hinko
Re: 'libstdc++.so.6' cannot be found in RUNPATH ()
Hi Ludovic, Thank you for the insight. Is there a way to have the check pass by other means (i.e not skip the check)? I will resort to skipping the check as immediate solution. /hinko From: Ludovic Courtès Sent: Tuesday, June 26, 2018 1:43:01 PM To: Hinko Kocevar Cc: help-guix@gnu.org Subject: Re: 'libstdc++.so.6' cannot be found in RUNPATH () Hinko Kocevar skribis: > The package builds fine, but validate-runpath phase fails with messages: > > starting phase `validate-runpath' > validating RUNPATH of 10 binaries in > "/gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib"... > /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libandor.so: > error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () What this phase does is traverse all the binaries and make sure that every shared library they depend on (the ‘NEEDED’ entry of the ELF file) can be found in their ‘RUNPATH’. IOW, that’s a QA check that we make on packages by default. Packages built on systems that follow the file system hierarchy standard (FHS) typically don’t do that because they assume that things like libstdc++.so can be found in the “standard location”—i.e., /usr/lib or similar. Anyway, you can forcefully bypass this check if you think it’s unneeded, by adding: #:validate-runpath? #f to the ‘arguments’ field of your package. HTH, Ludo’.
Re: 'libstdc++.so.6' cannot be found in RUNPATH ()
Hinko Kocevar skribis: > The package builds fine, but validate-runpath phase fails with messages: > > starting phase `validate-runpath' > validating RUNPATH of 10 binaries in > "/gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib"... > /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libandor.so: > error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () What this phase does is traverse all the binaries and make sure that every shared library they depend on (the ‘NEEDED’ entry of the ELF file) can be found in their ‘RUNPATH’. IOW, that’s a QA check that we make on packages by default. Packages built on systems that follow the file system hierarchy standard (FHS) typically don’t do that because they assume that things like libstdc++.so can be found in the “standard location”—i.e., /usr/lib or similar. Anyway, you can forcefully bypass this check if you think it’s unneeded, by adding: #:validate-runpath? #f to the ‘arguments’ field of your package. HTH, Ludo’.
Re: 'libstdc++.so.6' cannot be found in RUNPATH ()
Hi Pierre! thank you for the input. I've made the changes as suggested. Sadly it does not help, I'm getting the same behavior. Inside the environment-variables I can see the gcc-5.4.0-lib listed: export LIBRARY_PATH="/gnu/store/bzn4wyrbdmfc1bd7lq05db5psfl5f8x8-perl-5.26.0/lib:/gnu/store/6hicns85s8ddp0y539wdspwx22ac2kmv-bzip2-1.0.6/lib:/gnu/store/g3nari57wcfnm00kv9bnpyzdzfq4h8pk-xz-5.2.2/lib:/gnu/store/msw2q7nr3vfmgwyxf15y0x7qbngs9y3d-file-5.30/lib:/gnu/store/9pq16kfcldqqcbd58mmfp37g3awhg4sd-gawk-4.1.4/lib:/gnu/store/nnykzgwfy8mwh2gmxm715sjxykg8qjwn-binutils-2.28/lib:/gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib:/gnu/store/y31sxrygd9ifpxra06bmlx8c52gbydd4-glibc-utf8-locales-2.25/lib:/gnu/store/mpa86gcr3wk7yzvbdxc58j5vddqcs3w0-epics-base-3.15.5/lib:/gnu/store/j9rxwf40xw2r5drycijl4l25l4bja8qv-epics-asyn-R4-33/lib:/gnu/store/f0m8rdd0vv0gdddi2grpcb5swxd5zp2f-epics-busy-R1-7/lib:/gnu/store/61fcp65n6jvaz2hyzy31im408h5a79yl-epics-autosave-R5-9/lib:/gnu/store/s55cw29248kzl3c61vgawb4csrbkivry-epics-calc-R3-7/lib:/gnu/store/6dv72pq83gv7y2qxk60rasa2dqjr2nmm-epics-sscan-R2-11/lib:/gnu/store/a35yjr26wizmj7vbxbf2s8x3p6g7hb4m-epics-seq-R2-2-6/lib:/gnu/store/gs898mgcbzi0zx5wikylz0zrb756mg75-epics-adsupport-R1-4/lib:/gnu/store/i4vqyz44pa31iypwbq06zvw52yk2jmlg-epics-adcore-R3-2/lib:/gnu/store/mipizipnr4y2hly9b429j8id1albbgqi-readline-7.0/lib:/gnu/store/2rzp2py00609lvkh977bfyxja7wd5idx-gcc-5.4.0-lib/lib:/gnu/store/09j7scnl3hahcmql986fsjpzj6gqsmzv-ncurses-6.0/lib" Let me point out that the library depending on libstdc++.so.6 does not get compiled, nor does the package use it in anyway. What I'm getting at is that since libstdc++.so.6 is not actually referenced by the package in any way (though the failing lib), can it be that that gcc-5.4.0-lib gets stripped away somewhere along the way? Thanks! Hinko From: Pierre Neidhardt Sent: Monday, June 25, 2018 9:03 PM To: Hinko Kocevar Cc: help-guix@gnu.org Subject: Re: 'libstdc++.so.6' cannot be found in RUNPATH () Hi Hinko! Packaging is done in a sandboxed environment that is totally independent of your installation. So you don't need to install gcc at all. You don't need to propagate the input either, because the end-user only cares about the package, not the dependent libraries. Last, you seem to have forgotten the version in the input. Try with the following line instead: (inputs `(("gcc:lib" ,gcc-5 "lib"))) Hope that helps. -- Pierre Neidhardt Speak softly and own a big, mean Doberman. -- Dave Millman
Re: 'libstdc++.so.6' cannot be found in RUNPATH ()
Hi Hinko! Packaging is done in a sandboxed environment that is totally independent of your installation. So you don't need to install gcc at all. You don't need to propagate the input either, because the end-user only cares about the package, not the dependent libraries. Last, you seem to have forgotten the version in the input. Try with the following line instead: (inputs `(("gcc:lib" ,gcc-5 "lib"))) Hope that helps. -- Pierre Neidhardt Speak softly and own a big, mean Doberman. -- Dave Millman signature.asc Description: PGP signature
'libstdc++.so.6' cannot be found in RUNPATH ()
Hi, I have a prebuilt shared library that depends on 'libstdc++.so.6'. For that I installed gcc@5.4.0:lib and added it to the propagated-inputs: (propagated-inputs `(("gcc:lib" ,gcc "lib"))) The package builds fine, but validate-runpath phase fails with messages: starting phase `validate-runpath' validating RUNPATH of 10 binaries in "/gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib"... /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libandor.so: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libandor.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libandor.so.2: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libandor.so.2: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libshamrockcif.so: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libshamrockcif.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libshamrockcif.so.2: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64-debug/libshamrockcif.so.2: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libandor.so: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libandor.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libandor.so.2: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libandor.so.2: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libshamrockcif.so: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libshamrockcif.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libshamrockcif.so.2: error: depends on 'libstdc++.so.6', which cannot be found in RUNPATH () /gnu/store/i7qkw5j3d0rm00l2k88p0bbaj6b204fh-epics-adandor-R2-7/lib/linux-x86_64/libshamrockcif.so.2: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () phase `validate-runpath' failed after 0.0 seconds I can see the path to gcc-5.4.0-lib/lib in exported LIBRARY_PATH inside the the environment-variables, after keep the build tree. If I enter the environment and then issue ldd the results looks like this: hinxx@obzen /tmp/guix-build-epics-adandor-R2-7.drv-0/ADAndor-R2-7 $ ldd /gnu/store/y7i1a9nv3y45zm2zg1sp2wa0nlzdw9f0-epics-adandor-R2-7/lib/linux-x86_64/libandor.so ldd: warning: you do not have execution permission for `/gnu/store/y7i1a9nv3y45zm2zg1sp2wa0nlzdw9f0-epics-adandor-R2-7/lib/linux-x86_64/libandor.so' linux-vdso.so.1 (0x7ffd4b5fd000) libpthread.so.0 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libpthread.so.0 (0x7f4ca7abe000) libdl.so.2 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libdl.so.2 (0x7f4ca78ba000) librt.so.1 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/librt.so.1 (0x7f4ca76b2000) libstdc++.so.6 => not found libm.so.6 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libm.so.6 (0x7f4ca73a) libgcc_s.so.1 => not found libc.so.6 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libc.so.6 (0x7f4ca7001000) /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/ld-linux-x86-64.so.2 (0x7f4ca85b4000) Any ideas why is it failing to locate libstdc++.so.6? TIA, Hinko