From a84e0cefe392652252f998db397cb3e944414915 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 20 Nov 2000 22:02:16 +0000 Subject: [PATCH] Remove the shared object before attempting to create (by linking) a new one. E.g. in AIX not removing becomes quite painful if one tries to do more than one build in the same tree (an interrupted build, for example), since the AIX' shared dynaloader seemingly keeps the shared objects open and therefore 'busy' for quite a while, even when nobody is using the objects, leading into link failures. p4raw-id: //depot/perl@7782 --- lib/ExtUtils/MM_Unix.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index f538818..31aa122 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -1074,6 +1074,14 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"} if ($^O eq 'irix' && $self->{LD_RUN_PATH}); + # For example in AIX the shared objects/libraries from previous builds + # linger quite a while in the shared dynalinker cache even when nobody + # is using them. This is painful if one for instance tries to restart + # a failed build because the link command will fail unnecessarily 'cos + # the shared object/library is 'busy'. + push(@m,' $(RM_F) $@ +'); + push(@m,' LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) -o $@ '.$ldrun.' $(LDDLFLAGS) '.$ldfrom. ' $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(EXPORT_LIST)'); push @m, ' -- 2.7.4