Skip Menu |

This queue is for tickets about the libapreq2 CPAN distribution.

Report information
The Basics
Id: 66085
Status: open
Priority: 0/
Queue: libapreq2

People
Owner: Nobody in particular
Requestors: marcoep [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.13
Fixed in: (no value)



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
RT-Send-CC: apreq-dev [...] httpd.apache.org
If you use $ CPPFLAGS="-I/opt/csw/lib" LDFLAGS="-L/opt/csw/lib" ./configure ... will that make it work? I don't have access to a SunOS machine to test on, but off the top of my head, I believe it should do the trick... On Wed Feb 23 10:20:13 2011, marcoep@gmail.com wrote: Show quoted text
> Hi there, > > I have libiconv and other stuff in '/opt/csw/lib', so I configure
this way: Show quoted text
> > $ 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: Show quoted text
> > <IfModule mod_env.c> > PassEnv LD_LIBRARY_PATH > </IfModule> > > > Cheers, > > ^m'e > > >
-- ----- Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, just as is mankind. --Unknown
From: marcoep [...] gmail.com
Hi, Le Mer 23 Fév 2011 10:43:59, ISAAC a écrit : Show quoted text
> If you use > $ CPPFLAGS="-I/opt/csw/lib" LDFLAGS="-L/opt/csw/lib" ./configure ... > > will that make it work? I don't have access to a SunOS machine to test > on, but off the top of my head, I believe it should do the trick... >
that's exactly what I did, cf. my config lines below Show quoted text
> > $ cat config.nice > > #! /bin/sh > > # > > # Created by configure > > CPPFLAGS="-I/opt/csw/lib"; export CPPFLAGS > > LDFLAGS="-L/opt/csw/lib"; export LDFLAGS
But it's not enough, because it doesn't instruct "httpd.conf" to pass an LD_LIBRARY_PATH to the CGI env. For the same reason, "glue/perl/t/cgi.t" would fail. So I did: $ CPPFLAGS='-I/opt/csw/lib' LDFLAGS='-L/opt/csw/lib' ./configure --with-apache2-apxs='/opt/apache22/bin/apxs' --enable-perl-glue ... $ make ... $ cat <<EOT >> module/t/conf/extra.conf.in Show quoted text
> <IfModule mod_env.c> > PassEnv LD_LIBRARY_PATH > </IfModule> > EOT
$ cat <<EOT >> glue/perl/t/conf/extra.conf.in Show quoted text
> <IfModule mod_env.c> > PassEnv LD_LIBRARY_PATH > </IfModule> > EOT
$ LD_LIBRARY_PATH='/opt/csw/lib' make test All went fine! IMHO, the above manipulations should be done via autoconf + Apache::Test. Otherwise, please add a note to the README. Cheers, ^m'e
CC: apreq-dev [...] httpd.apache.org
Subject: Re: [rt.cpan.org #66085] make test fails at "test_cgi" because of missing LD_LIBRARY_PATH on SunOS with /opt/csw/lib/*
Date: Wed, 23 Feb 2011 12:29:14 -0800
To: bug-libapreq2 [...] rt.cpan.org
From: Fred Moyer <fred [...] redhotpenguin.com>
I like Marco's solution - am adding it to mod_perl. On Wed, Feb 23, 2011 at 7:44 AM, Issac Goldstand via RT <bug-libapreq2@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=66085 > > > If you use > $ CPPFLAGS="-I/opt/csw/lib" LDFLAGS="-L/opt/csw/lib"  ./configure ... > > will that make it work?  I don't have access to a SunOS machine to test > on, but off the top of my head, I believe it should do the trick... > > On Wed Feb 23 10:20:13 2011, marcoep@gmail.com wrote:
>> 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 >> >> >>
> > > -- > ----- > Maybe in order to understand mankind, we have to look at the word > itself: "Mankind". Basically, it's made up of two separate words - >  "mank" and "ind". What do these words mean ? It's a mystery, just as > is mankind. >  --Unknown >