develooper Front page | perl.perl5.porters | Postings from January 2006

[PATCH] Tru64: -Uusedl: lib/ExtUtils/t/Embed.t

Thread Next
Jarkko Hietaniemi
January 23, 2006 10:33
[PATCH] Tru64: -Uusedl: lib/ExtUtils/t/Embed.t
Message ID:
The failure:

./perl -I../lib ../lib/ExtUtils/t/Embed.t
# cc -o embed_test -I..  -std1 -no_ansi_alias -fprm d -ieee -DDEBUGGING
-I/p/include -DLANGUAGE_C
-I/usr/local/lib/perl5/5.8.8/alpha-dec_osf/CORE  embed_test.c -L..
-lperl   -L/p/lib ../lib/auto/DynaLoader/DynaLoader.a ../lib/auto/B/B.a
../lib/auto/ByteLoader/ByteLoader.a [snip] ../lib/auto/threads/threads.a
../lib/auto/threads/shared/shared.a -ldbm -ldb -lm -lutil
-L/usr/local/lib -lrt
ok 1
# embed_test = ./embed_test
221448:./embed_test: /sbin/loader: Fatal Error: Cannot map library
not ok 9 # system returned 256

The patch (*):

--- lib/ExtUtils/t/Embed.t.dist 2006-01-23 20:23:45.000000000 +0200
+++ lib/ExtUtils/t/Embed.t      2006-01-23 20:28:32.000000000 +0200
@@ -60,6 +60,12 @@
    else {
     push(@cmd,$cc,'-o' => $exe);
+   if ($^O eq 'dec_osf' && !defined $Config{usedl}) {
+       # The -non_shared is needed in case of -Uusedl or otherwise
+       # the test application will try to use
+       # instead of libperl.a.
+       push @cmd, "-non_shared";
+   }
    if ($^O eq 'MSWin32') {
     $inc = File::Spec->catdir($inc,'win32');

(*) Strictly speaking I think this would need more thinking:
how are -Uusedl and embedding supposed to interplay anyway, and
therefore maybe also some other platforms have need for a thing
similar to the "-non_shared" in Tru64, and therefore it should be
a Configure var and/or hints files needed for ExtUtils::Embed,
maybe, but anyway, this patch gets things working for me.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About