LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-14-2012, 04:29 PM   #1
sriram87
LQ Newbie
 
Registered: Jan 2008
Posts: 11

Rep: Reputation: 1
GCC 4.6.3+ on RedHat Enterprise 6 fails to build


Dear members, I found an issue compiling gcc 4.6.3/ 4.7.1 on RHEL6 distro. The diagnostic message that we usually obtain when there is an error is seen as follows:

Code:
 ... 
checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc... /usr/src/gcc-4.7.1/build/./gcc/xgcc -B/usr/src/gcc-4.7.1/build/./gcc/ -B/opt/gcc/gcc-4.7.1/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc/gcc-4.7.1/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gcc/gcc-4.7.1/x86_64-unknown-linux-gnu/include -isystem /opt/gcc/gcc-4.7.1/x86_64-unknown-linux-gnu/sys-include   
checking for suffix of object files... configure: error: in `/usr/src/gcc-4.7.1/build/x86_64-unknown-linux-gnu/libgcc':
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 `/usr/src/gcc-4.7.1/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/src/gcc-4.7.1/build'
make: *** [all] Error 2
But, the config.log does'nt have any error log. I am attaching the config.log file for your reference.

This is the command-line entry I used for configuring the source
Code:
(reverse-i-search)`configure': ../configure --prefix=/opt/gcc/gcc-4.7.1/ --enable-cloog-backend=isl
I installed all the relevant add-ons that were required: such as gmp-4.3.2, mpfr-2.4.2, mpc-0.8.1, ppl-0.11, and cloog-0.16.1

My question is, has anybody tested this out before and/ or gcc 4.6.3 or 4.7.1 compile on RHEL?
Attached Files
File Type: log config.log (26.2 KB, 9 views)
 
Old 09-17-2012, 12:10 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Gcc-4.6.3 example, CentOS 6.3 ( = RHEL 6.x ).
GCC requires a build directory outside the source directory gcc-4.6.3/.
I'd suggest : Unpack gmp-* mpfr-* mpc-* into gcc-4.6.3/, and rename to gmp, mpfr, mpc.
Then you will have no conflicts with the system versions, if different.
Ref. http://www.linuxfromscratch.org/lfs/view/7.0/

# yum install gmp-devel mpfr-devel ( Probably sufficient for gcc-4.6.3 ).

Configuring :
$ ../gcc-4.6.3/configure --prefix=/usr/local/gcc463 --program-suffix=46 --enable-languages=c,c++ --enable-threads=posix --enable-shared --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --with-system-zlib --with-mpfr-include=$(pwd)/../gcc-4.6.3/mpfr/src --with-mpfr-lib=$(pwd)/mpfr/src/.libs

$ make : I think the system version mpfr-2.4.1 was picked up as OK.
$ make : No errors. # make install : OK too.

.

Last edited by knudfl; 09-17-2012 at 12:14 PM.
 
Old 10-03-2012, 11:17 AM   #3
sriram87
LQ Newbie
 
Registered: Jan 2008
Posts: 11

Original Poster
Rep: Reputation: 1
I followed all the instructions (even though I had a similar environment set up before, in which I had the build directory as a sub-directory to the gcc source -- hence the configure command) .

I am unable to build the source because, i get the following configure error:

configure: error: source directory already configured; run "make distclean" there first

However, if I do a make distclean, the Makefile will be deleted, and I have to start again by running configure. There is no resolution so far
 
Old 10-03-2012, 11:28 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Not much to do but to start from scratch with a new unpacked gcc-4.6.3.tar.bz


Once configured, the source cannot be reused.
 
Old 12-01-2012, 04:42 AM   #5
Azrael84
Member
 
Registered: Nov 2012
Posts: 55

Rep: Reputation: Disabled
sorry , please delete my post

Last edited by Azrael84; 12-01-2012 at 04:44 AM.
 
  


Reply

Tags
gcc463


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Final Phase GCC build fails for ARM cross compiler toolchain bencpeters Linux - Embedded & Single-board computer 1 11-13-2011 06:23 PM
Build fails for gcc 4.4.2 om_ji Linux - Software 1 11-11-2011 03:15 PM
gcc-c++ and the dependency, redhat enterprise 4 bghayad Linux - Enterprise 1 04-26-2009 11:20 PM
How I can Build RedHat Enterprise From Scratch (by source CDs)? alMubarmij Red Hat 6 04-17-2006 02:48 AM
redhat enterprise WS xine build error nkjsat2 Red Hat 3 07-22-2004 09:10 PM


All times are GMT -5. The time now is 02:28 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration