public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Error Compiling GCC on Solaris 10 / x86
@ 2008-08-02 14:59 Gaurav Jain
  2008-08-02 17:02 ` Brian Dessent
  0 siblings, 1 reply; 7+ messages in thread
From: Gaurav Jain @ 2008-08-02 14:59 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm trying to build GCC 4.1.0 on Solaris 10 / x86 on a Intel x86_64
architecture system.  The gcc installation will be used on multiple
systems running on 32-bit and 64-bit architectures.  I'm configuring
it using the "GNU ld" and "GNU as" combination.

The configuration options I've used are:
./configure --prefix=/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD
--with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/sfw/bin/gld
--with-gnu-ld --enable-languages=c,c++ --enable-shared

The error comes during the link of ./libgcc_s.so.1.tmp:

/usr/sfw/bin/gld: cannot open linker script file
ldscripts/elf_i386.xsc: No such file or directory
collect2: ld returned 1 exit status

The bootstrap compiler being used is GCC 3.4.3, configured using GNU
as and Sun ld.

Can anybody help?

Thanks
Gaurav

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error Compiling GCC on Solaris 10 / x86
  2008-08-02 14:59 Error Compiling GCC on Solaris 10 / x86 Gaurav Jain
@ 2008-08-02 17:02 ` Brian Dessent
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Dessent @ 2008-08-02 17:02 UTC (permalink / raw)
  To: Gaurav Jain; +Cc: gcc-help

Gaurav Jain wrote:

> The configuration options I've used are:
> ./configure 
I recommend you follow the advice of the installation instructions and
build in a separate directory outside of the source directory.

> The bootstrap compiler being used is GCC 3.4.3, configured using GNU
> as and Sun ld.

If you're using the Sun linker then you shouldn't also be telling gcc
that you're using the GNU linker, i.e. remove --with-gnu-ld.

Brian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error Compiling GCC on Solaris 10 / x86
  2008-08-03  5:12       ` Brian Dessent
@ 2008-08-03  6:23         ` Gaurav Jain
  0 siblings, 0 replies; 7+ messages in thread
From: Gaurav Jain @ 2008-08-03  6:23 UTC (permalink / raw)
  To: gcc-help

>
> So, it looks like gcc is passing a -T option for a linker script that
> the Solaris-provided GNU ld can't find.  Run the failing link command
> with -### to see what the invocation of the linker is, and then figure
> out if the linker script that gcc is passing exists, and if so where.
> If not, figure out why it's not included.  'elf_i386.xsc' should be the
> variant for 32 bit shared libraries built with -z combreloc.  What
> version is this /usr/sfw/bin/gld anyway?  If it's ancient it may be too
> old for gcc 4.1.

here's the output after adding -### to the final link command:
Reading specs from
/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD/./gcc/specs
Target: i386-pc-solaris2.10
Configured with: ../gcc-4.1.0/configure
--prefix=/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD
--with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/sfw/bin/gld
--with-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 4.1.0
 "/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD/./gcc/collect2"
"-G" "-dy" "-z" "text" "-m" "elf_i386" "-Y" "P,/usr/ccs/lib:/usr/lib"
"-Qy" "-o" "./libgcc_s.so.1.tmp" "/usr/lib/crti.o"
"/usr/lib/values-Xa.o"
"/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD/./gcc/crtbegin.o"
"-L/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD/./gcc"
"--soname=libgcc_s.so.1" "--version-script=libgcc/./libgcc.map"
"libgcc/./_muldi3_s.o" "libgcc/./_negdi2_s.o" "libgcc/./_lshrdi3_s.o"
"libgcc/./_ashldi3_s.o" "libgcc/./_ashrdi3_s.o" "libgcc/./_cmpdi2_s.o"
"libgcc/./_ucmpdi2_s.o" "libgcc/./_floatdidf_s.o"
"libgcc/./_floatdisf_s.o" "libgcc/./_fixunsdfsi_s.o"
"libgcc/./_fixunssfsi_s.o" "libgcc/./_fixunsdfdi_s.o"
"libgcc/./_fixdfdi_s.o" "libgcc/./_fixunssfdi_s.o"
"libgcc/./_fixsfdi_s.o" "libgcc/./_fixxfdi_s.o"
"libgcc/./_fixunsxfdi_s.o" "libgcc/./_floatdixf_s.o"
"libgcc/./_fixunsxfsi_s.o" "libgcc/./_fixtfdi_s.o"
"libgcc/./_fixunstfdi_s.o" "libgcc/./_floatditf_s.o"
"libgcc/./_clear_cache_s.o" "libgcc/./_enable_execute_stack_s.o"
"libgcc/./_trampoline_s.o" "libgcc/./__main_s.o"
"libgcc/./_absvsi2_s.o" "libgcc/./_absvdi2_s.o"
"libgcc/./_addvsi3_s.o" "libgcc/./_addvdi3_s.o"
"libgcc/./_subvsi3_s.o" "libgcc/./_subvdi3_s.o"
"libgcc/./_mulvsi3_s.o" "libgcc/./_mulvdi3_s.o"
"libgcc/./_negvsi2_s.o" "libgcc/./_negvdi2_s.o" "libgcc/./_ctors_s.o"
"libgcc/./_ffssi2_s.o" "libgcc/./_ffsdi2_s.o" "libgcc/./_clz_s.o"
"libgcc/./_clzsi2_s.o" "libgcc/./_clzdi2_s.o" "libgcc/./_ctzsi2_s.o"
"libgcc/./_ctzdi2_s.o" "libgcc/./_popcount_tab_s.o"
"libgcc/./_popcountsi2_s.o" "libgcc/./_popcountdi2_s.o"
"libgcc/./_paritysi2_s.o" "libgcc/./_paritydi2_s.o"
"libgcc/./_powisf2_s.o" "libgcc/./_powidf2_s.o"
"libgcc/./_powixf2_s.o" "libgcc/./_powitf2_s.o" "libgcc/./_mulsc3_s.o"
"libgcc/./_muldc3_s.o" "libgcc/./_mulxc3_s.o" "libgcc/./_multc3_s.o"
"libgcc/./_divsc3_s.o" "libgcc/./_divdc3_s.o" "libgcc/./_divxc3_s.o"
"libgcc/./_divtc3_s.o" "libgcc/./_divdi3_s.o" "libgcc/./_moddi3_s.o"
"libgcc/./_udivdi3_s.o" "libgcc/./_umoddi3_s.o"
"libgcc/./_udiv_w_sdiv_s.o" "libgcc/./_udivmoddi4_s.o"
"libgcc/./unwind-dw2_s.o" "libgcc/./unwind-dw2-fde_s.o"
"libgcc/./unwind-sjlj_s.o" "libgcc/./gthr-gnat_s.o"
"libgcc/./unwind-c_s.o" "-lc"
"/export/home/gaurav/third_party/gcc/4.1.0/ConfiguredWithGnuASGnuLD/./gcc/crtend.o"
"/usr/lib/crtn.o"
mv: cannot access ./libgcc_s.so.1.tmp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error Compiling GCC on Solaris 10 / x86
  2008-08-03  4:28     ` Gaurav Jain
@ 2008-08-03  5:12       ` Brian Dessent
  2008-08-03  6:23         ` Gaurav Jain
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Dessent @ 2008-08-03  5:12 UTC (permalink / raw)
  To: Gaurav Jain; +Cc: gcc-help, Jay

Gaurav Jain wrote:

> In fact, I specifically need to *try out* the GNU ld / GNU as
> combination to debug some issue in the binary

Oh.  That wasn't clear.

So, it looks like gcc is passing a -T option for a linker script that
the Solaris-provided GNU ld can't find.  Run the failing link command
with -### to see what the invocation of the linker is, and then figure
out if the linker script that gcc is passing exists, and if so where. 
If not, figure out why it's not included.  'elf_i386.xsc' should be the
variant for 32 bit shared libraries built with -z combreloc.  What
version is this /usr/sfw/bin/gld anyway?  If it's ancient it may be too
old for gcc 4.1.

> Even if it's not recommended, but I'm sure it sure does build fine
> with that combination?

I can't parse this.  Are you asking why GNU ld doesn't generally work
with Solaris 10?  It's because of a new type of shared library that GNU
ld doesn't yet support, as far as I can tell:
<http://sourceware.org/bugzilla/show_bug.cgi?id=1021>.  I don't know if
you can expect a gcc bootstrap to complete or not with GNU ld even if
you fix the missing linker script problem.

Brian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error Compiling GCC on Solaris 10 / x86
  2008-08-03  3:54   ` Brian Dessent
