public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Successful egcs-1.0.2 compile!
@ 1998-03-24 21:05 npsimons
  1998-03-27 15:18 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: npsimons @ 1998-03-24 21:05 UTC (permalink / raw)
  To: egcs

-----BEGIN PGP SIGNED MESSAGE-----


        I thought I would try compiling and installing egcs because a friend of
mine said it works better with glibc and it might fix this little problem:

Mysteria:~/Projects/class_check$ gcc lud2.c -o lud2   
/tmp/cca056251.o: In function `main':
/tmp/cca056251.o(.text+0x75): undefined reference to `stat'
/tmp/cca056251.o(.text+0x1bb): undefined reference to `stat'

It's installed, but I guess I need to recompile glibc with egcs so that it will
fix that problem.  BTW, I first ran into this problem with gcc 2.8.1 and glibc
2.0.6.  I found an interesting workaround, which is more of a kludge.  If you
do this:

Mysteria:~/Projects/class_check$ gcc lud2.c -o lud2 -O
Mysteria:~/Projects/class_check$ 

It compiles fine, as shown.  I found a newsgroup posting that said this is
because of some strange relationships between xstat and stat (and variants
thereof; take a look at sys/stat.h).  Adding the -O option makes it so that it
inlines some functions, including stat (I guess).  Needless to say, I was happy
to get anything to compile, so I decided to recompile a few other things (make,
fileutil, etc).  When the -O option didn't work with them, I got nervous.  I
tried lots of different things: -share (compiles; segfaults on exec), -static
(compiles, works flawlessy, but x2 size), passing -shared, -call_shared, -dy,
- -Bsymbolic to ld, etc.  I finally just gave up and tried egcs.  All these
problems are probably just in my setup; I've hacked a lot of things to get them
to "compile" ;)
        Anyways, I had to use the -O option when compiling egcs, and I had to
make a little hack to _G_config.h (in libraries/libio) because of a problem
with a typedef somewhere around line 45; I'm pretty sure it was 'typedef
__sigset_t _G_sigset_t;'.  It was complaining that the data type was undefined.
I remember having to fix a problem like this for something else once before
(maybe previous gcc?), so I check _G_config.h.  No includes, except for one at
the end, and it wasn't sigset.h (where the definition for __sigset_t is).  So I
add it to line one of _G_sigset_t, start another make bootstrap, and it compiles
fine.
        Now I guess I will go and try to recompile glibc with egcs and see what
happens.  Here are the details for my machine:

kernel:  Linux 2.1.90
libc:    glibc 2.0.6 (aka libc 6)
cc:      gcc 2.8.1 (before) egcs 1.0.2 (after)
arch:    i686 (Intel Pentium Pro 180 MHz)
dist:    Slakware 3.2 (1.5 years ago; now it's unrecognizable :)
host:    Mysteria.rcn.nmt.edu (check web address below, if it's up)


- ------------------------------------------------------------------
Nathan Paul Simons                |   Life on the cutting edge
npsimons@nmt.edu                  |         Linux 2.1.90
http://www.nmt.edu/~npsimons      |         glibc 2.0.6
http://Mysteria.rcn.nmt.edu:8080  |         egcs 1.0.2
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNRiQoa2TiEsw6BOVAQFiWwQAq9bMQXdEmRLeRkTRtnXzOxFJPWluL8Ze
Ll69EGWSBWnTh4FcrI2ObkDZZW1tRMicRSmTJcaHLtFe/ff9R8mX38Je6QEy4NS/
a+O1DH2lLY00g1+mH6Hkl7WvJRE48JLv44aQprXXNuGHXiAXBolFRPPFhk2mQqoq
OlRLUtcqXdU=
=i2zY
-----END PGP SIGNATURE-----

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

* Re: Successful egcs-1.0.2 compile!
  1998-03-27 15:18 ` H.J. Lu
@ 1998-03-27 15:18   ` npsimons
  0 siblings, 0 replies; 3+ messages in thread
From: npsimons @ 1998-03-27 15:18 UTC (permalink / raw)
  To: hjl; +Cc: egcs

-----BEGIN PGP SIGNED MESSAGE-----


On 26-Mar-98 H.J. Lu wrote:
>>         I thought I would try compiling and installing egcs because a friend
>of
>> mine said it works better with glibc and it might fix this little problem:
>> 
>> Mysteria:~/Projects/class_check$ gcc lud2.c -o lud2   
>> /tmp/cca056251.o: In function `main':
>> /tmp/cca056251.o(.text+0x75): undefined reference to `stat'
>> /tmp/cca056251.o(.text+0x1bb): undefined reference to `stat'
>> 
>> It's installed, but I guess I need to recompile glibc with egcs so that it
>will
>> fix that problem.  BTW, I first ran into this problem with gcc 2.8.1 and
>glibc
>
>You screwed up your /usr/lib/libc.so, which, BTW, is not a symlink
>for glibc 2. It should be a text file for the linker as linker
>script.
>
>
>H.J.

        Yeah, I went through and found that out.  Thanks!

- -----------------------------------------------------------------
Nathan Paul Simons                |   Life on the cutting edge
npsimons@nmt.edu                  |         Linux 2.1.90
http://www.nmt.edu/~npsimons      |         glibc 2.0.6
http://Mysteria.rcn.nmt.edu:8080  |         egcs 1.0.2
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNRvmlq2TiEsw6BOVAQFjqgP/WZcVBX3hHLr82V3ONm2STL9/5Dzyo0gs
lMKWX1DlREY1Z9EhfReXDc41PuB+2wkC+7w5/X4WmU3PYkmqLhsI1DgT5fzUqvT/
RwMR4S+W1I1dx+eTxyua8lwaWsXFiSfE5xHA1LGbjSeXmwymKzba1XoLi/3d6eOV
NGdDmoynsjI=
=inEG
-----END PGP SIGNATURE-----

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

* Re: Successful egcs-1.0.2 compile!
  1998-03-24 21:05 Successful egcs-1.0.2 compile! npsimons
@ 1998-03-27 15:18 ` H.J. Lu
  1998-03-27 15:18   ` npsimons
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 1998-03-27 15:18 UTC (permalink / raw)
  To: npsimons; +Cc: egcs

>         I thought I would try compiling and installing egcs because a friend of
> mine said it works better with glibc and it might fix this little problem:
> 
> Mysteria:~/Projects/class_check$ gcc lud2.c -o lud2   
> /tmp/cca056251.o: In function `main':
> /tmp/cca056251.o(.text+0x75): undefined reference to `stat'
> /tmp/cca056251.o(.text+0x1bb): undefined reference to `stat'
> 
> It's installed, but I guess I need to recompile glibc with egcs so that it will
> fix that problem.  BTW, I first ran into this problem with gcc 2.8.1 and glibc

You screwed up your /usr/lib/libc.so, which, BTW, is not a symlink
for glibc 2. It should be a text file for the linker as linker
script.


H.J.

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

end of thread, other threads:[~1998-03-27 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-24 21:05 Successful egcs-1.0.2 compile! npsimons
1998-03-27 15:18 ` H.J. Lu
1998-03-27 15:18   ` npsimons

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