[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 7861 - in trunk: . subversion/bindings/swig/perl

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2003-11-29 19:03:24 CET

On Nov 27, 2003, at 4:39 AM, clkao@tigris.org wrote:

> Author: clkao
> Date: Thu Nov 27 03:39:34 2003
> New Revision: 7861
>
> Modified:
> trunk/ (props changed)
> trunk/subversion/bindings/swig/perl/Makefile.PL
> Log:
> Allow perl bindings to be built with libraries in tree rather than
> installed ones. And let "make test" use LD_LIBRARY_PATH to run
> tests. This makes it possible/easier for packagers to ship the perl
> bindings.
>
> Submitted by: Ben Reser <ben@reser.org>
>
> * subversion/bindings/swig/perl/Makefile.PL
> Add the proper paths so the perl bindings can be built without
> installing subversion in system locations first.
>
>
> Modified: trunk/subversion/bindings/swig/perl/Makefile.PL
> =======================================================================
> =======
> --- trunk/subversion/bindings/swig/perl/Makefile.PL (original)
> +++ trunk/subversion/bindings/swig/perl/Makefile.PL Thu Nov 27
> 03:39:34 2003
> @@ -2,6 +2,8 @@
> use ExtUtils::MakeMaker;
>
> my @modules = qw/client delta fs ra repos wc/;
> +my @ldpaths = ('../.libs',
> + map {"../../../libsvn_$_/.libs"} (@modules, qw/diff
> subr/));
> my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
>
> my $apr_config = $ENV{APR_CONFIG} ||
> '/usr/local/lib/apache2/apr-config';
> @@ -17,9 +19,10 @@
> ABSTRACT => 'Perl bindings for Subversion',
> CCFLAGS => join(' ', $apr_cflags, `perl -MExtUtils::Embed -e
> ccopts`,
> ' -I.. -I../../../include -g'),
> + LDDLFLAGS => '-shared',

This part in particular seems to break the build of the bindings on OS
X. -shared is not the correct flag on all platforms. By removing that
line and by changing the invocation of apr_config to include the
--link-ld line I can at least get the bindings to compile on OS X.

The use of LD_LIBRARY_PATH here seems kind of bogus as well, as that
isn't the correct environment variable to set on all platforms.

Either way, I'm not sure what the correct fix is, but this is the
current patch I'm using.

-garrett

Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 7871)
+++ Makefile.PL (working copy)
@@ -10,7 +10,7 @@
  $apr_config = 'apr-config' unless -e $apr_config;

  my $apr_cflags = `$apr_config --includes`;
-my $apr_ldflags = `$apr_config --cflags --libs`;
+my $apr_ldflags = `$apr_config --cflags --link-ld --libs`;

  chomp $apr_cflags;
  chomp $apr_ldflags;
@@ -19,7 +19,6 @@
      ABSTRACT => 'Perl bindings for Subversion',
      CCFLAGS => join(' ', $apr_cflags, `perl -MExtUtils::Embed -e
ccopts`,
                      ' -I.. -I../../../include -g'),
- LDDLFLAGS => '-shared',
      OBJECT => q/$(O_FILES)/,
      dynamic_lib => {
         OTHERLDFLAGS => join(' ', $apr_ldflags, (map {"-L$_"} @ldpaths),

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 29 19:04:04 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.