@ 2008-08-03  4:28     ` Gaurav Jain
  2008-08-03  5:12       ` Brian Dessent
  0 siblings, 1 reply; 7+ messages in thread
From: Gaurav Jain @ 2008-08-03  4:28 UTC (permalink / raw)
  To: gcc-help; +Cc: Jay

>
> That's really not a good idea to suggest given that the gcc docs
> recommend *not* using the GNU linker with Solaris 10, and a combined
> tree forces the in-tree linker which is GNU ld.
>
> <http://gcc.gnu.org/install/specific.html#ix86-x-solaris210>
>
>> It is recommended that you configure GCC to use the GNU
>> assembler in /usr/sfw/bin/gas but the Sun linker, using
>> the options --with-gnu-as --with-as=/usr/sfw/bin/gas
>> --without-gnu-ld --with-ld=/usr/ccs/bin/ld.

Yes, I'm aware of that note.  In fact, I specifically need to *try
out* the GNU ld / GNU as combination to debug some issue in the binary
that's being generated.  I did find an old post from a user with a
similar problem (see http://marc.info/?l=gcc&m=112111465407009&w=2)

Even if it's not recommended, but I'm sure it sure does build fine
with that combination?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error Compiling GCC on Solaris 10 / x86
  2008-08-03  3:38 ` Jay
@ 2008-08-03  3:54   ` Brian Dessent
  2008-08-03  4:28     ` Gaurav Jain
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Dessent @ 2008-08-03  3:54 UTC (permalink / raw)
  To: Jay; +Cc: gaurav.anywhere, gcc-help

Jay wrote:

> Have you tried a "combined" / "Cygnus" tree?
> And without the -with-gnu-as/-with-gnu-ld switches?
> 
> A combined tree seems like a good way to add consistency and reduce ambiguity and make
> things work more automatically.
> The build system knows when the ld it will build will become available and will use it then.

That's really not a good idea to suggest given that the gcc docs
recommend *not* using the GNU linker with Solaris 10, and a combined
tree forces the in-tree linker which is GNU ld.

<http://gcc.gnu.org/install/specific.html#ix86-x-solaris210>

> It is recommended that you configure GCC to use the GNU
> assembler in /usr/sfw/bin/gas but the Sun linker, using
> the options --with-gnu-as --with-as=/usr/sfw/bin/gas
> --without-gnu-ld --with-ld=/usr/ccs/bin/ld.

Brian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Error Compiling GCC on Solaris 10 / x86
       [not found] <1217689174.6455.ezmlm@gcc.gnu.org>
@ 2008-08-03  3:38 ` Jay
  2008-08-03  3:54   ` Brian Dessent
  0 siblings, 1 reply; 7+ messages in thread
From: Jay @ 2008-08-03  3:38 UTC (permalink / raw)
  To: gaurav.anywhere, gcc-help


 > From: gaurav 
 > To: gcc-help@gcc.gnu.org 
 > Subject: Error Compiling GCC on Solaris 10 / x86 
 > The error comes during the link of ./libgcc_s.so.1.tmp:  
 > /usr/sfw/bin/gld: cannot open linker script file  
 > ldscripts/elf_i386.xsc: No such file or directory  
 > collect2: ld returned 1 exit status  

 > The bootstrap compiler being used is GCC 3.4.3, configured using GNU  
 > as and Sun ld.  

Have you tried a "combined" / "Cygnus" tree?
And without the -with-gnu-as/-with-gnu-ld switches? 

A combined tree seems like a good way to add consistency and reduce ambiguity and make
things work more automatically.
The build system knows when the ld it will build will become available and will use it then.

- Jay

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-08-03  6:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-02 14:59 Error Compiling GCC on Solaris 10 / x86 Gaurav Jain
2008-08-02 17:02 ` Brian Dessent
     [not found] <1217689174.6455.ezmlm@gcc.gnu.org>
2008-08-03  3:38 ` Jay
2008-08-03  3:54   ` Brian Dessent
2008-08-03  4:28     ` Gaurav Jain
2008-08-03  5:12       ` Brian Dessent
2008-08-03  6:23         ` Gaurav Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).