You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/01/01 00:05:17 UTC

Re: [mp2] apr-ext/uuid.t fails on solaris

Brad Lanam wrote:
> On Wed, Dec 31, 2003 at 01:45:42PM -0800, Stas Bekman wrote:
> 
>>i.e. -R hardcodes the path to the libs. And -L is getting completely
>>ignored?
> 
> 
>     -L is the link-time search path.  It's used.
>     -R is the run-time search path.  This is stored in the executable
>        or shared library.
> 
> 
>>Can you please post me the complete build log? I want to see how APR.so was
>>linked. Thanks
> 
> 
> LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib" cc  -G -L/usr/local/lib -R/usr/lo
> cal/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib APR.o -xO3 -L/usr/loc
> al/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib -o .
> ./../../blib/arch/Apache2/auto/APR/APR.so   -L/export/apache2_dev/lib -lapr-0 -l
> sendfile -lrt -lm -lsocket -lnsl -lresolv -lpthread -ldl -L/export/apache2_dev/l
> ib -laprutil-0 -lexpat
> 
>     Here's the problem:
> 
>     LD_RUN_PATH is getting overridden by the specified -R path.
>     The -R specified is from the perl config.
> 
>     So either LD_RUN_PATH has to be set up to include all -R values,
>     and the -R(s) removed from the link command line.
> 
>     Or -R has to be added with the appropriate path rather than
>     using LD_RUN_PATH.
> 
>     Or I have to change my perl build to remove any specified -R
>     values, check *all* my perl module builds to make sure they work
>     afterwards.

No, no, this is not a good solution, since others have the same problem. You 
should leave perl as is. Who sets 
LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib"? I can't see us setting this 
value. Where does it come from? It must be ExtUtils::MakeMaker who does that, 
but where does it take these values from? especially 
"/export/apache2_dev/lib". Is it in your environment?


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Stas Bekman <st...@stason.org>.
Brad Lanam wrote:
> On Fri, Jan 02, 2004 at 03:50:11PM -0800, Stas Bekman wrote:
> 
>>What's the mnemonic for $tflags?
> 
> 
>     temp flags.
>     s/tflags/newlddlflags/g

OK, Thanks.

>>does this work?
> 
> 
>     Yes.  Makefile is correct.  APR.so is linked correctly.

Perfect. Now committed (with extra comments). Thanks a lot for you help, Brad.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Brad Lanam <bl...@gentoo.com>.
On Fri, Jan 02, 2004 at 03:50:11PM -0800, Stas Bekman wrote:
> What's the mnemonic for $tflags?

    temp flags.
    s/tflags/newlddlflags/g

> does this work?

    Yes.  Makefile is correct.  APR.so is linked correctly.

    -- Brad

LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib" cc
-L/export/apache2_dev/lib -R/export/apache2_dev/lib
-L/export/apache2_dev/lib -R/export/apache2_dev/lib -G -L/usr/local/lib
-R/usr/local/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib APR.o
-xO3 -L/usr/local/lib -R/usr/local/lib -L/usr/lib -L/usr/ccs/lib
-L/opt/SUNWspro/prod/lib -o ../../../blib/arch/Apache2/auto/APR/APR.so
-L/export/apache2_dev/lib -lapr-0 -lsendfile -lrt -lm -lsocket -lnsl
-lresolv -lpthread -ldl -L/export/apache2_dev/lib -laprutil-0 -lexpat

--
   -- Brad Lanam      bll@gentoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Stas Bekman <st...@stason.org>.
Brad Lanam wrote:
> On Fri, Jan 02, 2004 at 02:21:13PM -0800, Stas Bekman wrote:
> 
>>How about the following trickery. It arranges that LDDFLAGS will come after
>>LIBS, making sure that apache's -Rpath will come in first. This is untested.
> 
> 
>     No.  I don't think that's a good idea.
>     LDDLFLAGS has a bunch of -L args, and those have to appear
>     before the libraries.
> 
>     This patch works:

