seg faults when compiling gcc with -pipe

seg faults when compiling gcc with -pipe

Post by Angus Macka » Mon, 25 Aug 1997 04:00:00



I am getting segmentation violations and compile hangs
when trying to compile with the "-pipe" option under
gcc 2.7.2.1.

I am using a RHL 4.1 base and with the precompiled kernel
there are no errors with the "-pipe" option.

but after I make a custom kernel(either 2.0.27 or 2.0.30)
and boot it anything that I try to compile with the "-pipe"
option will hang or seg fault.

there must be something I am not setting up for gcc, or a kernel
module that I have left out. the kernels that I am building are
very minimal and spcific to my system.

As far as I understand the "-pipe" option only saves compile space
and shouldn't effect the compiled program at all, but the kernel
and all daemons usually use this option so I am hesitant on hacking
out the -pipe flag.

any help is apreciated.
cheers, Angus.

 
 
 

seg faults when compiling gcc with -pipe

Post by Frank Sweetse » Wed, 27 Aug 1997 04:00:00



> I am getting segmentation violations and compile hangs
> when trying to compile with the "-pipe" option under
> gcc 2.7.2.1.

read http://www.bitwizard.nl/sig11/

--
Windows: I can play Doom!              |RedHat Linux 2.0.31pre-5 i486
Linux: I can be a file server, be a Web|Because reboots are for upgrades!
server, run the accounting package with|http://www.wpi.edu/~rasmusin/pgp.html
twelve terminals AND play Doom!        |for pgp key.        frank sweetser

 
 
 

seg faults when compiling gcc with -pipe

Post by Angus Macka » Wed, 27 Aug 1997 04:00:00


well as I am writing this I have 2 copies of applixware running
5 copies of gcc -O3 running and I am writing it in netscape.
all looks fine with gcc though. there they all just finnished.
all 5 compiles worked with no errors and the exacutables they
make work.

this is starting to get puzzling. I guess I could compile a version
of gcc with "-g" and try to debug that but someone out there must
know what is happening here.

thanks for you suggestions.

I just watched /var/tmp while gcc did a non pipe compile and it
didn't create any files there. where does gcc make it's tmp files.

cheers, Angus.



> > great(even ip_masq). but now if I try to compile anything
> > under gcc with the -pipe option it seg faults, even "hello world".
> > now if I take out the pipe option it compiles fine.
> [...]
> > I just don't see how this could be hardware. it is only
> > under a custom kernel and it always happens.

> Well, this is a complete stab in the dark but: perhaps the kernel
> is configured incorrectly in such a way that when you use more than
> a certain amount of memory (several compiler phases in memory at
> once) it tries to use some nonexistent memory and crashes. Does
> the problem affect other memory intensive activities? What happens if
> you e.g. run 5 copies of gcc simultanously in parallel (without -pipe)?

> (I notice you have a reasonable amount of memory; maybe the crash happens
> the first time the system tries to swap?)

> --

>  PGP 0x27F772C1: 0C 0D 10 D5 FC 73 D1 35  26 46 42 9E DC 6E 0A 88

 
 
 

seg faults when compiling gcc with -pipe

Post by Gruber Gerhar » Fri, 29 Aug 1997 04:00:00



> are symbolic links to it valid like symbolic links to kernels?

Yes. I use it and it works.

--

Bye,
   Gerhard

 
 
 

seg faults when compiling gcc with -pipe

Post by Angus Macka » Fri, 29 Aug 1997 04:00:00


Well my search is over. I have found the problem. aparently
if you have an AMD k-5 like I do you must compile your kernel
for an i386 and not a pentium.

I had thought that I had tryed that but, it has now worked.
I would think that this info would have been easier to come
buy though.

oh well, thanks for the help, especially Piotr Kasprzyk.

 
 
 

1. suddenly Seg Faults on exit of gcc-compiled bins, and on gnu Make's

everything was going fine until around the time i decided to implement
shared modules on apache, and wen't to recompile it (it had compiled
fine). it seemed to me the gnu make wanted the gnu ld, so i went to add
binutils and got a make error on that package,. now, none of the
packages i was able to make can make without the Seg Faults (messages
like "your compiler cannot generate executables" "libXa.o not found").
now, when i compile my single-threaded c-code, the programs execute but
they generate a Seg Fault error on exit, causing me a problem with any
disk i/o in the buffer.

does anyone have any clue what's happening here? naively (i'm somewhat
a novice) it seems to be an interaction with the shell or the
environment. but, i went back to my old environment and it still makes
the errors. however, the old executables (not since recompiled) work
fine without the error.

Sent via Deja.com
http://www.deja.com/

2. DBVISTA and lockmngr (errno=22)

3. Compiling *** VIM 5.3 *** Segmentation Fault..what is Seg-Fault..MEM Bounds?

4. Samba and Win95 clients

5. Seg Faults with gcc 2.8.1 !!

6. AOL

7. Intermittent seg faults - elf, xview or gcc (or all three)

8. COMMERCIAL: LINUX(1) Book/Just Linux!

9. Change from gcc to egcs gives seg fault in make

10. help!! seg fault with gcc

11. gcc Error 139 or Seg fault (glibc2.0.7)

12. [Fwd: gcc seg fault when not casting pointers properly ???]

13. gcc-2.7.2 seg faults