LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-26-2011, 06:42 AM   #1
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Rep: Reputation: Disabled
errors when installing gcc 4.2.4


Hello

I'm working with ubunto 11.04. i have gcc 4.5.2.

I want install gcc 4.2.4. i download it and i follow this steps

tar -xvjpf gcc-4.2.4.tar.bz2
mkdir gcc-obj
cd gcc-obj
../gcc-4.2.4/configure
make
sudo make install

I have errors when executing the command make

..
MULTILIB_CFLAGS="" T= crtbegin.o crtend.o crti.o crtn.o
make[3]: entrant dans le répertoire « /home/dell/Bureau/gcc-4.2.4/obj/gcc »
/home/dell/Bureau/gcc-4.2.4/obj/./gcc/xgcc -B/home/dell/Bureau/gcc-4.2.4/obj/./gcc/ -B/mips-elf/bin/ -B/mips-elf/lib/ -isystem /mips-elf/include -isystem /mips-elf/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libdecnumber -I../libdecnumber -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -Dinhibit_libc -G 0 \
-c ../../gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
exec: 2: -G: not found
make[3]: *** [crtbegin.o] Erreur 1
make[3]: quittant le répertoire « /home/dell/Bureau/gcc-4.2.4/obj/gcc »
make[2]: *** [extra] Erreur 2
make[2]: quittant le répertoire « /home/dell/Bureau/gcc-4.2.4/obj/gcc »
make[1]: *** [stmp-multilib] Erreur 2
make[1]: quittant le répertoire « /home/dell/Bureau/gcc-4.2.4/obj/gcc »
make: *** [all-gcc] Erreur 2
root@ubuntu:/home/dell/Bureau/gcc-4.2.4/obj#

Have you any idea for this problem ?

Thank you
 
Old 10-26-2011, 07:18 AM   #2
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
Welcome to LQ.

1) Looks like you are building for MIPS ?
What's the reply from 'cat /proc/cpuinfo' ?


2) Plain 'configure' will not do for gcc. Default is :

../gcc-4.2.4/configure --prefix=/usr/local/gcc424 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --with-system-zlib --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
http://www.linuxquestions.org/questi...-1-a-842567/#2


3) I wouldn't use Ubuntu 11.04 or 11.10 for development. Too many pitfalls.
..... ( 11.10 : No gcc can be built. AFAIK.)


4) gcc-4.2.4 packages for Ubuntu 11.04, 32bits i386 are available :
a) gcc42-compat-4.2.4_i386.deb
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US
b) g++42-compat-4.2.4_i386.deb
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US

...
 
Old 10-26-2011, 07:52 AM   #3
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thanks for your reply. I am using 64 bit based CPU.
 
0 members found this post helpful.
Old 10-26-2011, 08:17 AM   #4
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
I execute the command

../gcc-4.2.4/configure --prefix=/usr/local/gcc424 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --with-system-zlib --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs

but i have the following errors

/bin/sh ../.././gcc/mkconfig.sh tconfig.h
/home/dell/Bureau/gcc-4.2.4/host-i686-pc-linux-gnu/gcc/xgcc -B/home/dell/Bureau/gcc-4.2.4/host-i686-pc-linux-gnu/gcc/ -B/usr/local/gcc424/i686-pc-linux-gnu/bin/ -B/usr/local/gcc424/i686-pc-linux-gnu/lib/ -isystem /usr/local/gcc424/i686-pc-linux-gnu/include -isystem /usr/local/gcc424/i686-pc-linux-gnu/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I/home/dell/Bureau/gcc-4.2.4/gmp -I../.././gcc/../libdecnumber -I../libdecnumber -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \
-c ../.././gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
Dans le fichier inclus à partir de /usr/include/bits/errno.h:25,
à partir de /usr/include/errno.h:36,
à partir de ../.././gcc/tsystem.h:96,
à partir de ../.././gcc/crtstuff.c:68:
/usr/include/linux/errno.h:4:23: erreur: asm/errno.h : Aucun fichier ou dossier de ce type
make[3]: *** [crtbegin.o] Erreur 1
make[3]: quittant le répertoire « /home/dell/Bureau/gcc-4.2.4/host-i686-pc-linux-gnu/gcc »
make[2]: *** [all-stage1-gcc] Erreur 2
make[2]: quittant le répertoire « /home/dell/Bureau/gcc-4.2.4 »
make[1]: *** [stage1-bubble] Erreur 2
make[1]: quittant le répertoire « /home/dell/Bureau/gcc-4.2.4 »
make: *** [all] Erreur 2
root@ubuntu:/home/dell/Bureau/gcc-4.2.4#
 
Old 10-26-2011, 09:28 AM   #5
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
# 4
Quote:
erreur: asm/errno.h : Aucun fichier ou dossier de ce type
I.e. : asm/errno.h : No such file ...

Is g++ installed ? ( Installing g++ takes care that all headers etc.
required for gcc gets installed : libc6-dev, linux-libc-dev ).
"asm/errno.h" http://packages.ubuntu.com/natty-upd...inux-libc-dev/

