On Tue, Mar 22, 2005 at 07:54:15AM -0600 Billy Patton wrote: > I've gotten my xs to compile with g++. > But when I test I get something bad. > > Here's my Makefile.PL: > use ExtUtils::MakeMaker; > $PLATFORM = `uname`; > $CC = 'g++'; > WriteMakefile( > 'NAME' => 'Laff' > ,'PREFIX' => './' > ,'PREREQ_PM' => {} > ,'VERSION_FROM' => 'Laff.pm' > ,ABSTRACT => 'perl extention of C++ Laff routines written by > Billy Patton' > ,'LIBS' => [ > '-L/data/cdmg/dev/cdmg_toolbox/Laff/'.${PLATFORM}.' -lcdmg_laff' > , > '-L/data/cdmg/dev/cdmg_toolbox/libcdmg/'.${PLATFORM}.' -lcdmg' > , > '-L/data/cdmg/dev/cdmg_toolbox/pcre-5.0/'.${PLATFORM}.' -lpcre' > , ' -lm ' > ] > ,'OPTIMIZE' => '-g3 -O2' > ,'DISTNAME' => 'LaffPerl' > ,'INSTALLDIRS' => 'perl' > ,'INC' => "-I/data/cdmg/dev/cdmg_toolbox/Laff > -I/data/cdmg/dev/cdmg_toolbox/libcdmg > -I/data/cdmg/dev/cdmg_toolbox/pcre-5.0" > ,'XSOPT' => '-C++' > ,'CC' => ${CC} > ,'LD' => ${CC} > ,'TYPEMAPS' => ['typemap' ] > ); > > Here's my compilation :
[...] > Here's the test. > [EMAIL PROTECTED] LaffPerl]$ make test > PERL_DL_NONLAZY=1 /apps/perl/5.8.0/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/CaseSensitive...............Can't load > '/data/cdmg/dev/cdmg_toolbox/Laff/LaffPerl/blib/arch/auto/Laff/Laff.so' for > module Laff: > /data/cdmg/dev/cdmg_toolbox/Laff/LaffPerl/blib/arch/auto/Laff/Laff.so: > undefined symbol: > _ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_ at > /apps/perl/5.8.0/lib/5.8.0/i686-linux-thread-multi/DynaLoader.pm line 229. > at t/CaseSensitive.t line 7 > Compilation failed in require at t/CaseSensitive.t line 7. > BEGIN failed--compilation aborted at t/CaseSensitive.t line 7. > t/CaseSensitive...............dubious > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 1-2 > Failed 2/2 tests, 0.00% okay > > > Is it not picking uo the libstdc++ ? > I thought using g++ for the LD would pick up all c++ libs. That's what it does for me at least. Have you checked what Laff.so is linked against? $ ldd /data/cdmg/dev/cdmg_toolbox/Laff/LaffPerl/blib/arch/auto/Laff/Laff.so Tassilo -- use bigint; $n=71423350343770280161397026330337371139054411854220053437565440; $m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);