From: "Ara.T.Howard" Date: 2004-04-18T00:54:09+09:00 Subject: Re: LD_RUN_PATH On Sat, 17 Apr 2004, Ceri Storey wrote: > On Fri, Apr 16, 2004 at 04:04:19PM +0900, Ara.T.Howard wrote: > > i just had something weird crop up when intalling ruby as root in a > > non-standard place: compiling with LD_RUN_PATH=/non/standard/place/lib doesn't > > work since the linker doesn't seem to take the env setting when user==root. > > what else would be the preferred methods of encoding lib paths in ruby > > extensions? DLDFLAGS? > > By far the best way to do this, is to use RPATHs. That is, hardcode the > location into the extension binary. Although exactly how to do this > depends on your compiler OS combination. > > If you're using the typical gcc / gnu binutils combination, then you can > do this by adding -Wl,-R,/path/to/shlibs to the LDFLAGS variable (or > just manually add it to the linker command line). isn't this what setting LD_RUN_PATH does anyhow? seems safer to set the env and let gcc figure out the flags... -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | URL :: http://www.ngdc.noaa.gov/stp/ | TRY :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done ===============================================================================