good, a few comments:

> +if (SOLARIS) {
> +    # make sure that all -L, -R from libs are moved
> +    # to lddflags.
> +    my $tflags = $libs;

What's the mnemonic for $tflags?

> +    $tflags =~ s{-[^LR]\S+}{}g;

So you want $tflags to contain only /-[LR]\S+/g. Which means that a different 
pattern is needed. How about:

my $tflags = join " ", $libs =~ /(-[LR]\S+)/g;

> +    # -R makes sure that these paths will be used
> +    $tflags =~ s{-L(\S+)}{-L$1 -R$1}g;
> +    $args{LDDLFLAGS} = $tflags . $build->perl_config('lddlflags');

$args{LDDLFLAGS} = $tflags . " " . $build->perl_config('lddlflags');

does this work?

Index: xs/APR/APR/Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
retrieving revision 1.18
diff -u -r1.18 Makefile.PL
--- xs/APR/APR/Makefile.PL      5 Nov 2003 08:29:17 -0000       1.18
+++ xs/APR/APR/Makefile.PL      2 Jan 2004 23:38:26 -0000
@@ -6,10 +6,18 @@
  use Apache::Build ();
  use Config;

-use constant WIN32 => Apache::Build::WIN32;
+use constant WIN32   => Apache::Build::WIN32;
+use constant SOLARIS => $^O eq 'solaris';
+
+my %args = (
+    'NAME'         => 'APR',
+    'VERSION_FROM' => 'APR.pm',
+);

  my $libs = '';
-if (my $apr_bindir = ModPerl::BuildMM::build_config()->apr_bindir()) {
+my $build = ModPerl::BuildMM::build_config();
+
+if (my $apr_bindir = $build->apr_bindir()) {

      # XXX: this works only with libapr 0.9.2+
      my $ext = WIN32 ? '.bat' : '';
@@ -24,8 +32,19 @@
      $libs =~ s{(\w+)\.lib}{-l$1}g;
  }

-ModPerl::BuildMM::WriteMakefile(
-    'NAME'        => 'APR',
-    'VERSION_FROM' => 'APR.pm',
-    'LIBS'         => [$libs],
-);
+if (SOLARIS && $libs) {
+    # make sure that all -L, -R from libs are moved
+    # to the beginning of lddflags.
+    my $tflags = join " ", $libs =~ /(-[LR]\S+)/g;
+
+    # -R makes sure that these paths will be used
+    $tflags =~ s{-L(\S+)}{-L$1 -R$1}g;
+    $args{LDDLFLAGS} = $tflags . " " . $build->perl_config('lddlflags');
+
+    # leave -L in libs -- MakeMaker needs it.
+    $libs =~ s{-R\S+}{}g;
+}
+
+$args{LIBS} = [$libs] if $libs;
+
+ModPerl::BuildMM::WriteMakefile(%args);

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Brad Lanam <bl...@gentoo.com>.
On Fri, Jan 02, 2004 at 02:21:13PM -0800, Stas Bekman wrote:
> How about the following trickery. It arranges that LDDFLAGS will come after
> LIBS, making sure that apache's -Rpath will come in first. This is untested.

    No.  I don't think that's a good idea.
    LDDLFLAGS has a bunch of -L args, and those have to appear
    before the libraries.

    This patch works:

    -- Brad

--- x/xs/APR/APR/Makefile.PL	Wed Nov  5 00:29:17 2003
+++ mod_perl-1.99_12/xs/APR/APR/Makefile.PL	Fri Jan  2 14:33:31 2004
@@ -7,9 +7,16 @@
 use Config;

 use constant WIN32 => Apache::Build::WIN32;
+use constant SOLARIS => $^O eq 'solaris';

+my %args = (
+    'NAME'        => 'APR',
+    'VERSION_FROM' => 'APR.pm',
+);
+
 my $libs = '';
-if (my $apr_bindir = ModPerl::BuildMM::build_config()->apr_bindir()) {
+my $build = ModPerl::BuildMM::build_config();
+if (my $apr_bindir = $build->apr_bindir()) {

     # XXX: this works only with libapr 0.9.2+
     my $ext = WIN32 ? '.bat' : '';
@@ -23,9 +30,20 @@
     $libs =~ s{/libpath:}{-L}g;
     $libs =~ s{(\w+)\.lib}{-l$1}g;
 }
+if (SOLARIS) {
+    # make sure that all -L, -R from libs are moved
+    # to lddflags.
+    my $tflags = $libs;
+    $tflags =~ s{-[^LR]\S+}{}g;
+    # -R makes sure that these paths will be used
+    $tflags =~ s{-L(\S+)}{-L$1 -R$1}g;
+    $args{LDDLFLAGS} = $tflags . $build->perl_config('lddlflags');
+    # leave -L in libs -- MakeMaker needs it.
+    $libs =~ s{-R\S+}{}g;
+}

-ModPerl::BuildMM::WriteMakefile(
-    'NAME'	   => 'APR',
-    'VERSION_FROM' => 'APR.pm',
-    'LIBS'         => [$libs],
-);
+$args{LIBS} = [$libs] if $libs;
+
+ModPerl::BuildMM::WriteMakefile(%args);

--
   -- Brad Lanam      bll@gentoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Stas Bekman <st...@stason.org>.
Brad Lanam wrote:
> On Fri, Jan 02, 2004 at 12:53:18PM -0800, Stas Bekman wrote:
> 
>>Before we try to fix EU::MakeMaker, how about this workaround patch?
> 
> 
>     Your patch works.
> 
> www:sadm$ ldd `find . -name 'APR.so'`
>     libapr-0.so.0 =>         /export/apache2_dev/lib/libapr-0.so.0
>     [...]
>     libaprutil-0.so.0 =>     /export/apache2_dev/lib/libaprutil-0.so.0
>     libexpat.so.0 =>         /usr/local/lib/libexpat.so.0
>     [...]
> 
>     I'm picking up my expat library rather than Apache's.
>     This could be a potential problem for some people.
> 
>     This happens because LDDLFLAGS is in the command line
>     before LIBS, and -R/usr/local/lib is first in the run
>     time search path.
> 
>     Now that I know what the problems are and what's causing
>     them, I can work around the various issues.
> 
>     I think in the long term, to handle multiple Apache installations
>     on the same machine, you will need to address the issue
>     of which set of Apache libraries mod_perl uses.  Ideally, it
>     should use the same libraries the apache daemon is using, so
>     you'll either have to set the LD_LIBRARY_PATH/LD_RUN_PATH
>     environment variable at startup, or dynamically load them
>     like perl does.

How about the following trickery. It arranges that LDDFLAGS will come after 
LIBS, making sure that apache's -Rpath will come in first. This is untested.

Index: xs/APR/APR/Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
retrieving revision 1.18
diff -u -r1.18 Makefile.PL
--- xs/APR/APR/Makefile.PL      5 Nov 2003 08:29:17 -0000       1.18
+++ xs/APR/APR/Makefile.PL      2 Jan 2004 22:08:07 -0000
@@ -6,10 +6,18 @@
  use Apache::Build ();
  use Config;

-use constant WIN32 => Apache::Build::WIN32;
+use constant WIN32   => Apache::Build::WIN32;
+use constant SOLARIS => $^O eq 'solaris';
+
+my %args = (
+    'NAME'        => 'APR',
+    'VERSION_FROM' => 'APR.pm',
+);

  my $libs = '';
-if (my $apr_bindir = ModPerl::BuildMM::build_config()->apr_bindir()) {
+my $build = ModPerl::BuildMM::build_config();
+
+if (my $apr_bindir = $build->apr_bindir()) {

      # XXX: this works only with libapr 0.9.2+
      my $ext = WIN32 ? '.bat' : '';
@@ -24,8 +32,16 @@
      $libs =~ s{(\w+)\.lib}{-l$1}g;
  }

-ModPerl::BuildMM::WriteMakefile(
-    'NAME'        => 'APR',
-    'VERSION_FROM' => 'APR.pm',
-    'LIBS'         => [$libs],
-);
+if (SOLARIS && $libs) {
+    # -R makes sure that these paths will be used
+    $libs =~ s{-L(\S+)}{-L$1 -R$1}g;
+    # make sure that perl lddflags will come after libs from apache,
+    # so that -R paths from apache will come in first
+    my $lddflags = $build->perl_config('lddlflags');
+    $libs .= " $lddflags";
+    $args{LDDLFLAGS} = ''; # so that MM won't re-add LDDFLAGS
+}
+
+$args{LIBS} = [$libs] if $libs;
+
+ModPerl::BuildMM::WriteMakefile(%args);


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Brad Lanam <bl...@gentoo.com>.
On Fri, Jan 02, 2004 at 12:53:18PM -0800, Stas Bekman wrote:
> Before we try to fix EU::MakeMaker, how about this workaround patch?

    Your patch works.

www:sadm$ ldd `find . -name 'APR.so'`
    libapr-0.so.0 =>         /export/apache2_dev/lib/libapr-0.so.0
    [...]
    libaprutil-0.so.0 =>     /export/apache2_dev/lib/libaprutil-0.so.0
    libexpat.so.0 =>         /usr/local/lib/libexpat.so.0
    [...]

    I'm picking up my expat library rather than Apache's.
    This could be a potential problem for some people.

    This happens because LDDLFLAGS is in the command line
    before LIBS, and -R/usr/local/lib is first in the run
    time search path.

    Now that I know what the problems are and what's causing
    them, I can work around the various issues.

    I think in the long term, to handle multiple Apache installations
    on the same machine, you will need to address the issue
    of which set of Apache libraries mod_perl uses.  Ideally, it
    should use the same libraries the apache daemon is using, so
    you'll either have to set the LD_LIBRARY_PATH/LD_RUN_PATH
    environment variable at startup, or dynamically load them
    like perl does.

    -- Brad

--
   -- Brad Lanam      bll@gentoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Stas Bekman <st...@stason.org>.
Brad Lanam wrote:
> On Thu, Jan 01, 2004 at 06:34:49PM -0800, Stas Bekman wrote:
> 
>>So why doesn't it do the same for perl's ldflags? Your have:
>>
>>ldflags ='-xO3 -L/usr/local/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib
>>-L/opt/SUNWspro/prod/lib '
>>
>>why doesn't it push -L/usr/local/lib into LD_RUN_PATH? Is it because we
>>don't supply them in LIBS? It adds them via (on my machine):
>>
>># dynamic_lib => { OTHERLDFLAGS=>q[ -L/usr/local/lib] }
>>
>>I'd guess that your xs/APR/APR/Makefile has:
>>
>># dynamic_lib => { OTHERLDFLAGS=>q[-xO3 -L/usr/local/lib -R/usr/local/lib
>>-L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib ] }
>>or is it in LDDLFLAGS?
>>
>>Can I see the top of xs/APR/APR/Makefile? The section:
>>#   MakeMaker Parameters:
> 
> 
> 
> #   MakeMaker Parameters:
> 
> #     CCFLAGS => q[ -D_REENTRANT -xO3 -I/usr/local/include -I/usr/local/include -DMOD_PERL -DMP_IOBUFSIZE=32768]
> #     INC => q[-I/export/home/sadm/Work/mod_perl-1.99_12/src/modules/perl -I/export/home/sadm/Work/mod_perl-1.99_12/xs -I/export/apache2_dev/include -I/export/apache2_dev/include]
> #     LDDLFLAGS => q[-G -L/usr/local/lib -R/usr/local/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib]
> #     LIBS => [q[-L/export/apache2_dev/lib -lapr-0 -lsendfile -lrt -lm -lsocket -lnsl -lresolv  -lpthread -ldl  -L/export/apache2_dev/lib -laprutil-0 -lexpat]]
> #     NAME => q[APR]
> #     OPTIMIZE => q[-O]
> #     TYPEMAPS => [q[/export/home/sadm/Work/mod_perl-1.99_12/xs/typemap]]
> #     VERSION_FROM => q[APR.pm]
> #     clean => { FILES=>q[ glue_pods] }
> #     dynamic_lib => { OTHERLDFLAGS=>q[-xO3 -L/usr/local/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib ] }

Thanks Brad,

So if I understand it correctly we care about these two entries:

#     LDDLFLAGS => q[-G -L/usr/local/lib -R/usr/local/lib -L/usr/lib 
-L/usr/ccs/lib -L/opt/SUNWspro/prod/lib]
#     LIBS => [q[-L/export/apache2_dev/lib -lapr-0 -lsendfile -lrt -lm 
-lsocket -lnsl -lresolv  -lpthread -ldl  -L/export/apache2_dev/lib -laprutil-0 
-lexpat]]

and the runtime:

LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib" cc  -G -L/usr/local/lib 
-R/usr/local/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib APR.o -xO3 
-L/usr/local/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib 
-L/opt/SUNWspro/prod/lib -o ../../../blib/arch/Apache2/auto/APR/APR.so 
-L/export/apache2_dev/lib -lapr-0 -lsendfile -lrt -lm -lsocket -lnsl -lresolv 
-lpthread -ldl -L/export/apache2_dev/lib -laprutil-0 -lexpat

ExtUtils::MakeMaker needs to either look in LDDFLAGS and move -R/usr/local/lib 
into LD_RUN_PATH (making sure that no -R is left), or not use
LD_RUN_PATH at all and get those paths into -R flags:

LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib"
=> -R/export/apache2_dev/lib -R/usr/lib?

Before we try to fix EU::MakeMaker, how about this workaround patch?

Index: xs/APR/APR/Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
retrieving revision 1.18
diff -u -r1.18 Makefile.PL
--- xs/APR/APR/Makefile.PL      5 Nov 2003 08:29:17 -0000       1.18
+++ xs/APR/APR/Makefile.PL      2 Jan 2004 20:41:20 -0000
@@ -6,7 +6,8 @@
  use Apache::Build ();
  use Config;

-use constant WIN32 => Apache::Build::WIN32;
+use constant WIN32   => Apache::Build::WIN32;
+use constant SOLARIS => $^O eq 'solaris';

  my $libs = '';
  if (my $apr_bindir = ModPerl::BuildMM::build_config()->apr_bindir()) {
@@ -22,6 +23,10 @@
  if (WIN32) {
      $libs =~ s{/libpath:}{-L}g;
      $libs =~ s{(\w+)\.lib}{-l$1}g;
+}
+
+if (SOLARIS) {
+    $libs =~ s{-L(\S+)}{-L$1 -R$1}g;
  }

  ModPerl::BuildMM::WriteMakefile(

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Brad Lanam <bl...@gentoo.com>.
On Thu, Jan 01, 2004 at 06:34:49PM -0800, Stas Bekman wrote:
> So why doesn't it do the same for perl's ldflags? Your have:
>
> ldflags ='-xO3 -L/usr/local/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib
> -L/opt/SUNWspro/prod/lib '
>
> why doesn't it push -L/usr/local/lib into LD_RUN_PATH? Is it because we
> don't supply them in LIBS? It adds them via (on my machine):
>
> # dynamic_lib => { OTHERLDFLAGS=>q[ -L/usr/local/lib] }
>
> I'd guess that your xs/APR/APR/Makefile has:
>
> # dynamic_lib => { OTHERLDFLAGS=>q[-xO3 -L/usr/local/lib -R/usr/local/lib
> -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib ] }
> or is it in LDDLFLAGS?
>
> Can I see the top of xs/APR/APR/Makefile? The section:
> #   MakeMaker Parameters:


