Skip Menu |

This queue is for tickets about the Inline-CPP CPAN distribution.

Report information
The Basics
Id: 45168
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Inline-CPP

People
Owner: davido [...] cpan.org
Requestors: JKELFER [...] cpan.org
Cc:
AdminCc:

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



Subject: The Makefile.PL does not properly set the library path on a mac. A patch is attached.
The Makefile.PL does not properly set the library path on a mac. A patch is attached.
Subject: macfix.patch
--- Makefile.PL.brk 2009-04-20 17:31:17.000000000 -0400 +++ Makefile.PL 2009-04-20 17:32:15.000000000 -0400 @@ -46,6 +46,14 @@ elsif ($Config{osname} eq 'solaris' or $ $libs_guess ='-lCrun'; } } +elsif ($Config{osname} eq 'darwin'){ + my $stdlib_query = 'find /usr/lib/gcc -name "libstdc++*" | grep $( uname -p )'; + my $stdcpp = `$stdlib_query`; + $stdcpp =~ s/^(.*)\/[^\/]+$/$1/; + + $cc_guess = 'g++'; + $libs_guess = "-L$stdcpp -lstdc++"; +} # Sane defaults for other (probably unix-like) operating systems else { $cc_guess = 'g++';
On Mon Apr 20 17:51:44 2009, JKELFER wrote: Show quoted text
> The Makefile.PL does not properly set the library path on a mac. A > patch is attached.
I updated the patch to work on Intel in addition to PPC machines. It's a hack, but it does the trick.
--- Makefile.PL 2003-08-12 19:48:04.000000000 -0400 +++ Makefile.PL.fix 2009-04-20 18:50:19.000000000 -0400 @@ -46,6 +46,23 @@ elsif ($Config{osname} eq 'solaris' or $ $libs_guess ='-lCrun'; } } +elsif ($Config{osname} eq 'darwin' && $Config{myarchname} eq 'ppc-darwin'){ + my $stdlib_query = 'find /usr/lib/gcc -name "libstdc++*" | grep powerpc'; + my $stdcpp = `$stdlib_query`; + $stdcpp =~ s/^(.*)\/[^\/]+$/$1/; + + $cc_guess = 'g++'; + $libs_guess = "-L$stdcpp -lstdc++"; +} +elsif ($Config{osname} eq 'darwin' && $Config{myarchname} =~ /i*86-darwin/){ + my $stdlib_query = 'find /usr/lib/gcc -name "libstdc++*" | grep "i*86"'; + my $stdcpp = `$stdlib_query`; + $stdcpp =~ s/^(.*)\/[^\/]+$/$1/; + + $cc_guess = 'g++'; + $libs_guess = "-L$stdcpp -lstdc++"; +} + # Sane defaults for other (probably unix-like) operating systems else { $cc_guess = 'g++';
From: davido [...] cpan.org
On Mon Apr 20 18:55:27 2009, JKELFER wrote: Show quoted text
> On Mon Apr 20 17:51:44 2009, JKELFER wrote:
> > The Makefile.PL does not properly set the library path on a mac. A > > patch is attached.
> > I updated the patch to work on Intel in addition to PPC machines. It's > a hack, but it does the trick.
Your patch has been applied. Thanks.
The Mac patch has been applied. Thanks.