Bug 17369

Summary: [3.4/4.0 regression] [ia64] Bootstrap failure with binutils-2.15.90.0.1.1
Product: gcc Reporter: Andreas Schwab <schwab>
Component: bootstrapAssignee: H.J. Lu <hjl.tools>
Status: RESOLVED FIXED    
Severity: critical CC: debian-gcc, gcc-bugs, michael
Priority: P2 Keywords: build
Version: 3.4.3   
Target Milestone: 3.4.3   
Host: Target: ia64-suse-linux
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 17464    
Attachments: A patch
An updated patch
An updated patch
An updated patch to support Solaris

Description Andreas Schwab 2004-09-09 09:45:58 UTC
The compiler no longer bootstraps when building with binutils-2.15.90.0.1.1.  
  
stage1/xgcc -Bstage1/ -B/usr/local/ia64-suse-linux/bin/   
-DUSE_LIBUNWIND_EXCEPTIONS -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long 
-Wold-style-definition     -DHAVE_CONFIG_H -DGENERATOR_FILE  -o gengenrtl \ 
 gengenrtl.o ../libiberty/libiberty.a 
./gengenrtl -h > tmp-genrtl.h  
./gengenrtl: error while loading shared libraries: libunwind.so.7: cannot open  
shared object file: No such file or directory  
make[2]: *** [s-genrtl] Error 127
Comment 1 H.J. Lu 2004-09-09 16:06:40 UTC
It is the same problem as

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

I will see what I can come up with.
Comment 2 H.J. Lu 2004-09-09 22:28:00 UTC
Created attachment 7084 [details]
A patch

Please try this patch. Many Makefiles may need

include ..../gcc/Makefile.ld-path
Comment 3 Andreas Schwab 2004-09-10 12:34:59 UTC
The compiler now bootstraps, but I'm still getting many messages 
"/tmp/cvs/gcc-20040910/Build/gcc/xgcc: error while loading shared libraries: 
libunwind.so.7: cannot open shared object file: No such file or directory" when 
rerunning "make bootstrap". 
 
Comment 4 H.J. Lu 2004-09-10 16:44:52 UTC
How do I reproduce it?
Comment 5 Andreas Schwab 2004-09-10 20:57:50 UTC
I bootstraped the compiler (which fails in some target libraries, due to the 
missing include of Makefile.ld-path, i guess), then reran "make bootstrap" on 
the same tree and got the messages. 
Comment 6 H.J. Lu 2004-09-10 23:38:54 UTC
Created attachment 7093 [details]
An updated patch

Here is a new patch.
Comment 7 Andreas Schwab 2004-09-11 15:45:52 UTC
Bootstraps all the way through. 
Comment 9 H.J. Lu 2004-09-14 18:45:09 UTC
Created attachment 7133 [details]
An updated patch to support Solaris
Comment 10 H.J. Lu 2004-09-14 18:46:06 UTC
Please go to bug 17464 to get the current patches for each related
bug.
Comment 11 H.J. Lu 2004-09-16 00:19:13 UTC
A patch for gcc 3.4 is at

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01627.html
Comment 12 H.J. Lu 2004-09-23 22:45:51 UTC
Patch for gcc 3.4 and 4.0 are posted at

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02465.html
Comment 13 GCC Commits 2004-09-24 00:37:13 UTC
Subject: Bug 17369

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hjl@gcc.gnu.org	2004-09-24 00:37:08

Modified files:
	.              : ChangeLog Makefile.in Makefile.tpl configure 
	                 configure.in 
	config         : ChangeLog 
	gcc            : ChangeLog Makefile.in configure configure.ac 
Added files:
	config         : gcc-lib-path.m4 

Log message:
	2004-09-23  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR bootstrap/17369
	* Makefile.tpl (REALLY_SET_LIB_PATH): Add @SET_GCC_LIB_PATH@.
	(HOST_EXPORTS]): Add @SET_GCC_LIB_PATH@. Set and export
	SET_GCC_LIB_PATH_CMD.
	(BASE_TARGET_EXPORTS): Likewise.
	* Makefile.in: Regenerated.
	
	* configure.in (SET_GCC_LIB_PATH): Set and substitute.
	* configure: Regenerated.
	
	config/
	
	2004-09-23  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR bootstrap/17369
	* gcc-lib-path.m4: New file.
	
	gcc/
	
	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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.985&r2=1.986
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.240&r2=1.241
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.tpl.diff?cvsroot=gcc&r1=1.114&r2=1.115
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.diff?cvsroot=gcc&r1=1.182&r2=1.183
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.in.diff?cvsroot=gcc&r1=1.320&r2=1.321
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/config/gcc-lib-path.m4.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/config/ChangeLog.diff?cvsroot=gcc&r1=1.53&r2=1.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5595&r2=2.5596
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1400&r2=1.1401
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.diff?cvsroot=gcc&r1=1.860&r2=1.861
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.ac.diff?cvsroot=gcc&r1=2.70&r2=2.71

Comment 14 GCC Commits 2004-09-24 00:43:58 UTC
Subject: Bug 17369

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	hjl@gcc.gnu.org	2004-09-24 00:43:53

Modified files:
	.              : ChangeLog Makefile.in Makefile.tpl configure 
	                 configure.in 
	config         : ChangeLog 
	gcc            : ChangeLog Makefile.in configure configure.ac 
Added files:
	config         : gcc-lib-path.m4 

Log message:
	2004-09-23  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR bootstrap/17369
	* Makefile.tpl (REALLY_SET_LIB_PATH): Add @SET_GCC_LIB_PATH@.
	(configure-target-[+module+]): Add @SET_GCC_LIB_PATH@. Set and
	export SET_GCC_LIB_PATH_CMD.
	(configure-gcc): Likewise.
	* Makefile.in: Regenerated.
	
	* configure.in (SET_GCC_LIB_PATH): Set and substitute.
	* configure: Regenerated.
	
	config/
	
	2004-09-23  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR bootstrap/17369
	* gcc-lib-path.m4: New file.
	
	gcc/
	
	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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.856.2.19&r2=1.856.2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.195.2.1&r2=1.195.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.tpl.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.79.2.1&r2=1.79.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.126.4.3&r2=1.126.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.266.4.3&r2=1.266.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/config/gcc-lib-path.m4.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/config/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.42.10.3&r2=1.42.10.4
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.632&r2=2.2326.2.633
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.18&r2=1.1223.2.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.794.2.18&r2=1.794.2.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.ac.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.6.2.16&r2=2.6.2.17

Comment 15 Andrew Pinski 2004-09-24 00:58:54 UTC
Fixed.
Comment 16 Debian GCC Maintainers 2004-09-25 15:33:09 UTC
the patch is incomplete.

at least on linux-gnu targets the patch breaks the Ada testsuite, if 
the shared ada library is built, but not found during the test run. 
Therefore LD_LIBRARY_PATH should not only consist of .../build, but 
.../build/ada/rts as well. Or else don't overwrite LD_LIBRARY_PATH, 
but prepend to it. 
Comment 17 H.J. Lu 2004-09-25 23:12:27 UTC
The bootstrap bug is fixed. But there are a few testsuite bugs. See
bug 17464 for details.
Comment 18 Andrew Pinski 2004-10-05 04:25:45 UTC
*** Bug 17834 has been marked as a duplicate of this bug. ***