#   MakeMaker Parameters:

#     CCFLAGS => q[ -D_REENTRANT -xO3 -I/usr/local/include -I/usr/local/include -DMOD_PERL -DMP_IOBUFSIZE=32768]
#     INC => q[-I/export/home/sadm/Work/mod_perl-1.99_12/src/modules/perl -I/export/home/sadm/Work/mod_perl-1.99_12/xs -I/export/apache2_dev/include -I/export/apache2_dev/include]
#     LDDLFLAGS => q[-G -L/usr/local/lib -R/usr/local/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib]
#     LIBS => [q[-L/export/apache2_dev/lib -lapr-0 -lsendfile -lrt -lm -lsocket -lnsl -lresolv  -lpthread -ldl  -L/export/apache2_dev/lib -laprutil-0 -lexpat]]
#     NAME => q[APR]
#     OPTIMIZE => q[-O]
#     TYPEMAPS => [q[/export/home/sadm/Work/mod_perl-1.99_12/xs/typemap]]
#     VERSION_FROM => q[APR.pm]
#     clean => { FILES=>q[ glue_pods] }
#     dynamic_lib => { OTHERLDFLAGS=>q[-xO3 -L/usr/local/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib ] }

    -- Brad

--
   -- Brad Lanam      bll@gentoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Stas Bekman <st...@stason.org>.
