Build failure for 2.96 (20000807) on rs6000-ibm-aix4.1.5.0

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Aug 8 09:22:00 GMT 2000


 > From: "David W. Schuler" <schuld@btv.ibm.com>
 > 
 > I continue to receive build failures on IBM rs6000-ibm-aix4.1.5.0.
 > This particular failure has occurred for several months now.  I only
 > experience this on AIX 4.1, and not on AIX 4.2 or newer releases.
 > 
 > ...
 > /afs/btv/data/n37v/software/gnu-aix415/bin/gcc -DIN_GCC -g -W -Wall
 > -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
 > -pedantic -Wno-long-long -DHAVE_CONFIG_H -o collect2 collect2.o
 > tlink.o hash.o intl.o underscore.o version.o obstack.o alloca.o
 > ./intl/libintl.a ../libiberty/libiberty.a
 > 
 > ld: 0711-317 ERROR: Undefined symbol: .ldopen
 > ld: 0711-317 ERROR: Undefined symbol: .ldtbread
 > ld: 0711-317 ERROR: Undefined symbol: .ldgetname
 > ld: 0711-317 ERROR: Undefined symbol: .ldclose
 > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
 > collect2: ld returned 8 exit status
 > make[2]: *** [collect2] Error 1
 > make[2]: Leaving directory `/usr/local/src/EGCS/egcs-aix415/gcc'
 > make[1]: *** [bootstrap] Error 2
 > make[1]: Leaving directory `/usr/local/src/EGCS/egcs-aix415/gcc'
 > make: *** [bootstrap] Error 2
 > 
 > 
 > % cat config.status
 > #!/bin/sh
 > # This file was generated automatically by configure.  Do not edit.
 > # This directory was configured as follows:
 > ../egcs/configure
 > --with-gcc-version-trigger=/usr/local/src/EGCS/egcs/gcc/version.c
 > --host=rs6000-ibm-aix4.1.5.0
 > --prefix=/afs/btv.ibm.com/data/n37v/software/gnu-aix415/egcs
 > --with-gnu-as --with-gnu-ld --with-cpu=common --enable-haifa
 > --enable-multilib --norecursion
 > #


I believe the problem is that you need -lld to get the functions
listed above.  This library is obtained via t-aix41.  If you look in
configure.in, you'll see that currently t-aix41 is only obtained when
the native linker is used, and you're using gnu-ld.

There are four cases I see:

1.  native ld, native target
2.  gnu ld, native target
3.  gnu ld, cross from X to aix41
4.  gnu ld, cross from aix41 to X

I know 1 works because I've tested it myself.  Currently case 2, which
is your configuration, doesn't work.  I can't speak for 3 or 4.  (It
looks like use_collect2 is always set to yes.  I thought that we don't
need collect2 with gnu ld. ?)


When examining the configure code, I noticed that for the gnu ld case,
xmake_file is set to a non-existent file x-aix41-gld.  This works by
chance since xmake_file is unconditionally reset right after it.  I
deleted that, and put the t-aix41 into the host==target clause.

Does the following patch solve your problem on aix41 with gnu ld?  And
would you please verify it doesn't break aix42?

		Thanks,
		--Kaveh


2000-08-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* configure.in (*-ibm-aix4.[12]*): Delete test for gnu ld.  Always
	use t-aix41 when host == target.

*** configure.in.orig	Tue Aug  8 11:34:28 2000
--- configure.in	Tue Aug  8 11:54:23 2000
*************** changequote(,)dnl
*** 3271,3289 ****
  changequote([,])dnl
  		tm_file=rs6000/aix41.h
  		if test x$host != x$target
  		then
  			tmake_file=rs6000/t-xnewas
  		else
! 			tmake_file=rs6000/t-newas
! 		fi
! 		if test "$gnu_ld" = yes
! 		then
! 			xmake_file=rs6000/x-aix41-gld
! 		else
! 			tmake_file="rs6000/t-newas rs6000/t-aix41"
  		fi
  		xmake_file=rs6000/x-aix41
  		float_format=none
  		use_collect2=yes
  		;;
  changequote(,)dnl
--- 3271,3283 ----
  changequote([,])dnl
  		tm_file=rs6000/aix41.h
  		if test x$host != x$target
  		then
  			tmake_file=rs6000/t-xnewas
  		else
! 			tmake_file='rs6000/t-newas rs6000/t-aix41'
  		fi
  		xmake_file=rs6000/x-aix41
  		float_format=none
  		use_collect2=yes
  		;;
  changequote(,)dnl


More information about the Gcc-bugs mailing list