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:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
