This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dlopen vs. RUNPATH


Hello,

I have a use case where libgcc_s.so fails to be dlopenâd, even though
its directory is in the main applicationâs RUNPATH:

--8<---------------cut here---------------start------------->8---
$ LD_DEBUG=libs ./check-guile threads.test
  [...]
     22551:	find library=libgcc_s.so.1 [0]; searching
     22551:	 search path=/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs		(LD_LIBRARY_PATH)
     22551:	  trying file=/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs/libgcc_s.so.1
     22551:	 search path=/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib:/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib:/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib:/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib:/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib		(RUNPATH from file /tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs/guile)
     22551:	  trying file=/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib/libgcc_s.so.1
     22551:	  trying file=/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib/libgcc_s.so.1
     22551:	  trying file=/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib/libgcc_s.so.1
     22551:	  trying file=/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib/libgcc_s.so.1
     22551:	  trying file=/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib/libgcc_s.so.1
     22551:	 search cache=/etc/etc/ld.so.cache
     22551:	 search path=/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib		(system search path)
     22551:	  trying file=/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib/libgcc_s.so.1
     22551:	
libgcc_s.so.1 must be installed for pthread_cancel to work
Aborted

$ objdump -x /tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/libguile/.libs/guile | grep PATH
  RPATH                /nix/store/gki8sf345ymchq59j3y7r1nw8r3w636g-guile-2.0.9/lib:/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib:/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib:/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib:/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib:/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib:/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib64:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib
  RUNPATH              /nix/store/gki8sf345ymchq59j3y7r1nw8r3w636g-guile-2.0.9/lib:/nix/store/080d391y67nm362gr5fdnwlxymp3qwa2-libgc-7.2d/lib:/nix/store/c8g538vxnrmqfp1s4jd3axrkg9f76fsm-libffi-3.0.13/lib:/nix/store/8pmkh1fnm3an4dnilhi9nxn1mvfymi72-libunistring-0.9.3/lib:/nix/store/w08bzyqcwm9hs41wj2b6329rzswcwc5k-gmp-5.1.3/lib:/nix/store/9kwmx9f1by9na0lw83b4bj8mj5x567a2-libtool-2.4.2/lib:/nix/store/j1nbq7prs34wd09yj5hmcnqr7krlacf4-glibc-2.18/lib:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib64:/nix/store/i9x5nm2ff05n67f81zx7dswsq6bl7iaq-gcc-4.8.2/lib
--8<---------------cut here---------------end--------------->8---

Notice that the âRUNPATH from fileâ debug statement doesnât include
${glibc}/lib and ${gcc}/lib, although they do appear in the RUNPATH.

What am I missing?

Thanks,
Ludoâ.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]