public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC snapshot 2000-11-27 build fails on Solaris 8 SPARC
@ 2000-12-02 22:54 Mark Bradley
  2000-12-05  8:57 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Bradley @ 2000-12-02 22:54 UTC (permalink / raw)
  To: gcc-help

Hello,

I'm trying to build GCC and libstdc++v3 (shared libs too) from the 
2000-11-27 snapshot. This all stemmed from an error I got while compiling 
another program. It said:

*** Warning: This library needs some functionality provided by -lgcc.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

That made little sense to a relative novice like myself so I assumed (insert 
standard warning about making nearly baseless assumptions) that was I needed 
was a shared version of libgcc.a. Is this even possible?

I thought i'd rebuild everything from scratch to see how the process worked.
http://gcc.gnu.org/install/build.html says I can have it automatically build 
binutils if they have been individually linked or moved into the top level 
GCC source tree before configuring. So I went ahead and got the 2000-12-01 
snapshot.

Source code archives:
---------------------
ftp://ftp.freesoftware.com/pub/sourceware/gcc/snapshots/2000-11-27/gcc-20001127.tar.gz
ftp://sources.redhat.com/pub/binutils/snapshots/binutils-001201.tar.bz2


System info:
------------
Fully patched Solaris 8 on an Ultra 60
make 3.79.1
ld 2.10.1
ar 2.10.1
assembler 2.10.1
strip 2.10.1
nm 2.10.1
libtool 1.3.5
m4 1.4
Autoconf 2.13
GCC 2.95.2 (from sunfreeware)
perl v5.6.0 (does this matter???)


Some pertinent(??) environment settings:
----------------------------------------
PATH=/usr/local/util/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/etc:/usr/openwin/bin:/usr/ccs/bin/:.
SHELL=/usr/bin/csh
PWD=/d01/src/gcc-20001127/tgt
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib/mm-1.1.3:/usr/openwin/lib:/usr/local/lib/perl5
SSL_BASE=/usr/local/ssl
EAPI_MM=/usr/local/lib/mm-1.1.3


To setup my environment, I run:
-------------------------------
cd /tmp
bzip2 -d ./binutils-001201.tar.bz2
tar xf ./binutils-001201.tar
cd /d01/src
tar zxf /tmp/gcc-20001127.tar.gz
cd gcc-20001127
mv /tmp/binutils-001201 ./binutils
mkdir tgt
cd tgt
../configure --enable-shared
make bootstrap


It builds stage 1 and stage 2. However, when trying to build libstdc++, it 
fails with the following:

/d01/src/gcc-20001127/tgt/gcc/xgcc -B/d01/src/gcc-20001127/tgt/gcc/ 
-B/usr/local/sparc-sun-solaris2.8/bin/ 
-B/usr/local/sparc-sun-solaris2.8/lib/ -isystem 
/usr/local/sparc-sun-solaris2.8/include -shared  .libs/limitsMEMBERS.o 
.libs/cmath.o .libs/complex.o .libs/complexf.o .libs/complexl.o 
.libs/complex_io.o .libs/stdexcept.o .libs/bitset.o .libs/c++io.o 
.libs/ios.o .libs/stdstreams.o .libs/strstream.o .libs/locale.o 
.libs/localename.o .libs/codecvt.o .libs/locale-inst.o .libs/stl-inst.o 
.libs/misc-inst.o .libs/valarray-inst.o .libs/string-inst.o 
-Wl,--whole-archive ../libmath/.libs/libmath.a 
../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive  -lm 
../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm 
-lm   -lc  -Wl,-O1 -Wl,-soname -Wl,libstdc++.so.3 -o 
.libs/libstdc++.so.3.0.0
/usr/ccs/bin/ld: illegal option -- -
/usr/ccs/bin/ld: illegal option -- w
/usr/ccs/bin/ld: illegal option -- -
/usr/ccs/bin/ld: illegal option -- n
ld: warning: option -o appears more than once, first setting taken
/usr/ccs/bin/ld: illegal option -- O
/usr/ccs/bin/ld: illegal option -- 1
ld: warning: option -o appears more than once, first setting taken
.
.
<snipped all the possible options from ld>
.
.
collect2: ld returned 1 exit status
make[4]: *** [libstdc++.la] Error 1
make[4]: Leaving directory 
`/d01/src/gcc-20001127/tgt/sparc-sun-solaris2.8/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/d01/src/gcc-20001127/tgt/sparc-sun-solaris2.8/libstdc++-v3'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory 
`/d01/src/gcc-20001127/tgt/sparc-sun-solaris2.8/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/d01/src/gcc-20001127/tgt'
make: *** [bootstrap] Error 2


