From: nobu.nokada@... Date: 2004-04-16T16:51:28+09:00 Subject: Re: LD_RUN_PATH Hi, At Fri, 16 Apr 2004 16:04:19 +0900, Ara.T.Howard wrote in [ruby-talk:97329]: > 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? XLDFLAGS is for linking main program. But LD_RUN_PATH seems to be embedded. $ LD_RUN_PATH=/runpath/ruby make ruby gcc -ggdb -g3 -Os -fPIC -rdynamic -L. main.o -lruby-1.9 -ldl -lcrypt -lm -o ruby $ strings ruby | grep runpath /runpath/ruby $ mv ruby ruby-with-runpath $ sudo env LD_RUN_PATH=/runpath/ruby make ruby gcc -ggdb -g3 -Os -fPIC -rdynamic -L. main.o -lruby-1.9 -ldl -lcrypt -lm -o ruby $ strings ruby | grep runpath /runpath/ruby $ cmp ruby ruby-with-runpath And, basically, do you really need to compile by root, not to just install? -- Nobu Nakada