Building RUNPATH into ghc binaries for 3rd-party libraries

Hi. I am building ghc-8.0.2 on RHEL 6 and trying to get the runtime path for 3rd-party libraries outside of the system search path embedded into the ghc binaries. Specifically, this is for libffi and libgmp. I am using the attached patch for this and it seems to work for the most part. It does not work for ghc-iserv through: $ cd /usr/local/ghc80/lib/ghc-8.0.2/bin $ ldd ghc-iserv linux-vdso.so.1 => (0x00007fffba3ff000) librt.so.1 => /lib64/librt.so.1 (0x00000033e0e00000) libutil.so.1 => /lib64/libutil.so.1 (0x00000033f0200000) libdl.so.2 => /lib64/libdl.so.2 (0x00000033e0600000) libgmp.so.10 => not found libm.so.6 => /lib64/libm.so.6 (0x00000033e0200000) libffi.so.6 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00000033e0a00000) libc.so.6 => /lib64/libc.so.6 (0x00000033dfe00000) /lib64/ld-linux-x86-64.so.2 (0x00000033dfa00000) I presume I need to add something like the following to iserv/ghc.mk somewhere? -optl-Wl,-rpath,$(FFILibDir) \ -optl-Wl,-rpath,$(GMP_LIB_DIRS) \ -- albert chin (china@thewrittenword.com)
participants (1)
-
Albert Chin