Is your OS 64bits ? Or 32bits ?

What is the purpose of installing gcc-4.2.4 ?
(Not all applications can be built on the 64bits Ubuntu 11.04).
..
 
Old 10-26-2011, 10:12 AM   #6
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
yes the g++ is installed.

I am using 64 bit based CPU.

I have to install gcc 4.2.4 because CILK ++ requires a gcc 4.2.4

the following notes is from documentation of install cilk++ :

To use the Intel Cilk++ SDK to build applications for the Linux* OS:
o The compiler in this SDK is built on version 4.2.4 of the GNU Compiler Collection
(gcc) and requires the same environment as that version of gcc, including a linker
and assembler typically installed into /bin/utils.
 
Old 10-26-2011, 10:21 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
The question is not whether you have a 64bits CPU.

Please answer the questions from posts # 2, # 6.

Deciding the processor "name" : 'cat /proc/cpuinfo'
... And please tell us the name / type.

Deciding the OS architecture : 'uname -m'
 
Old 10-26-2011, 10:40 AM   #8
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
The result of 'cat /proc/cpuinfo' : (example of one processor)

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
stepping : 7
cpu MHz : 800.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 3991.19
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:


root@ubuntu:/home/dell/Bureau/gcc-4.2.4# uname -m
i686
 
Old 10-26-2011, 10:47 AM   #9
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
/usr/include/linux/errno.h:4:10: fatal error: 'asm/errno.h' file not found

errno.h used to be in /usr/include/asm/errno.h, but as of Ubuntu 11.04 it appears in these locations:

root@ubuntu:/home/dell/Bureau/gcc-4.2.4# locate errno.h
/usr/include/errno.h
/usr/include/asm-generic/errno.h
/usr/include/bits/errno.h
/usr/include/i386-linux-gnu/asm/errno.h
/usr/include/linux/errno.h
/usr/include/sys/errno.h
/usr/lib/syslinux/com32/include/errno.h
/usr/src/linux-headers-2.6.38-8/arch/alpha/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/arm/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/arm/mach-bcmring/include/csp/errno.h
/usr/src/linux-headers-2.6.38-8/arch/avr32/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/blackfin/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/cris/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/frv/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/h8300/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/ia64/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/m32r/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/m68k/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/microblaze/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/mips/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/mn10300/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/parisc/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/powerpc/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/s390/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/score/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/sh/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/sparc/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/tile/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/x86/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/arch/xtensa/include/asm/errno.h
/usr/src/linux-headers-2.6.38-8/include/asm-generic/errno.h
/usr/src/linux-headers-2.6.38-8/include/linux/errno.h
/usr/src/linux-headers-2.6.38-8-generic/include/linux/errno.h
root@ubuntu:/home/dell/Bureau/gcc-4.2.4#

There is no 'asm' directory,

So, do i have to install linux-libc-dev to have /usr/include/asm/errno.h ???
 
Old 10-26-2011, 11:03 AM   #10
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
Just for the record
http://packages.debian.org/sid/i386/...c-dev/filelist
>>> /usr/include/i386-linux-gnu/asm/errno.h

I don't know how you can install g++ and not getting linux-libc-dev installed.
EDIT : Sorry, looks like the package is installed.


Anyway : Why not use the two packages listed in post #2 ?
gcc42-compat-4.2.4_i386.deb, g++42-compat-4.2.4_i386.deb
( Built for Ubuntu 11.04 "i686" only.)
.... Then you don't have to build another "gcc-4.2.4"

..

Last edited by knudfl; 10-26-2011 at 11:12 AM.
 
Old 10-26-2011, 11:20 AM   #11
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
The two Ubuntu 11.04 packages were built by another method.

Namely Eric Hameleers "gcc34.SlackBuild" script(s) modified to 'gcc42'
http://connie.slackware.com/~alien/s...c34.SlackBuild


May be it isn't possible to build gcc with the standard method (post #2)
on Ubuntu 11.04 ? And I have no intension to try, as 11.04 is a
terrible OS for development.
 
Old 10-29-2011, 03:53 PM   #12
zoya2385
LQ Newbie
 
Registered: Oct 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hello,

It's work when i installed the deb files :

4) gcc-4.2.4 packages for Ubuntu 11.04, 32bits i386 are available :
a) gcc42-compat-4.2.4_i386.deb
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US
b) g++42-compat-4.2.4_i386.deb
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US


Thank you,
 
  


Reply



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
[SOLVED] Installing gcc 3.2 make errors mukund91 Linux - Newbie 4 06-03-2011 12:35 PM
Installing gcc 3.2 make errors mukund91 Linux Mint 1 06-02-2011 06:32 AM
Errors installing gcc on RHEL 4 Isuru Divarathne Linux - Software 3 10-22-2009 01:23 AM
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 02:52 PM

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

All times are GMT -5. The time now is 07:06 PM.

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