LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-30-2009, 11:31 AM   #1
stoneppp
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
Unhappy error when "make" gcc


here is a snippet of the message including error information:
-----------------------------------------------------------
gcc -c -DHAVE_CONFIG_H -g -fkeep-inline-functions -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wstrict-prototypes -pedantic ../.././libiberty/pex-common.c -o pex-common.o
../.././libiberty/pex-common.c: In function `pex_input_file':
../.././libiberty/pex-common.c:390: error: `EINVAL' undeclared (first use in this function)
../.././libiberty/pex-common.c:390: error: (Each undeclared identifier is reported only once
../.././libiberty/pex-common.c:390: error: for each function it appears in.)
../.././libiberty/pex-common.c: In function `pex_input_pipe':
../.././libiberty/pex-common.c:453: error: `EINVAL' undeclared (first use in this function)
make[3]: *** [pex-common.o] error 1
make[3]: Leaving directory `/usr/src/gcc-4.4.0/host-i686-pc-linux-gnu/libiberty'
make[2]: *** [all-stage1-libiberty] error 2
make[2]: Leaving directory `/usr/src/gcc-4.4.0'
make[1]: *** [stage1-bubble] error 2
make[1]: Leaving directory `/usr/src/gcc-4.4.0'
make: *** [all] error 2
-----------------------------------------------------
RHEL 4, kernel 2.6.9-22
this happened when I trying upgrading the GCC
who know how to resolve this problem?
thank you very much!!
 
Old 07-30-2009, 01:13 PM   #2
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
Did you try "yum update gcc" in a root-shell before compiling this from source? I mean, compiling from source can be a pain, while using the package manager of your distro is usually more straightforward (also in terms of dependencies between software packages).

If you have further questions (like, "what is a distro?", "package manager?" ...), I suggest refering to e.g. google (like here: google search for "redhat update package" <- that's where I found the "yum update <package>" command), and if you still don't manage to update your GCC, asking here.
 
Old 07-30-2009, 01:59 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by stoneppp View Post
../.././libiberty/pex-common.c:390: error: `EINVAL' undeclared (first use in this function)
../.././libiberty/pex-common.c:453: error: `EINVAL' undeclared (first use in this function)
It looks like you do not have the standard headers installed.
 
Old 07-30-2009, 03:40 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
To build gcc, a build directory is required.

The recommended build method is described here
http://www.linuxfromscratch.org/lfs/view/6.4/

http://www.linuxfromscratch.org/lfs/...gcc-pass1.html
http://www.linuxfromscratch.org/lfs/...ter06/gcc.html
.....
.....
And gcc 4.x is available with yum :
# yum install gcc4 gcc4-c++ gcc4-gfortran
provides version 4.1.2 .
.....
Using multiple compilers, examples :
sh configure CC=gcc4 CXX=g++4
make CC=gcc4 CXX=g++4
.....

Last edited by knudfl; 07-30-2009 at 04:00 PM.
 
Old 08-01-2009, 12:17 PM   #5
stoneppp
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
thanks you for your guide.
To use "yum",I have to make sure my PC is connected to the internet,which I can't.
because I access the internet via ADSL. and the ISP doesn't supply the Connecting software for Linux.
 
Old 08-01-2009, 12:36 PM   #6
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
I assume you downloaded a source ball (a *.tar.gz file or similar). You can still use the package manager of Red Hat to install a package you download from somewhere, it just has to be in RPM format. I don't know a good source for RPM packages, though.
 
Old 08-02-2009, 07:46 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I guess, you can use these, which I got installed
on CentOS 4.x ( = Redhat EL 4 ) :

gcc4-4.1.2-42.EL4.i386.rpm
gcc4-c++-4.1.2-42.EL4.i386.rpm
gcc4-gfortran-4.1.2-42.EL4.i386.rpm
libgfortran-4.1.2-42.EL4.i386.rpm
from
http://mirror.centos.org/centos/4.7/...6/CentOS/RPMS/
.....
 
  


Reply

Tags
centos4, el4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS6.3 - Ch5.4.1 "/bin/sh sort not found" error at "make bootstrap" ubyt3m3 Linux From Scratch 2 06-23-2008 12:09 AM
upgrade to kernel 2.6.16.1 : "make bzImage" print "parse error" math_physics Red Hat 2 06-29-2007 11:04 PM
error running "make" and "arkollonrc"... Toro Linux - Software 1 04-19-2004 12:24 AM
help with "make" error "Missing seperator" hrishikesh Linux - Software 1 07-18-2003 01:40 AM
LFS 4.1: Stalled at Perl, "missing seperator" error from "make" SparceMatrix Linux From Scratch 1 06-07-2003 03:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration