Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

"C compiler cannot create executables" !??!

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
282 posts
  • Page 4 of 12
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 12
  • Next
Author
Message
zerwalter
n00b
n00b
Posts: 4
Joined: Sun Aug 15, 2004 5:46 am
Location: Davis, CA

  • Quote

Post by zerwalter » Tue Apr 26, 2005 2:43 am

I just found the solution to my above problem. I had qt in my USE flags, which is reliant on X11 (which I don't have installed -- console ftw.) I just changed it to -qt, and it compiled. Good luck with php :)
Top
tagger
n00b
n00b
Posts: 37
Joined: Thu Mar 31, 2005 7:31 am

  • Quote

Post by tagger » Wed Apr 27, 2005 4:12 am

Another one to add to the queue:

I followed the make.conf.example advice and, for my new dual G5 (ppc64, stage-2 install), set CFLAGS:

Code: Select all

 CFLAGS="-O2 -pipe -mcpu=970 -mtarget=970 -maltivec -mabi=altivec" 
The error popped up on me trying to do the initial

Code: Select all

 emerge --emptytree system 
Well, it turns out that the problem goes away if I remove -mcpu and every argument thereafter from CFLAGS. Too bad, it might have been nice to use those. I tried -mtune rather than -mcpu, to no avail. -mtarget=970 alone doesn't even work.

FWIW.
Top
binary_runner
n00b
n00b
Posts: 64
Joined: Sun Oct 26, 2003 10:53 am

  • Quote

Post by binary_runner » Wed Apr 27, 2005 9:08 pm

toddles13 wrote:

Code: Select all

binutils-config --amd64
then

Code: Select all

source /etc/profile
works for me too, thank you
Top
Gavinator
n00b
n00b
Posts: 1
Joined: Fri Apr 29, 2005 11:47 pm

  • Quote

Post by Gavinator » Fri Apr 29, 2005 11:49 pm

I tried most of the methods and for some reason after i rebooted and logged in as root instead of using SU
it worked.
Top
Ibn al-Hazardous
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 133
Joined: Thu Sep 02, 2004 9:24 am
Location: Somewhere deep in the desert.
Contact:
Contact Ibn al-Hazardous
Website

  • Quote

Post by Ibn al-Hazardous » Sat Jun 04, 2005 9:54 pm

I had this same error msg, but apparently another error. Since this was the thread I came across when searching, I thought I'd post the fix I found (by coinsidence) on bugzilla (http://bugs.gentoo.org/show_bug.cgi?id=86123):

Code: Select all

rm -f /usr/lib32
ln -s ../../emul/linux/x86/usr/lib /usr/lib32
FEATURES=-sandbox emerge gcc
I was halfway through a reinstall on another partition when I found this solution, so I hope this'll help someone else. :)
/Ibn
Top
pounard
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 143
Joined: Thu Oct 17, 2002 4:06 pm

  • Quote

Post by pounard » Mon Jun 13, 2005 10:23 am

I had the error too; in fact it was binutils links in /usr/i686-pc-linux-gnu/bin that were pointing to /usr/i686-pc-linux-gnu/binutils-bin/2.16 ; or in facts real binaries were in /usr/i686-pc-linux-gnu/binutils-bin/2.16.1

So just do:

Code: Select all

rm -rf /usr/i686-pc-linux-gnu/bin/*
for file in /usr/i686-pc-linux-gnu/binutils-bin/2.16.1/*; do ln -s $file /usr/i686-pc-linux-gnu/bin/; done
(of course dont forget to change this to match you binutils version)

after trying to fix /etc/env.d/05gcc and gcc-config of course

hope it can help some people (when typing this binutils-2.16.1 was just released in ~x86 profile)
<!-- ceci est une signature libre -->
Ceci n'est pas un virus, rassurez vous, aucune MST ne passe par les groupes pornos sur usenet;
Top
RaZoR1394
Guru
Guru
User avatar
Posts: 356
Joined: Sun Jan 09, 2005 11:19 pm

  • Quote

Post by RaZoR1394 » Mon Jun 13, 2005 10:53 am

pounard Yes, after updating binutils 2.16.1 I got the same problem. Thanks for the solution ;).
Top
pounard
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 143
Joined: Thu Oct 17, 2002 4:06 pm

  • Quote

Post by pounard » Mon Jun 13, 2005 1:40 pm

i did this but i think binutils-config can do this on is own too..
i didnt tested, if anyone does; dont hesitate to answer :}
<!-- ceci est une signature libre -->
Ceci n'est pas un virus, rassurez vous, aucune MST ne passe par les groupes pornos sur usenet;
Top
exohuman
n00b
n00b
Posts: 6
Joined: Wed Mar 16, 2005 3:04 am
Contact:
Contact exohuman
Website

Thanks for the solution!!!

  • Quote

Post by exohuman » Mon Jun 13, 2005 1:50 pm

Ran into this problem too! Thanks for the solution!
Top
centic
n00b
n00b
Posts: 33
Joined: Wed Nov 19, 2003 8:33 pm

  • Quote

Post by centic » Mon Jun 13, 2005 1:52 pm

For fixing this cleanly, you should do

Code: Select all

binutils-config i686-pc-linux-gnu-2.16.1
source /etc/profile
look at http://forums.gentoo.org/viewtopic-t-34 ... art-0.html

Dominik.
Top
pounard
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 143
Joined: Thu Oct 17, 2002 4:06 pm

  • Quote

Post by pounard » Mon Jun 13, 2005 2:02 pm

That is I was thinking of; thanks for confirmation :D
<!-- ceci est une signature libre -->
Ceci n'est pas un virus, rassurez vous, aucune MST ne passe par les groupes pornos sur usenet;
Top
a2gentoo
n00b
n00b
Posts: 66
Joined: Wed Nov 17, 2004 2:26 am
Location: Derry, NH
Contact:
Contact a2gentoo
Website

Centic You Genious

  • Quote

Post by a2gentoo » Mon Jun 13, 2005 2:38 pm

I had to read 4 pages of stuff that didnt work until you came around

That was clean, easy and best of all.... IT WORKED!!

Thx.
BSD for my servers
Linux for my Laptop
Windows for my Spyware
-------------
Top
Dr_Smack
n00b
n00b
Posts: 18
Joined: Thu Jul 15, 2004 12:41 am

  • Quote

Post by Dr_Smack » Mon Jun 13, 2005 3:14 pm

I can verify that after installing binutils-2.16.1, my binutils profile was not updated to point to 2.16.1. It remained pointing to 2.16. Simply using binutils-config to change it and running source /etc/profile fixed everything as mentioned above.
Top
mrhenrik
n00b
n00b
Posts: 2
Joined: Mon Jun 13, 2005 3:39 pm

  • Quote

Post by mrhenrik » Mon Jun 13, 2005 3:43 pm

Finally!
I became a member of this Forum about 3 minutes ago just to say THANK YOU!
after browsing around all day i finally found the binutils error.
I had been trying to downgrade binutils - but "C compiler cannot create ..." wouldn't let me
and i could upgrade/downgrade gcc - because "as" couldn't be found...
Anyway thanks!
Top
lixer
n00b
n00b
Posts: 6
Joined: Thu Sep 02, 2004 3:20 am

  • Quote

Post by lixer » Mon Jun 13, 2005 4:07 pm

Dr_Smack wrote:I can verify that after installing binutils-2.16.1, my binutils profile was not updated to point to 2.16.1. It remained pointing to 2.16. Simply using binutils-config to change it and running source /etc/profile fixed everything as mentioned above.
I failed to notice after the binutil upgrage that it failed to switch profiles. your tip seems to fix issues :)
Top
yamakawa
Guru
Guru
User avatar
Posts: 340
Joined: Mon Jul 28, 2003 3:58 pm

  • Quote

Post by yamakawa » Mon Jun 13, 2005 5:01 pm

i did
/usr/bin/binutils-config -d i686-pc-linux-gnu-2.16.1
according to a solution in a bug report in bugzilla.
anyway, thank you all!! :D
Top
Lamp5
n00b
n00b
Posts: 6
Joined: Fri Jun 17, 2005 2:49 pm

Whew

  • Quote

Post by Lamp5 » Fri Jun 17, 2005 3:00 pm

I'm the new guy. Thought I'd say hi and throw in .02 about this:

Do we agree that gcc upgrading is the trickiest quirk in the whole gentoo universe? I count about 4 threads devoted to it, some long ... mine was fixed by the short one :)
http://forums.gentoo.org/viewtopic-t-294109.html

Does someone think that these things
http://forums.gentoo.org/viewtopic-t-27 ... utils.html
http://forums.gentoo.org/viewtopic-t-278673.html

might be incorporated into a single sticky topic: try this first, then this,
Top
thirsk
n00b
n00b
Posts: 2
Joined: Sat Feb 12, 2005 12:14 am

  • Quote

Post by thirsk » Thu Jun 23, 2005 12:45 am

I had things broken another way so that my C compiler wouldn't make executables.

I ran binutils-config (which I think is new on my system) and it wasn't set to anything. /usr/bin/ld didn't exist. So I did "binutils-config 1" and then everything was just fine and /usr/bin/ld existed again.

My etc-update wants to update 100 or so files so maybe it's my fault. Now, if emerging binutils-config had some super important warning notice after it completed merging (and many packages do), I can't take responsibility for that. Portage should compile these and keep them in a log or something.
Top
Darknight
Guru
Guru
User avatar
Posts: 485
Joined: Mon Jan 26, 2004 8:41 am
Location: Italy

  • Quote

Post by Darknight » Mon Jul 11, 2005 9:00 am

It happened to me today. I had changed "mcpu=pentium4" to "mtune=pentium4" in make.conf. When I changed back it worked ok... dohhhh
Top
Gentree
Watchman
Watchman
User avatar
Posts: 5350
Joined: Tue Jul 01, 2003 12:51 am
Location: France, Old Europe

Re: Whew

  • Quote

Post by Gentree » Mon Jul 11, 2005 7:06 pm

Lamp5 wrote: Do we agree that gcc upgrading is the trickiest quirk in the whole gentoo universe? ,
No, I have changed gcc several times and never had any real trouble. However, I have never been able to gat an ATI gx card to work - and I've spent days trying.

BTW the gentoo ATI thread is in the guiness book of records.
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Top
antipod
Apprentice
Apprentice
User avatar
Posts: 168
Joined: Thu Mar 20, 2003 3:23 am
Location: Karlshamn, Sweden

  • Quote

Post by antipod » Fri Jul 15, 2005 10:00 pm

toddles13 wrote:Don't know if this is your problem but it fixed mine by doing the following (this was after the upgrade to 2005.0)

Once you have gone through all the other suggestions in previous post then try this:

Code: Select all

binutils-config --amd64
then

Code: Select all

source /etc/profile
Worked for me too... amost, I did a

Code: Select all

binutils-config 1
as it didn't work with --x86 for me. Now at least stuff is compiling. Goodie! :)

EDIT: Spelling...
Top
seifn06
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 90
Joined: Sun Sep 19, 2004 5:39 am
Location: Lowell, Michigan

  • Quote

Post by seifn06 » Thu Jul 21, 2005 7:28 pm

Anyone here encountered the "C++ compiler cannot create executables" error while doing a fresh install of Hardened Gentoo (i.e. SELinux) lately? If so, how did you get solve the problem?

I'm in such a situation. I get the "C++ compiler cannot create executables" when I try to bootstrap the system (i.e. run scripts/bootstrap.sh). I've checked and rechecked my make.conf file, tried different options and even tried commenting out the CFLAGs and other variables in make.conf altogether but the bootstrap keeps failing while trying to compile Python early on in the script. I've used gcc-config as directed in the threads above to verify that the compiler is correctly chosen/referenced too. I would have used the binutils suggestion but I can't compile/emerge it since ncurses is among its dependencies. ncurses in turn complains and errors out during emerge/compilation because it can't find a C++ compiler and cannot create executables...

I posted http://forums.gentoo.org/viewtopic-t-361737.html yesterday about the problem but haven't gotten a reply yet...
Top
WetSpot
n00b
n00b
User avatar
Posts: 29
Joined: Thu May 05, 2005 5:27 am
Location: Middle Tennessee, USA

  • Quote

Post by WetSpot » Wed Sep 07, 2005 4:28 pm

Or, as was my case, I simply borked my /etc/make.conf by not using the -w option with nano while editng the USE flags.

Thus $CHOST was unavailable when required
"Consensus is the Negation of Leadership"
--M. Thatcher
Top
Gustav
n00b
n00b
Posts: 1
Joined: Fri Oct 28, 2005 7:13 pm

  • Quote

Post by Gustav » Fri Oct 28, 2005 7:52 pm

Hello!

I've the problem that "configure: error: installation or configuration problem: C++ compiler cannot create executables.".
When try using gcc-confiig says that command not found. I'm a beginer on this so can I fix it step by step?
I've the Ubuntu dstribution

This is what I get:

Code: Select all

root@ubuntu:/usr/mp3blaster-3.2.0# ./configure
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal-1.4... missing
checking for working autoconf... found
checking for working automake-1.4... missing
checking for working autoheader... found
checking for working makeinfo... missing
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... no
checking for g++... no
checking for gcc... gcc
checking whether the C++ compiler (gcc  ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.
Thanks
Gustav :-)
Top
dkaste
n00b
n00b
Posts: 1
Joined: Thu Nov 03, 2005 2:30 am

Problem with emergeing gtk+ on 64 bit kernel in gentoo

  • Quote

Post by dkaste » Thu Nov 03, 2005 4:39 am

when i try and emerge gaim it bombs out when emergeing gtk+.
gives me c complier cannot create executables. I've tried the things listed in this topic and nothing seems to work for me.
I have a Amd64 Athlon xp 3500 with gentoo and a 64 bit kernel.
Top
Post Reply

282 posts
  • Page 4 of 12
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 12
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy