Bug 8686 - multilib bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01
Summary: multilib bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 29398
  Show dependency treegraph
 
Reported: 2002-11-22 22:36 UTC by Paul Eggert
Modified: 2009-11-10 09:07 UTC (History)
5 users (show)

See Also:
Host: sparc-sun-solaris2.9
Target: sparc-sun-solaris2.9
Build: sparc-sun-solaris2.9
Known to work:
Known to fail:
Last reconfirmed: 2005-12-25 15:32:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggert 2002-11-22 22:36:00 UTC
	When GCC is built on Solaris 9 (sparc), on a host with a 32-bit
	kernel, with the Sun-recommended patches (as of 2002-11-22)
	installed, the build fails.

	According to Sun bug 4747851, Sun patch 112963-01 introduced
	a bug that makes it impossible to create a 64-bit relocatable
	object file using ld -r under a 32-bit kernel.	Sun says that
	this is fixed in Sun test patch T112963-02 or newer.  This
	appears to be the bug that GCC runs into.  As of this writing,
	the test patches are not available to the public (you need to
	have Sun software support to get them).

	Sun patch 112963-01 is one of the Sun-recommended patches, so it
	is commonly installed these days.  You can get it from
	<ftp://sunsolve.sun.com/pub/patches/112963-01.zip>,
	among other locations.

	Here are the failure symptoms.
