Subject: | make test fails at "test_cgi" because of missing LD_LIBRARY_PATH on SunOS with /opt/csw/lib/* |
Hi there,
I have libiconv and other stuff in '/opt/csw/lib', so I configure this way:
$ cat config.nice
#! /bin/sh
#
# Created by configure
CPPFLAGS="-I/opt/csw/lib"; export CPPFLAGS
LDFLAGS="-L/opt/csw/lib"; export LDFLAGS
./configure '--with-apache2-apxs=/opt/apache22/bin/apxs'
'LDFLAGS=-L/opt/csw/lib' 'CPPFLAGS=-I/opt/csw/lib' "$@"
It compiles fine, but it fails at "make test" on test_cgi:
Test Summary Report
-------------------
t/cgi.t (Wstat: 0 Tests: 31 Failed: 31)
Failed tests: 1-31
with many cries in 't/logs/error_log':
ld.so.1: test_cgi: fatal: libiconv.so.2: open failed: No such file
or directory
Indeed, anything gets correctly linked against iconv, f.i.:
$ ldd module/t/cgi-bin/.libs/test_cgi | egrep -i iconv
libiconv.so.2 => /opt/csw/lib/libiconv.so.2
but the running httpd/mod_cgi doesn't know about '/opt/csw/lib' (most
modules are DSO; I set the correct LD_LIBRARY_PATH).
Adding the following snippet in 't/conf/extra.conf.in' solves the issue:
<IfModule mod_env.c>
PassEnv LD_LIBRARY_PATH
</IfModule>
Cheers,
^m'e