sworda / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
0 stars 0 forks source link

[SOLVED] Error while compiling serf-1.3.6 from source on Linux during the check phase #149

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

Not sure if I'm doing something wrong here, but it seems that the 
LD_LIBRARY_PATH environment variable is not being read when compiling serf from 
source (serf-1.3.6.tar.bz2) on Linux (RHEL4). Actually it fails only during the 
"check" step.

Due to restrictions on my Linux server I had to install everything locally 
(SCons, Python, OpenSSL, APR, etc.). All looks and works fine, but when I try 
to compile serf from source by running the following steps look what I get:

$ scons APR=$HOME/local APU=$HOME/local OPENSSL=$HOME/local PREFIX=$HOME/local 
CFLAGS=-m64
(builds everything just fine)

$ scons check CFLAGS=-m64

== Testing test/testcases/chunked-trailers.response ==
test/serf_response: error while loading shared libraries: libssl.so.1.0.0: 
cannot open shared object file: No such file or directory
ERROR: test case test/testcases/chunked-trailers.response failed
scons: *** [check] Error 1
scons: building terminated because of errors.

The way I fixed this was to edit build/check.py file and add the following line 
right before the subprocess.check_call([SERF_RESPONSE_EXE, case]) one:

os.environ["LD_LIBRARY_PATH"] = "/home/myuserid/local/lib"

Yes, I had the LD_LIBRARY_PATH set in my ~/.profile and it's working, but for 
some reason it's not being passed to the child process' environment (is it a 
Python issue?).

After adding this line everything works as expected.

I just wanted to let you guys know, in case this is indeed something in serf 
and not in my particular environment.

Thanks.

Original issue reported on code.google.com by felix.al...@gmail.com on 17 Jul 2014 at 2:55