I have committed a fix in r11320 so that the build doesn't pick up system-wide libparrots, which has certainly been the cause of some linkage problems over the last few days.
[As background, since my previous email didn't make it into RT, the circumstances for this are: * A system-wide libparrot exists (in /usr/local/lib) * Perl provides -L/usr/local/lib with its link flags, as it does on cygwin and gentoo Linux] Nick
Index: lib/Parrot/Test.pm =================================================================== --- lib/Parrot/Test.pm (revision 11319) +++ lib/Parrot/Test.pm (working copy) @@ -575,11 +575,8 @@ print SOURCE $source; close SOURCE; - my $libparrot_shared = "$PConfig{rpath_blib} -L$PConfig{blib_dir} -lparrot"; - my $libparrot_static = $PConfig{blib_dir}.$PConfig{slash}.$PConfig{libparrot_static}; + my $libparrot = $PConfig{libparrot_ldflags}; - my $libparrot = $PConfig{parrot_is_shared} ? $libparrot_shared : $libparrot_static; - my $iculibs = ""; if ($PConfig{'has_icu'}) { $iculibs = $PConfig{icu_shared}; Index: config/init/defaults.pm =================================================================== --- config/init/defaults.pm (revision 11319) +++ config/init/defaults.pm (working copy) @@ -30,6 +30,20 @@ { my ($self, $conf) = @_; + # Remove all -Lxxx entries from Perl's ldflags and lddlflags as they + # will be Perl-specific. + my $ldflags = $Config{ldflags}; + $ldflags =~ s/-L\s*".*?"//g; # Quoted directory + $ldflags =~ s/-L\s*[^\s]+//g; # Non-quoted directory + $ldflags =~ s/^\s+//; + $ldflags =~ s/\s+$//; + + my $lddlflags = $Config{lddlflags}; + $lddlflags =~ s/-L\s*".*?"//g; + $lddlflags =~ s/-L\s*[^\s]+//g; + $lddlflags =~ s/^\s+//; + $lddlflags =~ s/\s+$//; + # We need a Glossary somewhere! $conf->data->set( debugging => $conf->options->get('debugging') ? 1 : 0, @@ -62,7 +76,7 @@ # Perl5's Configure doesn't distinguish linking from loading, so # make a reasonable guess at defaults. link => $Config{cc}, - linkflags => $Config{ldflags}, + linkflags => $ldflags, # Linker Flags to have this binary work with the shared and dynamically # loadable libraries we're building. On HP-UX, for example, we need to @@ -73,16 +87,16 @@ # modules. Often $cc on Unix-ish systems, but apparently sometimes # it's ld. ld => $Config{ld}, - ldflags => $Config{ldflags}, + ldflags => $ldflags, # Some operating systems (e.g. Darwin) distinguish between shared # libraries and modules that can be dynamically loaded. Flags to tell # ld to build a shared library, e.g. -shared for GNU ld. - ld_share_flags => $Config{lddlflags}, + ld_share_flags => $lddlflags, # Flags to tell ld to build a dynamically loadable module, e.g. # -shared for GNU ld. - ld_load_flags => $Config{lddlflags}, + ld_load_flags => $lddlflags, libs => $Config{libs}, Index: PLATFORMS =================================================================== --- PLATFORMS (revision 11319) +++ PLATFORMS (working copy) @@ -75,7 +75,7 @@ *2 needs Configure.pl --define=inet_aton *3 kernel 2.6.1 NPTL: signal_2 and _4 failing due to test script problems *4 need deactivating of PARROT_HAS_HEADER_DLFCN -*5 need PATH=$PATH:$PWD/blib/lib to locate DLL +*5 need PATH=$PWD/blib/lib:$PATH (in the build dir) to locate parrot DLL *6 needs "gmake" *7 needs perl Configure.pl --cc=gcc --link=gcc --ld=gcc --cxx=gcc