Brad Lanam wrote:
> On Wed, Dec 31, 2003 at 03:05:17PM -0800, Stas Bekman wrote:
> 
>>No, no, this is not a good solution, since others have the same problem.
>>You should leave perl as is. Who sets
>>LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib"? I can't see us setting this
>>value. Where does it come from? It must be ExtUtils::MakeMaker who does
>>that, but where does it take these values from? especially
>>"/export/apache2_dev/lib". Is it in your environment?
> 
> 
>     Nothing in my environment.
>     Yes, it must be ExtUtils::MakeMaker.
>     The only place LD_RUN_PATH is set is in xs/APR/APR.
> 
>     It must be finding the -L/export/apache2_dev/lib in $libs
>     (which it gets from apr-config) and setting LD_RUN_PATH
>     appropriately (or so it thinks).

So why doesn't it do the same for perl's ldflags? Your have:

ldflags ='-xO3 -L/usr/local/lib -R/usr/local/lib  -L/usr/lib -L/usr/ccs/lib 
-L/opt/SUNWspro/prod/lib '

why doesn't it push -L/usr/local/lib into LD_RUN_PATH? Is it because we don't 
supply them in LIBS? It adds them via (on my machine):

# dynamic_lib => { OTHERLDFLAGS=>q[ -L/usr/local/lib] }

