From: Ceri Storey Date: 2004-04-17T17:53:33+09:00 Subject: Re: LD_RUN_PATH 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). -- Ceri Storey