LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-18-2017, 05:58 AM   #1
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Rep: Reputation: Disabled
Gcc 5.3.0


I want to install GCC 5.3.0 in my workstation(centOS 6.9)

When i try installing I am getting the following error

configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/root/gcc-5.3.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/gcc-5.3.0'
make: *** [all] Error 2



I have installed latest versions of mpc mpfr and GMP.

Can you help me solve this problem?
 
Old 04-18-2017, 06:15 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
GCC requires a build folder outside gcc-5.3.0/ .

If you configured inside gcc-5.3.0/, please delete gcc-5.3.0/, and start from scratch.

Unpack mpfr-3.1.3.tar.xz, gmp-6.1.0.tar.xz, mpc-1.0.3.tar.gz into gcc-5.3.0/.
Rename to have gcc-5.3.0/{ mpfr/, gmp/, mpc/ }.


Code:
mkdir build-gcc
cd build-gcc/
../gcc-5.3.0/configure --prefix=/usr/local/gcc53 --program-suffix=53 --enable-languages=c,c++ --with-system-zlib --disable-multilib

Last edited by knudfl; 04-18-2017 at 06:18 AM.
 
Old 04-18-2017, 06:27 AM   #3
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
[QUOTE=knudfl;5698481]GCC requires a build folder outside gcc-5.3.0/ [QUOTE]



>yup now gmp, mpfr, mpc are in path /opt/src
>gcc5.3.0 is placed in the same path and follwing commands are executed

mkdir /opt/gcc-5.3.00(renamed as there is already a folder named gcc-5.3.0)
mkdir objdir
cd objdir
../gcc-5.3.0/configure --prefix=/opt/gcc-5.3.0 --enable-languages=c,c++ --with-gmp=/opt/gmp-6.1.0 --with-mpfr=/opt/mpfr-3.1.4 --with-mpc=/opt/mpc-1.0.3 --disable-multilib


Now I get the following error

configure: error: building out of tree but ../gcc-5.3.0 contains host-x86_64-unknown-linux-gnu.
Use a pristine source tree when building in a separate tree
 
Old 04-18-2017, 06:41 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #2.

More information : gcc-5.3.x can be built with => gcc-4.7. I used gcc-4.9.3.

Same procedure with mpfr, gmp, mpc , etc.
../gcc-4.9.3/configure --prefix=/usr/local/gcc493 --program-suffix=49 --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --with-system-zlib



-

Last edited by knudfl; 04-18-2017 at 07:03 AM.
 
Old 04-18-2017, 06:46 AM   #5
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
I am using gcc 4.7 and still getting too many errors.

I have make a note on the error in my previous mail. Do you find it.? What about a solution for it?
 
Old 04-18-2017, 06:53 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #3.

Why not follow the tested procedure, with { mpfr/, gmp/, mpc/ } inside gcc-5.3.0/ ?
I.e. gcc-5.3.0/{ mpfr/, gmp/, mpc/ }


Quote:
but ../gcc-5.3.0 contains host-x86_64-unknown-linux-gnu
Looks like a wrecked gcc-5.3.0/ . Suggest : Delete gcc-5.3.0/ and ...
tar xvf gcc-5.3.0.tar.bz2


-

Last edited by knudfl; 04-18-2017 at 06:59 AM.
 
Old 04-18-2017, 06:57 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #5.

You are not supposed to get any errors at all when doing as post #2.

And : Which gcc-4.7 are you using ? The devtools-?-gcc won't do !



-

Last edited by knudfl; 04-18-2017 at 07:04 AM.
 
Old 04-18-2017, 07:00 AM   #8
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #5.

You are not supposed to get any errors at all when doing as post #2.
https://yhigu.wordpress.com/2016/03/...m-source-code/

I am following these commands. Can you please go through it?
 
Old 04-18-2017, 07:07 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #1.
Quote:
Leaving directory `/root/gcc-5.3.0'
This looks like you are running 'make' inside gcc-5.3.0/ ?
 
Old 04-18-2017, 07:20 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Remember that you can't simply "start over in another directory" having attempted the job in the wrong place. You have already messed it up and must perhaps make distclean.
 
1 members found this post helpful.
Old 04-18-2017, 07:22 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #8 , https://yhigu.wordpress.com/2016/03/...m-source-code/

As complicated as possible is usually wrong. Doesn't look like an experienced gcc builder.
And the links will overwrite the system files. ( /usr/bin/gcc, g++ ). Bad idea.
Don't do. Use a '--program-suffix'.

When compiling a program with gcc-5.3, use the compilers with, examples :
1. export CC=gcc53 CXX=g++53 && ./configure && make
2. (cmake) : CC=gcc53 CXX=g++53 cmake ..


-
 
Old 04-18-2017, 07:28 AM   #12
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #8 , https://yhigu.wordpress.com/2016/03/...m-source-code/

As complicated as possible is usually wrong. Doesn't look like an experienced gcc builder.
-
Can you kindly give me the entire commands to install this package?
 
Old 04-18-2017, 07:31 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #12.
Quote:
the entire commands to install this package
? Which package ?
 
Old 04-18-2017, 07:32 AM   #14
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #12.

? Which package ?
GCC 5.3



or is it good to get your mail id?
 
Old 04-18-2017, 07:38 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #14.

The procedure is post #2.
When the configuring has been done : make && make install
The important thing is also : Use a valid => gcc-4.7, e.g. gcc-4.9.3

And :
cd /usr/bin/
ln -s /usr/local/gcc53/bin/gcc53
ln -s /usr/local/gcc53/bin/g++53



-

Last edited by knudfl; 04-18-2017 at 07:45 AM.
 
  


Reply

Tags
gcc-4.9, gcc-5.3, gromacs



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
LXer: GCC 4.9 vs. GCC 5.1 vs. GCC 6.0 SVN Compiler Benchmarks LXer Syndicated Linux News 0 06-08-2015 01:00 PM
[SOLVED] SEGMENTATION FAULT using gcc 4.4.4 -O2 , works with gcc 4.1.0 -O2 or gcc 4.4.4 -O1 amir1981 Programming 36 07-26-2010 06:07 PM
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
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM

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

All times are GMT -5. The time now is 12:27 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