gmake[5]: Entering directory `/net/cog/project/reb/src/base/gcc/build/gcc'
./xgcc -B./ -B/opt/reb/lib/gcc/gcc-3.2.1/sparc-sun-solaris2.9/bin/ -isystem /opt/reb/lib/gcc/gcc-3.2.1/sparc-sun-solaris2.9/include -isystem /opt/reb/lib/gcc/gcc-3.2.1/sparc-sun-solaris2.9/sys-include -m64 -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -m64  -c -o sparcv9/crtfastmath.o ../../gcc-3.2.1/gcc/config/sparc/crtfastmath.c
gmake[5]: Leaving directory `/net/cog/project/reb/src/base/gcc/build/gcc'
./xgcc -B./ -B/opt/reb/lib/gcc/gcc-3.2.1/sparc-sun-solaris2.9/bin/ -isystem /opt/reb/lib/gcc/gcc-3.2.1/sparc-sun-solaris2.9/include -isystem /opt/reb/lib/gcc/gcc-3.2.1/sparc-sun-solaris2.9/sys-include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs -Wl,-M,libgcc/sparcv9/libgcc.map -o sparcv9/libgcc_s.so.1  -m64  libgcc/sparcv9/_muldi3.o libgcc/sparcv9/_negdi2.o libgcc/sparcv9/_lshrdi3.o libgcc/sparcv9/_ashldi3.o libgcc/sparcv9/_ashrdi3.o libgcc/sparcv9/_ffsdi2.o libgcc/sparcv9/_clz.o libgcc/sparcv9/_cmpdi2.o libgcc/sparcv9/_ucmpdi2.o libgcc/sparcv9/_floatdidf.o libgcc/sparcv9/_floatdisf.o libgcc/sparcv9/_fixunsdfsi.o libgcc/sparcv9/_fixunssfsi.o libgcc/sparcv9/_fixunsdfdi.o libgcc/sparcv9/_fixdfdi.o libgcc/sparcv9/_fixunssfdi.o libgcc/sparcv9/_fixsfdi.o libgcc/sparcv9/_fixxfdi.o libgcc/sparcv9/_fixunsxfdi.o libgcc/sparcv9/_floatdixf.o libgcc/sparcv9/_fixunsxfsi.o libgcc/sparcv9/_fixtfdi.o libgcc/sparcv9/_fixunstfdi.o libgcc/sparcv9/_floatditf.o libgcc/sparcv9/_clear_cache.o libgcc/sparcv9/_trampoline.o libgcc/sparcv9/__main.o libgcc/sparcv9/_exit.o libgcc/sparcv9/_absvsi2.o libgcc/sparcv9/_absvdi2.o libgcc/sparcv9/_addvsi3.o libgcc/sparcv9/_addvdi3.o libgcc/sparcv9/_subvsi3.o libgcc/sparcv9/_subvdi3.o libgcc/sparcv9/_mulvsi3.o libgcc/sparcv9/_mulvdi3.o libgcc/sparcv9/_negvsi2.o libgcc/sparcv9/_negvdi2.o libgcc/sparcv9/_ctors.o libgcc/sparcv9/_divdi3.o libgcc/sparcv9/_moddi3.o libgcc/sparcv9/_udivdi3.o libgcc/sparcv9/_umoddi3.o libgcc/sparcv9/_udiv_w_sdiv.o libgcc/sparcv9/_udivmoddi4.o  libgcc/sparcv9/unwind-dw2.o libgcc/sparcv9/unwind-dw2-fde.o libgcc/sparcv9/unwind-sjlj.o -lc && rm -f libgcc_s_sparcv9.so && ln -s sparcv9/libgcc_s.so.1 libgcc_s_sparcv9.so
ld: fatal: file libld.so.3: dlopen failed: ld.so.1: /usr/ccs/bin/ld: fatal: relocation error: file /usr/lib/libld.so.3: symbol dbg_mask: referenced symbol not found
collect2: ld returned 1 exit status
gmake[4]: *** [sparcv9/libgcc_s_sparcv9.so] Error 1
gmake[4]: Leaving directory `/net/cog/project/reb/src/base/gcc/build/gcc'
gmake[3]: *** [stmp-multilib] Error 2
gmake[3]: Leaving directory `/net/cog/project/reb/src/base/gcc/build/gcc'
gmake[2]: *** [stage1_build] Error 2
gmake[2]: Leaving directory `/net/cog/project/reb/src/base/gcc/build/gcc'
gmake[1]: *** [bootstrap-lean] Error 2
gmake[1]: Leaving directory `/net/cog/project/reb/src/base/gcc/build'
*** Error code 2
make: Fatal error: Command failed for target `bootstrap.made'

Release:
3.2.1

Environment:
System: SunOS shade.twinsun.com 5.9 Generic_112233-02 sun4u sparc SUNW,Ultra-1
Architecture: sun4

	
host: sparc-sun-solaris2.9
build: sparc-sun-solaris2.9
target: sparc-sun-solaris2.9
configured with: ../gcc-3.2.1/configure --disable-nls --enable-languages=c,c++ --prefix=/opt/reb/lib/gcc/gcc-3.2.1 --with-system-zlib

How-To-Repeat:
	Install Solaris 9 (sparc) on a Sun box.
	Install Sun patch 112963-01.
	Boot a 32-bit kernel.
	Configure GCC and run "make bootstrap-lean".
Comment 1 Paul Eggert 2002-11-22 22:36:00 UTC
Fix:
	I haven't tried any of these fixes, but they might work:

	* Configure GCC with the --disable-multilib option.
	* Build GCC under a 64-bit kernel instead.
	* Back out patch 112963-01.
	* Install patch T112963-02 or later.

	I'll try the first option next, as it's easiest for me.
Comment 2 eggert 2002-11-23 21:30:11 UTC
From: Paul Eggert <eggert@twinsun.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   nobody@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/8686: 3.2.1 bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01
Date: Sat, 23 Nov 2002 21:30:11 -0800 (PST)

 Just to follow up on my earlier bug report (8686):
 
 Configuring GCC 3.2.1 with --disable-multilib indeed worked around the bug.
Comment 3 Paul Eggert 2003-03-07 00:19:02 UTC
From: Paul Eggert <eggert@CS.UCLA.EDU>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/8686: [sparc-solaris]3.2.1 multilib bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01
Date: 07 Mar 2003 00:19:02 -0800

 bangerth@dealii.org writes:
 
 >     Paul, in your report you mention a patchset from Sun that was
 >     not available at the time. Did this situation change in the
 >     meantime?
 
 Yes.  The current patch revision is 112963-05, dated 2002-12-06
 (available from <ftp://sunsolve.sun.com/pub/patches/112963-05.zip>).
 If the workaround for Sun bug 4747851 is correct, this should
 fix the problem.  However, I haven't verified this, and also
 the Sun database still lists the bug as not being fixed.
 
 >     I may not understand the problem in all details, but it
 >     appears to me that there is little value to have a bug
 >     report about a situation we cannot do anything about. The
 >     only thing I see is that we might want to document the
 >     problem in the target specific installation instructions.
 
 Yes, that's what I'd do.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8686

Comment 4 Wolfgang Bangerth 2003-03-07 00:36:26 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: Paul, in your report you mention a patchset from Sun that was
    not available at the time. Did this situation change in the
    meantime?
    
    I may not understand the problem in all details, but it
    appears to me that there is little value to have a bug
    report about a situation we cannot do anything about. The
    only thing I see is that we might want to document the
    problem in the target specific installation instructions.
    
    Thanks
      Wolfgang
Comment 5 Wolfgang Bangerth 2003-03-07 08:57:54 UTC
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: Paul Eggert <eggert@CS.UCLA.EDU>
Cc: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Subject: Re: bootstrap/8686: [sparc-solaris]3.2.1 multilib bootstrap fails:
 32-bit Solaris 9 + Sun patch 112963-01
Date: Fri, 7 Mar 2003 08:57:54 -0600 (CST)

 > >     I may not understand the problem in all details, but it
 > >     appears to me that there is little value to have a bug
 > >     report about a situation we cannot do anything about. The
 > >     only thing I see is that we might want to document the
 > >     problem in the target specific installation instructions.
 > 
 > Yes, that's what I'd do.
 
 I think it would be greatly appreciated if you could generate a small 
 patch for the target specific installation instructions!
 
 Thanks
   Wolfgang 
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 

Comment 6 eggert 2003-03-08 00:48:59 UTC
From: Paul Eggert <eggert@twinsun.com>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,
   gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/8686: [sparc-solaris]3.2.1 multilib bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01
Date: Sat, 8 Mar 2003 00:48:59 -0800 (PST)

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8686
 
 Here's a proposed patch to install.texi to document the problem.  Note
 that I've also removed the obsolete assertion that one must configure
 with --disable-multilib on non-buggy systems.
 
 2003-03-08  Paul Eggert  <eggert@twinsun.com>
 
 	* gcc/doc/install.texi (Specific): --disable-multilib now
 	should work on Solaris 7 and later, unless Sun bug 4747851 is
 	in effect; in that case, describe a workaround (for gcc) and a
 	fix (for Solaris).
 
 --- gcc/doc/install.texi-old	2003-03-03 15:20:58.000000000 -0800
 +++ gcc/doc/install.texi	2003-03-08 00:48:02.483002000 -0800
 @@ -3108,10 +3108,12 @@
  code that, unlike full 64-bit code, can still run on non-UltraSPARC
  machines.
  
 -When configuring on a Solaris 7 or later system that is running a kernel
 -that supports only 32-bit binaries, one must configure with
 -@option{--disable-multilib}, since we will not be able to build the
 -64-bit target libraries.
 +When configuring on a Solaris 9 SPARC system that is running a kernel
 +that supports only 32-bit binaries and that has Sun patch 112963-01
 +installed, GCC will run afoul of Sun linker bug 4747851, as described
 +in GCC Problem Report 8686.  To work around the problem, configure
 +with @option{--disable-multilib}; to fix the problem, install Sun
 +patch 112963-02 or later.
  
  @html
  <hr />
Comment 7 Dara Hazeghi 2003-06-02 04:48:37 UTC
Eric,

can you take a look at Paul's documentation patch, and determine if it's correct (since you seem to 
deal more with obscure Solaris bugs than the rest of us)? Thanks,

Dara
Comment 8 Eric Botcazou 2003-06-02 09:17:32 UTC
Why is the assertion absolete? And the ChangeLog entry is bogus:
--disable-multilib has always worked.
Comment 9 Paul Eggert 2003-06-02 20:01:11 UTC
Subject: Re:  [sparc-solaris]3.2.1 multilib bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01

"ebotcazou@gcc.gnu.org" <gcc-bugzilla@gcc.gnu.org> writes:

> Why is the assertion absolete?

If by "assertion" you are referring to this sentence:

  When configuring on a Solaris 7 or later system that is running a kernel
  that supports only 32-bit binaries, one must configure with
  @option{--disable-multilib}, since we will not be able to build the
  64-bit target libraries.

It is obsolete because you can now build 64-bit target libraries even
on hosts that are running only 32-bit kernels.

> And the ChangeLog entry is bogus: --disable-multilib has always
> worked.

OK, here's a revised ChangeLog entry:

2003-03-08  Paul Eggert  <eggert@twinsun.com>
 
        * gcc/doc/install.texi (Specific): --disable-multilib now is
        no longer necessary on Solaris 7 and later, unless Sun bug 4747851 is
        in effect; in that case, describe a workaround (for gcc) and a
        fix (for Solaris).
Comment 10 Rainer Orth 2003-06-02 21:47:16 UTC
Subject: Re:  [sparc-solaris]3.2.1 multilib bootstrap fails: 32-bit Solaris 9 + Sun patch 112963-01

"eggert@cs.ucla.edu" <gcc-bugzilla@gcc.gnu.org> writes:

> If by "assertion" you are referring to this sentence:
> 
>   When configuring on a Solaris 7 or later system that is running a kernel
>   that supports only 32-bit binaries, one must configure with
>   @option{--disable-multilib}, since we will not be able to build the
>   64-bit target libraries.
> 
> It is obsolete because you can now build 64-bit target libraries even
> on hosts that are running only 32-bit kernels.

True, but some of the target libraries require *running* the resulting
64-bit executables, which still fails in such a configuration.  Besides, in
many cases hosts that don't support a 64-bit kernel (or where only a 32-bit
kernel is installed), the 64-bit system libraries are not installed either.

I'd suggest that unless we have positive reports that a full bootstrap for
both 32-bit and 64-bit multilibs works on a system with a 32-bit kernel,
but 64-bit system libraries installed, we keep that sentence.

	Rainer
Comment 11 Eric Botcazou 2003-06-09 15:07:52 UTC
Not a bug according to the documentation.

Suspended since it would become a bug if we changed our position regarding the
mandatory use of --disable-multilib on 32-bit kernels.
Comment 12 Eric Botcazou 2009-11-10 09:07:03 UTC
Not a bug.