LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-24-2012, 12:56 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
configure: error: C compiler cannot create executables


Hi,

I was trying to install the latest version PHP-5.4.5 from scratch onto my Ubuntu Server 12.04 32bit.

After running configuration as follows
./configure CFLAGS=-liconv --prefix=/usr/local/php --with-iconv ...

I received an error with the following message
configure: error: in '/usr/src/php-5.4.5':
configure: error: C compiler cannot create executables

I then checked in config.log and found this line
/usr/bin/ld.bfd.real: cannot find -liconv
collect2: ld returned 1 exit status

I wonder if anyone might be able to help me out. Already tried to install libiconv-hook-dev but this did not help.

Any help would be greatly appreciated.

Thank you
 
Old 07-24-2012, 02:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I think you'll need to install the libc6-dev package http://packages.ubuntu.com/precise/libc6-dev
 
Old 07-25-2012, 12:02 AM   #3
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.

No, it seems to have been installed already.

libc6-dev is already the newest version
libc6-dev set to manually installed

Could it be something to do with the CC compiler?

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure:3850: $? = 0
configure:3839: cc -V >&5
cc: error: unrecognized option '-V'
cc: fatal error: no input files
compilation terminated.
configure:3850: $? = 4
configure:3839: cc -qversion >&5
cc: error: unrecognized option '-qversion'
cc: fatal error: no input files
compilation terminated.
configure:3850: $? = 4
configure:3870: checking whether the C compiler works
configure:3892: cc -liconv conftest.c >&5
/usr/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
configure:3896: $? = 1
configure:3934: result: no

Tried to google that up but so far no luck.

Thank you
 
Old 07-25-2012, 01:15 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
I think cc is not gcc in your case, try type cc or which cc. Maybe you need to set PATH or set a variable for configure
 
  


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
configure: error: C++ compiler cannot create executables dicou Linux - Newbie 19 06-22-2017 04:17 PM
configure: error: C compiler cannot create executables 2handband Slackware 10 06-12-2010 09:36 AM
configure: error: C compiler cannot create executables RLH1919 Slackware 6 11-13-2009 07:05 PM
configure: error: C compiler cannot create executables metalforever Linux - Software 1 06-21-2008 12:57 AM
configure: error: C compiler cannot create executables brittanythepirate Linux - Software 10 11-07-2007 09:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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