RH5.2 / Upgrading compiler w/o breaking kernel compile

RH5.2 / Upgrading compiler w/o breaking kernel compile

Post by Gerald Gutierr » Thu, 04 Mar 1999 04:00:00



Hi all.

I have a RH5.2 system and I would like to upgrade the compiler to use egcs
1.1.1. Unfortunately, previously with my 5.1 system when I installed egcs it
wiped out my gcc and as a result I could no longer compile the kernel. Is this
going to happen to me if I try to install egcs 1.1.1 in RH5.2? I believe RH5.2
has kernel 2.0.36.

If I really needed both egcs 1.1.1 and the ability to compile the kernel, what
could I do?

Also, will I have any trouble if I upgrade the kernel to 2.2?

Thanks.

 
 
 

RH5.2 / Upgrading compiler w/o breaking kernel compile

Post by Paul Kimo » Thu, 04 Mar 1999 04:00:00



> If I really needed both egcs 1.1.1 and the ability to compile the kernel,
> what could I do?

(1) Reinstall gcc 2.7.2.x for the purposes of compiling the kernel only,
or
(2) Try the (experimental!) patches at
http://www.suse.de/~florian/kernel+egcs.html ,
or
(3) Use 2.2.x instead.

Quote:> Also, will I have any trouble if I upgrade the kernel to 2.2?

It depends.  You should read the kernel's Documentation/Changes file, and
anything relevant that your distribution has released.  (To start, try
the section labelled "Upgrading" at LinuxHQ, http://www.linuxhq.com/ .)

--


 
 
 

RH5.2 / Upgrading compiler w/o breaking kernel compile

Post by Eric Pott » Thu, 04 Mar 1999 04:00:00


[Posted and mailed]

Gerald Gutierrez enlightened this group thus:

Quote:

> Hi all.

> I have a RH5.2 system and I would like to upgrade the compiler to use egcs
> 1.1.1. Unfortunately, previously with my 5.1 system when I installed egcs it
> wiped out my gcc and as a result I could no longer compile the kernel. Is this
> going to happen to me if I try to install egcs 1.1.1 in RH5.2? I believe RH5.2
> has kernel 2.0.36.

> If I really needed both egcs 1.1.1 and the ability to compile the kernel, what
> could I do?

> Also, will I have any trouble if I upgrade the kernel to 2.2?

> Thanks.

Install egcs in a different directory than gcc.  If gcc is in /usr/bin then
you can install egcs into /usr/local/bin.  Then only way I know to do this
is to install it from source code, and use the --prefix  switch and run
./configure --prefix=/usr/local
before you run make.  After egcs is installed, all you need to do  is to check
your PATH to determine which compiler is run.  Which compiler is used will be
the one found first in the PATH search.  You can change your PATH on the fly
to switch back and forth between compilers.

--

 *^  / \  \   |  \      
 / \/   \  \__|   \      
/  /   ^ \  \    
  /       \  \           Eric Potter
 /  ^   ^  \  \          

 
 
 

RH5.2 / Upgrading compiler w/o breaking kernel compile

Post by Michael Meissne » Thu, 04 Mar 1999 04:00:00



> [Posted and mailed]

> Gerald Gutierrez enlightened this group thus:

> > Hi all.

> > I have a RH5.2 system and I would like to upgrade the compiler to use egcs
> > 1.1.1. Unfortunately, previously with my 5.1 system when I installed egcs it
> > wiped out my gcc and as a result I could no longer compile the kernel. Is this
> > going to happen to me if I try to install egcs 1.1.1 in RH5.2? I believe RH5.2
> > has kernel 2.0.36.

> > If I really needed both egcs 1.1.1 and the ability to compile the kernel, what
> > could I do?

> > Also, will I have any trouble if I upgrade the kernel to 2.2?

> > Thanks.

> Install egcs in a different directory than gcc.  If gcc is in /usr/bin then
> you can install egcs into /usr/local/bin.  Then only way I know to do this
> is to install it from source code, and use the --prefix  switch and run
> ./configure --prefix=/usr/local
> before you run make.

You don't have to do this on RedHat.  Just install the egcs packages you want
to use, and then /usr/bin/egcs will use the egcs compiler, and /usr/bin/gcc
will use the 2.7.2.3 compiler.  On my system, I nuked /usr/bin/gcc and made
gcc a symlink to egcs (but then I use the 2.2.x kernels).

Quote:>                       After egcs is installed, all you need to do  is to check
> your PATH to determine which compiler is run.  Which compiler is used will be
> the one found first in the PATH search.  You can change your PATH on the fly
> to switch back and forth between compilers.

You could use the PATH trick, but having a directory that has gcc symlinked to
/usr/bin/egcs that occurs before /usr/bin, and in the kernel directory do
(assuming bash syntax):

        PATH=/usr/bin:$PATH make

To get /usr/bin on your path before your symlink for this one compile.

--
Michael Meissner, Cygnus Solutions
PO Box 98, Ayer Massachusetts, USA 01432-0098

 
 
 

1. Problems rebuilding procps as part of RH5.0-5.1 compiler upgrade

I'm upgrading to KDE 1.0 on my RH 5.0 system, and this involves upgrading
to the egcs compiler, a convoluted process detailed in gcc_to_egcs-HOWTO:

No problem until I try to do that rebuild (via rpm --rebuild
procps-1_2_7-1_src.rpm). I eventually get the following two error messages:

sessreg.c:45: X11/Xos.h: No such file or directory
sessreg.c:46: X11/Xfuncs.h: No such file or directory

These two header files are in my /usr/X11R6/include/X11 directory. The
makefile installed with the RPM contains the following:

INCDIRS    =  -I/usr/include/ncurses -I/usr/X11R6/include
CC         =  gcc -O3 $(INCDIRS) -D_GNU_SOURCE#-ggdb
CFLAGS     =  -I. -Wall -Wno-unused

The string used to compile sessreg.c is:

gcc -O2 -m486 -fno-strength-reduce -I. -Wall -Wno-unused -DSYSV -c
sessreg.c

which, near as I can tell, should be generated by the makefile rule:

%.o : %.c
        $(strip $(CC) $(CFLAGS) -c $^)

That rule looks like it ought to include the -I/usr/X11R6/include path,
but, well, evidently it isn't, and as sessreg.c is the first (and possibly
only) file to have a header in the /usr/X11R6/include/X11 directory, that's
where the build fails. I tried modifying that file to use an absolute path
and just running make, but I then started running into other problems, and
I don't know enough about this stuff to know if they resulted from doing
the build manually or they would have come up anyway (rpm --rebuild runs
make with a bunch of options that came up as invalid when I tried to use
the same command from the command line, so I assume rpm is reciting some
deep incantations that I don't know about). I also tried setting an
INCLUDE=/usr/X11R6/include variable, but that didn't do anything.

So I throw myself upon the collective wisdom of Usenet. Eeek. :-)

--

2. Linux, IBM ValuePoint, FAQ

3. newbie question -- upgrade RH5.2 to 2.0.36-3 broke my 3c905

4. Reading is much more interesting than TV (0665/1708)

5. help - rh5.1 upgrade broke user authentication in apache!

6. Keyboard emulator w/ Joystick

7. Kernel upgrade broke kernel compilation

8. Kernel 1.3.44 Bug?

9. kernel upgrade broke ppp; kernel version message

10. Upgraded RH 6.1 to 7.0 - - Now, Compiler Seems Broken

11. PPP broken in switch from RH5 to RH5.2

12. Kernel 2.4.8 - EMU10K1 - Kernel Compile Breaks in Module main.o

13. Get compiler error w/ monolithic kernel on RH5.1