[SOLVED] xgcc error while installing gcc 4.4 on RHEL 5.3
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,297
Rep:
# 1
Quote:
What is going wrong here ?
The answer is :
Everything seems to be done in a way, that will cause errors.
* None of your commands are to be done as root.
( Only 'make install', when you eventually come to that.)
* The "svn gcc" is version 4.6.x , I think :
May not work, for EL5 a stable version like 4.5.1 is recommendable.
* gmp, mpfr, mpc files are missing in the gcc/ folder. ?
* Plain " ../gcc/configure " will never work.
Minimum is like the ../gcc-4.5.1/configure line shown in the link, #2.
..
Thanks a lot for the guides, knudfl!
I started from scratch, checked out the branch 4.5; and also downloaded the mpc, mpfr and gmp and untar-ed them in respective directories.
Then I first followed your post on the thread you linked, and got these errors during make:
Code:
spr177@mesozoic gcc-build$ ../gcc-4.5.1/configure --prefix=/usr/local/gcc451 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --with-system-zlib --libexecdir=/usr/lib --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
...
spr177@mesozoic gcc-build$ make
...
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5.1/gcc -I../../gcc-4.5.1/gcc/. -I../../gcc-4.5.1/gcc/../include -I../../gcc-4.5.1/gcc/../libcpp/include -I/scratch/GCC/gcc-build/gmp -I/scratch/GCC/gcc-build/./mpfr -I/scratch/GCC/gcc-4.5.1/mpfr -I/scratch/GCC/gcc-4.5.1/mpc/src -I../../gcc-4.5.1/gcc/../libdecnumber -I../../gcc-4.5.1/gcc/../libdecnumber/bid -I../libdecnumber -I/usr/include/libelf ../../gcc-4.5.1/gcc/lto-compress.c -o lto-compress.o
../../gcc-4.5.1/gcc/lto-compress.c:28:18: error: zlib.h: No such file or directory
../../gcc-4.5.1/gcc/lto-compress.c: In function ‘lto_zalloc’:
../../gcc-4.5.1/gcc/lto-compress.c:61: error: ‘Z_NULL’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:61: error: (Each undeclared identifier is reported only once
../../gcc-4.5.1/gcc/lto-compress.c:61: error: for each function it appears in.)
../../gcc-4.5.1/gcc/lto-compress.c: In function ‘lto_zfree’:
../../gcc-4.5.1/gcc/lto-compress.c:70: error: ‘Z_NULL’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c: In function ‘lto_normalized_zlib_level’:
../../gcc-4.5.1/gcc/lto-compress.c:83: error: ‘Z_DEFAULT_COMPRESSION’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:85: error: ‘Z_NO_COMPRESSION’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:87: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c: In function ‘lto_end_compression’:
../../gcc-4.5.1/gcc/lto-compress.c:174: error: ‘z_stream’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:174: error: expected ‘;’ before ‘out_stream’
../../gcc-4.5.1/gcc/lto-compress.c:175: warning: ISO C90 forbids mixed declarations and code
../../gcc-4.5.1/gcc/lto-compress.c:180: error: ‘out_stream’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:186: error: ‘Z_NULL’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:188: warning: implicit declaration of function ‘deflateInit’
../../gcc-4.5.1/gcc/lto-compress.c:189: error: ‘Z_OK’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:190: warning: implicit declaration of function ‘zError’
../../gcc-4.5.1/gcc/lto-compress.c:190: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
../../gcc-4.5.1/gcc/lto-compress.c:196: warning: implicit declaration of function ‘deflate’
../../gcc-4.5.1/gcc/lto-compress.c:196: error: ‘Z_FINISH’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:197: error: ‘Z_STREAM_END’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:198: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
../../gcc-4.5.1/gcc/lto-compress.c:217: warning: implicit declaration of function ‘deflateEnd’
../../gcc-4.5.1/gcc/lto-compress.c:219: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
../../gcc-4.5.1/gcc/lto-compress.c: In function ‘lto_end_uncompression’:
../../gcc-4.5.1/gcc/lto-compress.c:266: error: ‘z_stream’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:266: error: expected ‘;’ before ‘in_stream’
../../gcc-4.5.1/gcc/lto-compress.c:267: warning: ISO C90 forbids mixed declarations and code
../../gcc-4.5.1/gcc/lto-compress.c:270: error: ‘in_stream’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:276: error: ‘Z_NULL’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:278: warning: implicit declaration of function ‘inflateInit’
../../gcc-4.5.1/gcc/lto-compress.c:279: error: ‘Z_OK’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:280: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
../../gcc-4.5.1/gcc/lto-compress.c:286: warning: implicit declaration of function ‘inflate’
../../gcc-4.5.1/gcc/lto-compress.c:286: error: ‘Z_SYNC_FLUSH’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:287: error: ‘Z_STREAM_END’ undeclared (first use in this function)
../../gcc-4.5.1/gcc/lto-compress.c:288: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
../../gcc-4.5.1/gcc/lto-compress.c:307: warning: implicit declaration of function ‘inflateEnd’
../../gcc-4.5.1/gcc/lto-compress.c:309: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
make[3]: *** [lto-compress.o] Error 1
make[3]: Leaving directory `/scratch/GCC/gcc-build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/scratch/GCC/gcc-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/scratch/GCC/gcc-build'
make: *** [all] Error 2
Then I checked whether zlib is present in the system or not. It seems it is there.
However, not all tests passed in the make check. Here is the summary
Code:
spr177@mesozoic gcc-build$ ../gcc-4.5.1/contrib/test_summary | grep -A7 Summ
=== gcc Summary ===
# of expected passes 71605
# of unexpected failures 33
# of unexpected successes 16
# of expected failures 189
# of unsupported tests 1703
/scratch/GCC/gcc-build/gcc/xgcc version 4.5.2 20101117 (prerelease) (GCC)
--
=== g++ Summary ===
# of expected passes 23001
# of expected failures 151
# of unsupported tests 305
/scratch/GCC/gcc-build/gcc/testsuite/g++/../../g++ version 4.5.2 20101117 (prerelease) (GCC)
=== libgomp tests ===
--
=== libgomp Summary ===
# of expected passes 1029
=== libmudflap tests ===
Running target unix
FAIL: libmudflap.c/pass46-frag.c (-O2) (test for excess errors)
--
=== libmudflap Summary ===
# of expected passes 1880
# of unexpected failures 14
=== libstdc++ tests ===
Running target unix
--
=== libstdc++ Summary ===
# of expected passes 7719
# of expected failures 95
# of unsupported tests 13
Compiler version: 4.5.2 20101117 (prerelease) (GCC)
Platform: x86_64-unknown-linux-gnu
Two things:
First, I read earlier that that some tests will fail! But from this result how do I figure out if this configuration/make is ok to install?
Second, while doing `make install' is it advisable to be root? I want to be installed globally, but do not want to change the global gcc installation. That means I want to have two versions of gcc available globally. I believe new gcc will be treated as gcc541 (guessing from the configure flags).
About your zlib error : zlib is not installed !
I.e. the package "zlib" is only a small part of the complete zlib.
Libraries come in two or more packages.
To compile something, e.g. gcc with zlib : # yum install zlib-devel
About tests: '4.5.2 pre' is not a final version. So it's a "don't know".
An example, stable gcc source code SRC RPM ( Redhat EL6, gcc-4.4.4 ) : http://ftp.redhat.com/pub/redhat/lin...13.el6.src.rpm
( Unpack with 'rpm2cpio gcc-4.4.4-13.el6.src.rpm | cpio -idmv' ).
..
Thanks a lot knudfl!
Installed gcc as per the instructions, and everything seem to work fine!
Quote:
Originally Posted by knudfl
About your zlib error : zlib is not installed !
I.e. the package "zlib" is only a small part of the complete zlib.
Libraries come in two or more packages.
To compile something, e.g. gcc with zlib : # yum install zlib-devel
So is that why always there are a regular version and a devel version of some packages? I guess the devel package is needed for development tools and libraries.
Quote:
Originally Posted by knudfl
About tests: '4.5.2 pre' is not a final version. So it's a "don't know".
An example, stable gcc source code SRC RPM ( Redhat EL6, gcc-4.4.4 ) : http://ftp.redhat.com/pub/redhat/lin...13.el6.src.rpm
( Unpack with 'rpm2cpio gcc-4.4.4-13.el6.src.rpm | cpio -idmv' ).
..
Just a quick question, is there way to check out the exact version (say, 4.5.1) not the current version (4.5.2-pre in this case) by svn for gcc? As per the gcc website, svn list only gives branch number, i.e., 4.5-branch.
Also how do I check which version am I checking out? svn log and info doesn't seem to help!
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,297
Rep:
Quote:
.. but I was thinking if there is anyway to check out a
particular version using svn (subversion) ... just curious !
None, that I know about.
But then again : There are lots of things, I know nothing about.
# 6 :
Quote:
So is that why always there are a regular version and a devel version
of some packages? I guess the devel package is needed for development
tools and libraries.
Only libraries come as "lib<name>-devel".
And they are mostly used for compiling only.
I.e. when you never compile, only the runtime library is required.
To see, what they contain, please try these commands :
'rpm -ql zlib' , 'rpm -ql zlib-devel'.
Example content in a lib<name>-devel package :
/usr/lib/lib<name>.so ( a symlink to "real name" or to "so name" )
/usr/lib/pkgconfig/<name>.pc : The "package config file"
/usr/bin/<name>-config
/usr/include/headers.h : Code required for compilation.
..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.