Hi,
<br><br>
(I've posted this question elsewhere as well, so apologies
if you're seeing this more than once).
<br><br>
The <a href="http://sea
rch.cpan.org/dist/GO-TermFinder/">GO::TermFinde
r modules</a>, which I wrote, often seem to have
problems (platform dependent) when doing the make step,
specifically compiling the swig code in the 'native'
directory. The Makefile.PL in that directory has:
<br><br>
<code>
'LIBS' => ['-lm -lstdc++'],
</code>
<br><br>
but when the make is run, I see a complaint:
<br><br>
<code>
Note (probably harmless): No library found for -lstdc++
</code>
<br><br>
which later results in failures like:
<br><br>
<code>
# 'Can't load
'/Users/sherlock/dev/GO-TermFinder/blib/arch/auto/GO/TermFi
nder/Native/Native.bundle' for module
GO::TermFinder::Native:
dlopen(/Users/sherlock/dev/GO-TermFinder/blib/arch/auto/GO/T
ermFinder/Native/Native.bundle
, 2): Symbol not found:
__ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
</code>
<br><br>
during the make test phase. If however, I look at the
generated Makefile in the native directory, I see:
<br><br>
<code>
LDLOADLIBS = -lm
</code>
<br><br>
if I change this to:
<br><br>
<code>
LDLOADLIBS = -lm -lstdc++
</code>
<br><br>
and redo the make, the problem is fixed. It is of course
annoying to tell people they may need to hand edit make
files during the installation process. Does anyone know
what I'm doing wrong in the Makefile.PL file that might
remedy the problem?
<br><br>
If I do:
<br><br>
<code>
perl -e 'require ExtUtils::Liblist;
ExtUtils::Liblist->ext("-lstdc++", 1, 1);'
</code>
<br><br>
I get:
<br><br>
<code>
Potential libraries are '-lstdc++':
stdc++ not found in /usr/local/lib
stdc++ not found in /usr/lib
Note (probably harmless): No library found for -lstdc++
</code>
<br><br>
poking around in /usr/lib, I see:
<br><br>
<code>
libstdc++-static.a
libstdc++.6.0.3.dylib*
libstdc++.6.0.4.dylib*
libstdc++.6.dylib -> libstdc++.6.0.4.dylib
</code>
<br><br>
but this is where my ignorance prevents me from knowing if
this is what I'm looking for. Poking around a little
further, there is also:
<br><br>
<code>
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/libstdc++.dylib
</code>
<br><br>
which probably is what I want, and the compiler seems to
know how to find when given the -lstdc++ flag, but MakeMaker
doesn't know how to find, so won't provide the flag (in
fact this is a link to libstdc++.6.dylib back in the
/usr/lib directory).
<br><br>
I also tried adding
<br><br>
<code>
'CC'=>'g++'
</code>
<br><br>
or
<br><br>
<code>
'PERLMAINCC'=>'g++'
</code>
<br><br>
to the Makefile.PL, but with the exact same results.
<br><br>
I also tried adding:
<br><br>
<code>
'LD'=>'g++'
</code>
<br><br>
which does seem to solve the problem, but I'm worried that
this is not going to work across platforms - is there a
better way to do this, without reinventing the wheel with
some sniffing logic to determine their compiler?
In this example, I was running Perl 5.8.8 on OSX 10.4.7,
with ExtUtils::MakeMaker 6.17.
<br><br>
Many thanks in advance,
<br><br>
Gavin
To write a respons, access
http://ww
w.cpanforum.com/response_form/2654
To see the full thread, access
http://www.cpan
forum.com/threads/2654
--
You are getting this messages from www.cpanforum.com
To change your subscription information visit http://www.cpanforum.
com/mypan/
|