How to compile GCC

How to compile GCC

Post by tvn198 » Fri, 31 Aug 2001 14:24:15



hi

I am trying (and also learning) how to compile GCC 3.01 ... this is what
I have done .... I try to follow the Readme

- make a dir call objdir
- untar gcc-3.0.1.tar.gz
- from objdir , run gcc=3.0.1/configure

I got the following error - not sure what it means
...
...
loading cache ../config.cache
checking LIBRARY_PATH variable... contains current directory
configure: error:
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc. Please change the environment variable
*** and run configure again.
Configure in /docs/objdir/gcc failed, exiting.

What did I do wrong ?

thanks

 
 
 

How to compile GCC

Post by cll muz » Fri, 31 Aug 2001 18:18:04




> hi

> I am trying (and also learning) how to compile GCC 3.01 ... this is what
> I have done .... I try to follow the Readme

> - make a dir call objdir
> - untar gcc-3.0.1.tar.gz
> - from objdir , run gcc=3.0.1/configure

> I got the following error - not sure what it means ...
> ...
> loading cache ../config.cache
> checking LIBRARY_PATH variable... contains current directory configure:
> error:
> *** LIBRARY_PATH shouldn't contain the current directory when ***
> building gcc. Please change the environment variable *** and run
> configure again.
> Configure in /docs/objdir/gcc failed, exiting.

> What did I do wrong ?

> thanks

Just do what the error message says.
Have a look at /etc/ld.so.conf
If there is a line in there which has . , remove it.
<. is current directory>
Save /etc/ld.so.conf, then run as root ldconfig, then have another go.
(Note -- this is just a guess -- I personally have never struck this
problem)

Never trust a man in a suit --
cll

 
 
 

1. Compiling gcc 2.7.2.1 with gcc 3.2 on redhat 8.0

I need to use an older version of gcc to compile a C++ program that I
can't seem to compile with the latest gcc.

I'm trying to compile gcc 2.7.2.1 and in the beginning of stage 2 of
the installation process I get the following error message:

stage1/xgcc -Bstage1/  -DIN_GCC   -g -O2   -o genattr \
 genattr.o rtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` `

in ?*) echo  ;; esac `
./genattr ./config/i386/i386.md > tmp-attr.h
/bin/sh: ./genattr: /lib/ld-linux.so.1: bad ELF interpreter: No such
file or directory
make: *** [stamp-attr] Error 126

My steps are:

./configure --build=i586-redhat-linux (I've tried a least a dozen
different settings here)
make LANGUAGES=c
make stage1
make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2"

Anyone have any idea? I've scoured the newsgroups and tried everything
that there with no luck.

Thanks in advanced...

2. No MS breakup isn't relevant to Linux

3. GCC-i2.6.3 compiling (gcc with pentium optimiz's) PLEASE HELP US!!

4. X windows

5. Problems compiling gcc 2.7.2.2

6. Autoloading files during boot

7. make and compiling gcc-2.7.0

8. LILO hangs at LI and L 04 04 ...

9. Compile GCC 2.95.3 in RedHat 7.0 failed !!

10. Proper order to compile gcc, binutils, libstd+++ and glib2?????

11. Compiling GCC 2.8.x under slackware

12. Compiling gcc 3.1 on AIX 4.3.3 fails

13. EGCS crashes compiling gcc-2.95.2