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

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

Thread Next
Jan Dubois
April 26, 2007 17:03
[PATCH] Cargo-cult fix for an AIX build problem
Message ID:
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, during `make install` the Makefile
would rebuild (as it does for most top level targets), but at
that time ld would fail:

  ld: 0711-851 SEVERE ERROR: Output file:
   The file is in use and cannot be overwritten.
  make[1]: *** [] 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 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.


--- 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
 		$spitshell >>Makefile <<'!NO!SUBS!'
+	rm -f $@
 	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
 		case "$osname" in
End of Patch.

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