g++ 2.7.0 & ELF problems

g++ 2.7.0 & ELF problems

Post by Steve Be » Tue, 25 Jul 1995 04:00:00



I installed gcc 2.7.0 and the latest libg++ and with that, managed to
compile a number of C++ programs.  Then I needed to recompile my kernel,
and gcc was unable to do that for some reason - I fixed it by upgrading
to the latest libc, ld.so and kernel.  So now that I've got my kernel
rebuilt, I want to go back to work on my programs.  But g++ gives me
an 'Internal Compiler Error' on just about every non-trivial C++ program.
If I use '-b i486-linuxaout', though it compiles the .o's just fine, but
when it goes to link, it gives me 'Undefined symbol: L1' in two of my
modules which happen to define large static arrays.

This is the first time I've installed libc, libg++ or ld.so - so I've
probably done something wrong.  If anybody's got a configuration like
mine, could you possibly send me a 'ls -l ; file *' from /lib and
/usr/lib or otherwise give me a clue what's wrong?

                                        - Steve

 
 
 

g++ 2.7.0 & ELF problems

Post by David Bro » Fri, 28 Jul 1995 04:00:00


: I installed gcc 2.7.0 and the latest libg++ and with that, managed to
: compile a number of C++ programs.  Then I needed to recompile my kernel,
: and gcc was unable to do that for some reason - I fixed it by upgrading
: to the latest libc, ld.so and kernel.  So now that I've got my kernel
: rebuilt, I want to go back to work on my programs.  But g++ gives me
: an 'Internal Compiler Error' on just about every non-trivial C++ program.
: If I use '-b i486-linuxaout', though it compiles the .o's just fine, but
: when it goes to link, it gives me 'Undefined symbol: L1' in two of my
: modules which happen to define large static arrays.

I too get Internal Compiler Errors at random.... it happens more so when I
am making the kernel as well as making other programs at the same time, but
cannot be guaranteed to happen or not happen.

I wonder if you followed the ELF-HOWTO when installing GCC2.7.0?

--
     ------------------------------------------------

   /  RSL Phone: +44 116 2522822 during the day    /
  /  Secret number: 0850 152076 anytime it's on   /
 / PGP Public key available for secret messages! /

------------------------------------------------

 
 
 

g++ 2.7.0 & ELF problems

Post by Drago C. Gorican » Fri, 28 Jul 1995 04:00:00


|> I too get Internal Compiler Errors at random.... it happens more so when I
|> am making the kernel as well as making other programs at the same time, but
|> cannot be guaranteed to happen or not happen.
|>
|> I wonder if you followed the ELF-HOWTO when installing GCC2.7.0?

I had a similar problem.  I started with a complete ELF distribution
(Linux Universe) kernel v1.2.1.  Then I wanted to build v1.3.11, and
whenever I ran some programs, including as, emacs, gdb, strings, they
would fail on a segmentation violation.  GCC ran fine but when it
invoked the assembler, as would fail.  GCC then reported an internal
compiler error.  I used strace and was able to determine that under the
new kernel, all the programs were looking for shared libraries in
/lib.  My Linux Universe had some `core' libraries in /lib, but put
most of them in /usr/lib.  As a temporary workaround I created
softlinks from /lib to all libraries in /usr/lib.  This solved my
problem (until I come up with a better fix).  Hope this helps you some.

cheers,
Drago
--
Drago Goricanec                        Phone: +1 214 479-2330

Fujitsu Network Transmission Systems, Inc., Richardson, Texas

 
 
 

g++ 2.7.0 & ELF problems

Post by Steve Be » Tue, 01 Aug 1995 04:00:00




>: I installed gcc 2.7.0 and the latest libg++ [libc, et. al.] ...
>:  So now that I've got my kernel rebuilt ... g++ gives me
>: an 'Internal Compiler Error' on just about every non-trivial C++ program...
>I too get Internal Compiler Errors at random.... it happens more so when I
>am making the kernel as well as making other programs at the same time, but
>cannot be guaranteed to happen or not happen.

>I wonder if you followed the ELF-HOWTO when installing GCC2.7.0?

Yes I followed the ELF-HOWTO (actually, I followed HJ's shortened version
and then went back and re-did it following the more detailed version).
Well, actually I couldn't follow it to the letter 'cause I'm using the latest
SlackWare, which was partially ELFified already, so I had to be careful not
to move any ELF stuff into i486-linuxaout.

Though I have since managed to fix my problems, my solution has nothing to
do with the HOWTO - I downgraded my kernel from 1.3.4 to 1.2.8.

Hard to believe, I know, but it's a fact - if I use my 1.3 boot floppy,
g++ won't compile my files, if I use my 1.2.8 boot floppy, it will do so
just fine.  Both kernels are compiled with the same hardware configuration.

At first I thought that I must have just eaten bad berries or something, but
what you say makes me pretty certain there's a kernel bug afoot.  My advice
to you is to try out a 1.2.8 kernel and see if you have the same problems.

                                        - Steve

 
 
 

g++ 2.7.0 & ELF problems

Post by Steve Dunh » Sat, 05 Aug 1995 04:00:00


: In comp.os.linux.development.system,

: > I wonder if you followed the ELF-HOWTO when installing GCC2.7.0?

: If the ELF-HOWTO is still what is used to be in March (when I swapped
: to ELF iaw this HOWTO), there's no point in following this document
: for installing GCC 2.7.0. Instead, rather follow HJ's release-* file.
: It's that easy.

No, the author of that HOWTO finally stepped down... And the guy who
had the really useful ELF web page took over.  The ELF HOWTO is now a
really nice document.

  See:  http://sable.ox.ac.uk/~jo95004/elf-howto.html

Steve

 
 
 

1. 1.3.x && ELF compile problems

ive tried the ELF patch that was posted to this newsgroup, and the
1.3.3 patch, but still cant get it to compile, using GCC 2.6.3.
It keeps failing on kernel.o and others at what appears to be the
linking stage.

Does anyone know if theres a full 100% working patch out there yet?

--
"Takes you back, doesnt it?" - D.G. - Pulse

2. Uh Oh...MS taking over my office...

3. ELF & linux & DOS & cross-compiling

4. Anyone got an Imagen to work on a Risc-System 6000?

5. ELF upgrade problems -- ncurses, gdbm, elf kernel

6. problems with backup on Sun

7. Open Sound System & RedHat 4.1 & elf-binaries-self-extracting

8. tying a service to an interface

9. Linux 1.3.3 & gcc & elf etc

10. GAWK 2.15.6 with ELF gcc-2.7.0 & libc-5.0.9 & linux

11. &&&&----Looking for a unix shell------&&&&&

12. Problem with NetTools & WuFTP compiled at Linux Kernel 2.0.x / ELF

13. New kernel & ELF...minor problem