develooper Front page | perl.perl5.porters | Postings from April 2007

[PATCH] Cargo-cult fix for an AIX build problem

Thread Next
From:
Jan Dubois
Date:
April 26, 2007 17:03
Subject:
[PATCH] Cargo-cult fix for an AIX build problem
Message ID:
048b01c7885f$48862510$d9926f30$@com
The patch below is against blead, but I only ran into the problem
using 5.8.8 (I'm don't regularly build blead on AIX).

When building a shared libperl.so, during `make install` the Makefile
would rebuild libperl.so (as it does for most top level targets), but at
that time ld would fail:

  ld: 0711-851 SEVERE ERROR: Output file: libperl.so
   The file is in use and cannot be overwritten.
  make[1]: *** [libperl.so] Error 12

I'm certain this did not happen a few weeks ago, but I cannot figure out
what has changed.  By trial and error I found out that the error goes
away if I explicitly delete libperl.so before rebuilding it.

I'm not sure if the patch below _should_ be committed, as it is not based
on a sound understanding of the underlying issue. On the other hand, it
should always be safe to remove the file immediately before it is being
created again.

Cheers,
-Jan

--- Makefile.SH.orig	Tue Apr 24 16:11:12 2007
+++ Makefile.SH	Thu Apr 26 16:52:50 2007
@@ -599,6 +599,7 @@
 	case "$useshrplib" in
 	true)
 		$spitshell >>Makefile <<'!NO!SUBS!'
+	rm -f $@
 	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
 !NO!SUBS!
 		case "$osname" in
End of Patch.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About