Why is it using /usr/ccs/bin/ld? I thought that since it's building 
binutils, it would use ld from that code set. Appending --with-gnu-ld didn't 
seem to help.

I've searched through mailing list archives and came up with the following 
but it's over a year old...

http://gcc.gnu.org/ml/gcc-bugs/1999-06n/msg00219.html

Thanks!

Mark Bradley
_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

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

* Re: GCC snapshot 2000-11-27 build fails on Solaris 8 SPARC
  2000-12-02 22:54 GCC snapshot 2000-11-27 build fails on Solaris 8 SPARC Mark Bradley
@ 2000-12-05  8:57 ` Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2000-12-05  8:57 UTC (permalink / raw)
  To: Mark Bradley; +Cc: gcc-help

On Dec  3, 2000, "Mark Bradley" <bradl001@hotmail.com> wrote:

> That made little sense to a relative novice like myself so I assumed (insert
> standard warning about making nearly baseless assumptions) that was I needed
> was a shared version of libgcc.a. Is this even possible?

With current development snapshots, --enable-shared will do that.

but note that the warning comes from libtool.  I seem to recall this
having been fixed in recent CVS versions of libtool, but I may well be
just making this up.

> /usr/ccs/bin/ld: illegal option -- -
> /usr/ccs/bin/ld: illegal option -- w

This is a symptom of configuring --with-gnu-ld (implicitly or
explicitly) and having GCC use the built-in system linker instead.

> Why is it using /usr/ccs/bin/ld? I thought that since it's building binutils,
> it would use ld from that code set.

binutils is one of the sub-directories of the binutils distribution.
Other sub-directories are ld, gas, opcodes, etc.  All of them must be
*individually* moved into the GCC tree, otherwise the magic that
auto-detects them won't work.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: GCC snapshot 2000-11-27 build fails on Solaris 8 SPARC
  2000-12-05 14:10 Mark Bradley
@ 2000-12-05 14:15 ` Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2000-12-05 14:15 UTC (permalink / raw)
  To: Mark Bradley; +Cc: gcc-help

On Dec  5, 2000, "Mark Bradley" <bradl001@hotmail.com> wrote:

> How do I force it to use the GNU ld?

Check the GCC FAQ.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: GCC snapshot 2000-11-27 build fails on Solaris 8 SPARC
@ 2000-12-05 14:10 Mark Bradley
  2000-12-05 14:15 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Bradley @ 2000-12-05 14:10 UTC (permalink / raw)
  To: egcs; +Cc: gcc-help

> > That made little sense to a relative novice like myself so I assumed
> > (insert standard warning about making nearly baseless assumptions) > 
>that was I needed was a shared version of libgcc.a. Is this even > 
>possible?
>
>With current development snapshots, --enable-shared will do that.

Good info... I'll get a newer snapshot of that too.

>
>but note that the warning comes from libtool.  I seem to recall this
>having been fixed in recent CVS versions of libtool, but I may well be
>just making this up.
>
> > /usr/ccs/bin/ld: illegal option -- -
> > /usr/ccs/bin/ld: illegal option -- w
>
>This is a symptom of configuring --with-gnu-ld (implicitly or
>explicitly) and having GCC use the built-in system linker instead.

How do I force it to use the GNU ld? I thought the --with-gnu-ld would
do that so I don't know how it's picking up the system linker. Well, the
only way I can see is that the GCC 2.95.2 I installed (from sunfreeware)
was compiled to use the system linker . Would it be helpful to inspect
the -dumpspecs output from gcc?

Which linker do i want? I thought the GNU linker was needed if I wanted
to build shared libraries since there was a bug in Sun's linker. Is
this an issue anymore as to which one I use?

> > Why is it using /usr/ccs/bin/ld? I thought that since it's building > 
>binutils, it would use ld from that code set.
>
>binutils is one of the sub-directories of the binutils distribution.
>Other sub-directories are ld, gas, opcodes, etc.  All of them must be
>*individually* moved into the GCC tree, otherwise the magic that
>auto-detects them won't work.

hmm. I was under the impression that I could just move the binutils
source directory into the GCC source directory and it would do the job.
More good info. I'll try these things.

Thanks,

Mark Bradley
_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

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

end of thread, other threads:[~2000-12-05 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-02 22:54 GCC snapshot 2000-11-27 build fails on Solaris 8 SPARC Mark Bradley
2000-12-05  8:57 ` Alexandre Oliva
2000-12-05 14:10 Mark Bradley
2000-12-05 14:15 ` Alexandre Oliva

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).