I'd guess that your xs/APR/APR/Makefile has:

# dynamic_lib => { OTHERLDFLAGS=>q[-xO3 -L/usr/local/lib -R/usr/local/lib 
-L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib ] }
or is it in LDDLFLAGS?

Can I see the top of xs/APR/APR/Makefile? The section:
#   MakeMaker Parameters:


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] apr-ext/uuid.t fails on solaris

Posted by Brad Lanam <bl...@gentoo.com>.
On Wed, Dec 31, 2003 at 03:05:17PM -0800, Stas Bekman wrote:
> No, no, this is not a good solution, since others have the same problem.
> You should leave perl as is. Who sets
> LD_RUN_PATH="/export/apache2_dev/lib:/usr/lib"? I can't see us setting this
> value. Where does it come from? It must be ExtUtils::MakeMaker who does
> that, but where does it take these values from? especially
> "/export/apache2_dev/lib". Is it in your environment?

    Nothing in my environment.
    Yes, it must be ExtUtils::MakeMaker.
    The only place LD_RUN_PATH is set is in xs/APR/APR.

    It must be finding the -L/export/apache2_dev/lib in $libs
    (which it gets from apr-config) and setting LD_RUN_PATH
    appropriately (or so it thinks).

    -- Brad

--
   -- Brad Lanam      bll@gentoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org