Bug 17684 - [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't create libgcc_s.sl
Summary: [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't create libgcc_s.sl
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 3.4.3
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks: 17464
  Show dependency treegraph
 
Reported: 2004-09-27 00:06 UTC by John David Anglin
Modified: 2004-10-18 17:00 UTC (History)
2 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed: 2004-09-27 11:42:57


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2004-09-27 00:06:21 UTC
In stage 2:

./xgcc -B./ -B/opt/gnu/gcc/gcc-4.0.0/hppa2.0w-hp-hpux11.11/bin/ -isystem /opt/gn
u/gcc/gcc-4.0.0/hppa2.0w-hp-hpux11.11/include -isystem /opt/gnu/gcc/gcc-4.0.0/hp
pa2.0w-hp-hpux11.11/sys-include -L/mnt/gnu/gcc-3.3/objdir/gcc/../ld -O2  -DIN_GC
C    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-sty
le-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D_
_GCC_FLOAT_NOT_NEEDED  -shared  -nodefaultlibs -o libgcc_s.sl   libgcc/./_muldi3
.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.
o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdi
sf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc
/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o lib
gcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtf
di.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc
/./_enable_execute_stack.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_ab
svsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_su
bvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_ne
gvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi
2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o lib
gcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popco
untdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_divdi3.o libgcc/.
/_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgc
c/./_udivmoddi4.o libgcc/./lib2funcs.o libgcc/./quadlib.o  libgcc/./unwind-dw2.o
 libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./
unwind-c.o -lc && rm -f libgcc_s.1 && ln -s libgcc_s.sl libgcc_s.1
/usr/ccs/bin/ld: Can't create libgcc_s.sl
/usr/ccs/bin/ld: Text file busy
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.sl] Error 1

This is probably caused by this change:

2004-09-23  H.J. Lu  <hongjiu.lu@intel.com>

        PR bootstrap/17369
        * Makefile.in (@set_gcc_lib_path@): Added.

        * configure.ac: Include ../config/gcc-lib-path.m4. Use
        TL_AC_GNU_MAKE_GCC_LIB_PATH.
        * configure: Regenerated.

It's not possible to replace a shared library that's busy on any
32-bit HP-UX port.
Comment 1 Andrew Pinski 2004-09-27 00:13:23 UTC
This is also a 3.4 regression also because that patch was applied to the 3.4 branch.
Comment 2 dave 2004-09-27 02:54:09 UTC
Subject: Re:  [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't

> This is also a 3.4 regression also because that patch was applied to the 3.4
> branch.

Confirmed as 3.4 regression as well.

Dave
Comment 3 Andrew Pinski 2004-09-27 11:42:57 UTC
Confirmed.
Comment 4 H.J. Lu 2004-09-27 17:08:03 UTC
This is the patch

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02765.html

Is this safe for parallel build?
Comment 5 John David Anglin 2004-09-27 20:54:49 UTC
The patch doesn't actually change the file that needs to change,
config/pa/t-hpux-shlib.  The suggested change shown for the `t'
files in the patch doesn't work.  The `rm' fails for the same reason
as the link.

I don't know what's actually using the library.  However, it's
generally possible to rename libraries.  I'm trying that approach.
Comment 6 H.J. Lu 2004-09-27 21:23:43 UTC
Here is the updated patch:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02795.html

It is possible that GNU "make" may be linked against -lgcc_s on some platforms.
I will see what I can do.
Comment 7 dave 2004-09-27 21:43:34 UTC
Subject: Re:  [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't

> It is possible that GNU "make" may be linked against -lgcc_s on some
> platforms.

Actually, it looks like its bash.  It is linked against libreadline.
For some reason, libreadline has SHLIB_PATH enabled and it has a
dependency on libgcc_s.sl.

Dave
Comment 8 H.J. Lu 2004-09-27 23:07:39 UTC
Here is a new patch

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02807.html
Comment 9 H.J. Lu 2004-09-28 00:33:43 UTC
Oops. Please try this one

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02821.html
Comment 10 dave 2004-09-28 01:44:37 UTC
Subject: Re:  [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't

> Oops. Please try this one
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02821.html

Looks similar to what I came up with.

Dave
Comment 11 dave 2004-09-28 13:15:34 UTC
Subject: Re:  [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't

> Oops. Please try this one
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02821.html

Works.

Suggestions:

1) Remove `t' from stage suffix.
2) Use `-f' in first `mv'.
3) Make sure that `make clean' removes these files.

In my testing, I found that I didn't need separate files for each
stage.

Dave
Comment 12 H.J. Lu 2004-09-28 18:39:47 UTC
Here is the new one:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02881.html
Comment 13 dave 2004-09-30 20:39:48 UTC
Subject: Re:  [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't

> Here is the new one:
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02881.html

Clean isn't right:

make clean
...
rm -f libgcc_s.sl libgcc_s.sl.1 libgcc_s.sl.1.stage?
...

# ls -d libgcc*
libgcc_s.1  libgcc_s.sl.stage1  libgcc_s.sl.stage2

Otherwise, the patch works for me.

Dave
Comment 14 H.J. Lu 2004-10-01 02:37:57 UTC
Here is an update:

http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00010.html
Comment 15 dave 2004-10-02 18:43:21 UTC
Subject: Re:  [3.4/4.0 Regression] /usr/ccs/bin/ld: Can't

> Here is an update:
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00010.html

This works for me.  The PA specific parts are ok but you will have
to get approval for the rest.

Dave
Comment 16 CVS Commits 2004-10-18 15:53:18 UTC
Subject: Bug 17684

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hjl@gcc.gnu.org	2004-10-18 15:52:52

Modified files:
	gcc            : ChangeLog Makefile.in mklibgcc.in 
	gcc/config     : t-libunwind-elf t-slibgcc-darwin 
	                 t-slibgcc-elf-ver t-slibgcc-sld 
	gcc/config/alpha: t-osf4 
	gcc/config/arm : t-netbsd 
	gcc/config/i386: t-nwld 
	gcc/config/mips: t-slibgcc-irix 
	gcc/config/pa  : t-hpux-shlib 
	gcc/config/sh  : t-linux 

Log message:
	2004-11-18  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR bootstrap/17684
	* Makefile.in (clean): Remove libgcc_s$(SHLIB_EXT).1.stage?.
	(stage1-start): Remove and copy libunwind.a and
	libunwind*$(SHLIB_EXT) instead of libunwind*.
	(stage2-start): Likewise.
	(stage3-start): Likewise.
	(stage4-start): Likewise.
	(stageprofile-start): Likewise.
	(stagefeedback-start): Likewise.
	
	* config/alpha/t-osf4 (SHLIB_LINK): Use a temporary file for
	the shared library to be created and don't remove the existing
	shared library.
	* config/arm/t-netbsd (SHLIB_LINK): Likewise.
	* config/i386/t-nwld (SHLIB_LINK): Likewise.
	* config/mips/t-slibgcc-irix (SHLIB_LINK): Likewise.
	* config/pa/t-hpux-shlib (SHLIB_LINK): Likewise.
	* config/sh/t-linux (SHLIB_LINK): Likewise.
	* config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise.
	* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
	* config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise.
	* config/t-slibgcc-sld (SHLIB_LINK): Likewise.
	
	* mklibgcc.in (libgcc-stage-start): Also move "*${objext}s"
	files.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5925&r2=2.5926
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1412&r2=1.1413
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/mklibgcc.in.diff?cvsroot=gcc&r1=1.71&r2=1.72
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-libunwind-elf.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-slibgcc-darwin.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-slibgcc-elf-ver.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-slibgcc-sld.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/t-osf4.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/t-netbsd.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/t-nwld.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/t-slibgcc-irix.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/t-hpux-shlib.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/t-linux.diff?cvsroot=gcc&r1=1.13&r2=1.14

Comment 17 CVS Commits 2004-10-18 16:01:15 UTC
Subject: Bug 17684

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	hjl@gcc.gnu.org	2004-10-18 16:00:53

Modified files:
	gcc            : ChangeLog Makefile.in mklibgcc.in 
	gcc/config     : t-libunwind-elf t-slibgcc-darwin 
	                 t-slibgcc-elf-ver t-slibgcc-sld 
	gcc/config/alpha: t-osf4 
	gcc/config/arm : t-netbsd 
	gcc/config/mips: t-iris5-6 
	gcc/config/pa  : t-hpux-shlib 
	gcc/config/sh  : t-linux 

Log message:
	2004-11-18  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR bootstrap/17684
	* Makefile.in (clean): Remove libgcc_s$(SHLIB_EXT).1.stage?.
	(stage1-start): Remove and copy libunwind.a and
	libunwind*$(SHLIB_EXT) instead of libunwind*.
	(stage2-start): Likewise.
	(stage3-start): Likewise.
	(stage4-start): Likewise.
	(stageprofile-start): Likewise.
	(stagefeedback-start): Likewise.
	
	* config/alpha/t-osf4 (SHLIB_LINK): Use a temporary file for
	the shared library to be created and don't remove the existing
	shared library.
	* config/arm/t-netbsd (SHLIB_LINK): Likewise.
	* config/mips/t-iris5-6 (SHLIB_LINK): Likewise.
	* config/pa/t-hpux-shlib (SHLIB_LINK): Likewise.
	* config/sh/t-linux (SHLIB_LINK): Likewise.
	* config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise.
	* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
	* config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise.
	* config/t-slibgcc-sld (SHLIB_LINK): Likewise.
	
	* mklibgcc.in (libgcc-stage-start): Also move "*${objext}s"
	files.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.665&r2=2.2326.2.666
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1223.2.19&r2=1.1223.2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/mklibgcc.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.67.4.2&r2=1.67.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-libunwind-elf.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.4.1&r2=1.1.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-slibgcc-darwin.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2&r2=1.2.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-slibgcc-elf-ver.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.5.20.1&r2=1.5.20.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/t-slibgcc-sld.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.4&r2=1.4.20.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/t-osf4.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.7&r2=1.7.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/t-netbsd.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.7&r2=1.7.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/t-iris5-6.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3&r2=1.3.20.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/t-hpux-shlib.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2&r2=1.2.20.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/t-linux.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.9.10.2&r2=1.9.10.3

Comment 18 Andrew Pinski 2004-10-18 17:00:13 UTC
Fixed.