Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hmmm. GCC Problem?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cjmace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 111

PostPosted: Fri Oct 31, 2003 9:12 pm    Post subject: Hmmm. GCC Problem? Reply with quote

Ok, was feeling a little adventurous and got myself in a bind.

I emerged gcc-3.3.2-r2 and then ran an emerge -U world, which updated a few packages (which all seem to work) and then it tried to update Openoffice-1.1, which of course failed, because it had been failing with the stable release of gcc.

So then I combed the discussions lists here and tried the -mno-sse2 thing and also read that someone had gotten it to work by emerging ccache. Well, I emerged ccache and started another build , which promptly failed (I am not that stressed about it), but THEN the compiler stopped working. So I promptly 'emerge -C ccache' and backed out of that, and it still wont compile. I get this error.

==================================================================================
bash-2.05b# emerge ccache
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-util/ccache-2.3 to /
>>> md5 src_uri ;-) ccache-2.3.tar.gz
>>> Unpacking source...
>>> Unpacking ccache-2.3.tar.gz to /var/tmp/portage/ccache-2.3/work
>>> Source unpacked.
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
configure: Configuring ccache
checking for i686-pc-linux-gnu-gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! ERROR: dev-util/ccache-2.3 failed.
!!! Function econf, Line 338, Exitcode 77
!!! econf failed

====================================================================================

This is disturbing, since I cannot compile anything with emerge. my gcc -v looks like:

====================================================================================
bash-2.05b# gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: /var/tmp/portage/gcc-3.3.2-r2/work/gcc-3.3.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib --with-x --disable-multilib
Thread model: posix
gcc version 3.3.2 20031022 (Gentoo Linux 3.3.2-r2, propolice)

===================================================================================

Question is... how do I get my compiler working again? Is there a binary I can download to rebuild it? ldconfig doesnt help and neither did a reboot. Any advice would be good.

-cjohn
Back to top
View user's profile Send private message
irf2003
Veteran
Veteran


Joined: 10 Sep 2003
Posts: 1078

PostPosted: Fri Oct 31, 2003 9:34 pm    Post subject: Reply with quote

have you tried
emerge -e gcc
??
Back to top
View user's profile Send private message
IntergalacticWalrus
Guru
Guru


Joined: 07 Jan 2003
Posts: 513
Location: Montreal QC (Canada)

PostPosted: Fri Oct 31, 2003 9:36 pm    Post subject: Reply with quote

The GCC 3.3 series are broken, don't use them (stick with 3.2.3).
Back to top
View user's profile Send private message
cjmace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 111

PostPosted: Fri Oct 31, 2003 9:45 pm    Post subject: Reply with quote

I dont mind going back to ANY version of gcc, but I cannot compile a thing in this state.

Why does it report that gcc 'cannot create executable files'?

-cjohn
Back to top
View user's profile Send private message
dOcBrOwN
n00b
n00b


Joined: 12 Mar 2003
Posts: 64
Location: Erfurt (in Thüringen), Germany

PostPosted: Fri Oct 31, 2003 10:04 pm    Post subject: Reply with quote

You don't want to use any version of gcc any longer? A

cd /usr/portage/sys-devel/gcc
emerge gcc-3.2.3-r2.ebuild

doesn't work? I'm not sure if i understand your problem.
_________________
dOc
Back to top
View user's profile Send private message
cjmace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 111

PostPosted: Fri Oct 31, 2003 10:07 pm    Post subject: Reply with quote

LOL...

Read the original...

When I try to emerge ANYTHING, the emerge bails out with:

gcc cannot create executable.

That makes it a little hard to build anything at all. I dont care what version of gcc I can get working so long as I can get ANY version working at all.

Oddly enough. gcc works fine outside of the emerge realm. So maybe I just go build a version of gcc by hand in some off directory and use that to rebuild gcc into my system. At any rate, this sucks! Otherwise very happy with gentoo.

-cjohn
Back to top
View user's profile Send private message
cjmace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 111

PostPosted: Fri Oct 31, 2003 10:13 pm    Post subject: Reply with quote

Ok, was able to rebuild with alternate version built by hand. Problem solved, but I have absolutely ZERO idea how the original copy got corrupted... Thank goodness my home machine is very high performance! LOL.. 8 mins to rebuild entire gcc package.

-cjohn
Back to top
View user's profile Send private message
dOcBrOwN
n00b
n00b


Joined: 12 Mar 2003
Posts: 64
Location: Erfurt (in Thüringen), Germany

PostPosted: Fri Oct 31, 2003 10:14 pm    Post subject: Reply with quote

What's the output of "echo $CC"? GCC is working outside emerge? That's strange.
_________________
dOc
Back to top
View user's profile Send private message
cjmace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 111

PostPosted: Fri Oct 31, 2003 10:43 pm    Post subject: Reply with quote

The output is simply...

gcc

Yes, it was very weird. I am going to notch it up as a one-off, since I can find no other reference to a similar type of problem.

-cjohn
Back to top
View user's profile Send private message
lemosley01
n00b
n00b


Joined: 01 Nov 2003
Posts: 4

PostPosted: Sat Nov 01, 2003 6:32 pm    Post subject: Invalid CFLAGS appear to be one possible cause Reply with quote

I was getting this same error concerning the C Compiler unable to create executables. After reading carefully over my CFLAGS I realized I had specified -mmx instead of -mmmx (notice the extra m).

Invalid flags appear to be one reason you'll get this error message
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Sat Nov 01, 2003 6:39 pm    Post subject: Reply with quote

You could extracted a stage1 tarball to / , then done a cd /usr/portage && scripts/bootstrap.sh && emerge -e system. This gets you out of any compiler-related troubles without fail, although you should make sure that you back up config files and similar before you extract that tarball...
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
OneOfOne
Guru
Guru


Joined: 28 May 2003
Posts: 368

PostPosted: Sat Nov 01, 2003 7:26 pm    Post subject: Reply with quote

i'd bet money its a cflags problem.
and gcc-3.3.x is NOT broken, i use gcc-3.3.2 and no problems at all.

peace
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Sat Nov 01, 2003 7:31 pm    Post subject: Reply with quote

im running gcc-3.3.2-r2 no problems

extract a stage1 tarball to / and rebootstrap. I always keep a binary version of key packages (gcc,glibc,binutils,coreutils) around just in case i manage to b0rk something
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Mon Jan 19, 2004 5:43 pm    Post subject: Reply with quote

I know it's an old subject but I was getting the same error message.

It turned out to be a CFLAGS/CXXFLAGS error (I had the same problem in both).
Back to top
View user's profile Send private message
ares
Apprentice
Apprentice


Joined: 13 Oct 2003
Posts: 280
Location: Savigliano (CN)

PostPosted: Tue Jan 20, 2004 1:55 am    Post subject: Reply with quote

Reemerge binutils with gcc 3.3.2-rc5
_________________
My portage and homepage
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Tue Jan 20, 2004 3:59 am    Post subject: Reply with quote

It's also a gcc-config problem sometimes - if so it can be fixed by doing

Code:
gcc-config 1

_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
punkrokk
n00b
n00b


Joined: 19 Jan 2004
Posts: 3
Location: Rochester, NY

PostPosted: Tue Jan 27, 2004 6:55 am    Post subject: This saved my ass Reply with quote

I was missing a "-" in my cflags

Thanks for being here!!!!
_________________
JP Bourget
Information Technology
Rochester Institute of Technology
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3383
Location: Gainesville, Florida

PostPosted: Tue Jan 27, 2004 7:36 am    Post subject: Reply with quote

TheCoop,
That's a great tip!

"I always keep a binary version of key packages (gcc,glibc,binutils,coreutils) around just in case i manage to b0rk something"

Running two ~xf86 boxes, and coming from a windows background, I should have thought of that long ago!

Thanks,
wrc1944[/quote]
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.33-r2, gcc-11.2, kernel-5.14.11 USE=experimental
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Wed Jan 28, 2004 5:10 am    Post subject: Reply with quote

EDIT: I've been in the computer field for years and I can't believe I forgot this simple rule..."when in doubt, reboot"

((btw: am typing this from lynx as I can't emerge mozilla :P))

All is well now. :P (I'm so embarassed)
_________________
while(true) {self.input(sugar);} :twisted:
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Fri Jan 30, 2004 1:11 am    Post subject: ok second thought Reply with quote

ok...this time I rebooted several times and consistently get the error...*sigh* I miss having everything just work on my old laptop...got a new computer and now everything's fsck'd...help? I get the cannot create executables error defined above running everything stable (e.g. non ~x86)
_________________
while(true) {self.input(sugar);} :twisted:
Back to top
View user's profile Send private message
friction
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2002
Posts: 109

PostPosted: Sat Jan 31, 2004 1:30 pm    Post subject: Reply with quote

Don't be embarressed, I just had the same problem after updating glibc. Looking on the forums turned up your thread, and one reboot later its all fixed :)
Back to top
View user's profile Send private message
fimblo
Guru
Guru


Joined: 19 Feb 2003
Posts: 306
Location: European Union, Stockholm

PostPosted: Sat Jan 31, 2004 10:02 pm    Post subject: Reply with quote

I had the same problem, but discovered that one of my CFLAGS were misspellt after I saw punkrokk's solution...

:) yay
_________________
http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto
Back to top
View user's profile Send private message
JuhazOne
n00b
n00b


Joined: 21 Mar 2003
Posts: 33
Location: Finland, Vantaa

PostPosted: Sun Feb 01, 2004 4:13 pm    Post subject: Reply with quote

I have the same problem. I can't emerge anything.

When I try to emerge an older version of gcc, I get this:

Quote:
*** The command 'gcc -o conftest -march=pentium -pipe -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

!!! ERROR: sys-devel/gcc-3.2.3-r3 failed.
!!! Function src_compile, Line 381, Exitcode 1
!!! (no error message)


I've tried to reboot, but it didn't help. I can't emerge ccache. My CFLAGS seem to be okay, I tried to remove every option but I got the same error. My CFLAGS are "-march=pentium -O3 -pipe".

What should I do?
_________________
Hi! :) I'm a signature virus. Copy me into your signature to help me spread!
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Sun Feb 01, 2004 7:43 pm    Post subject: Reply with quote

What do you get if you do:

Code:
FEATURES="-*" CFLAGS="" CXXFLAGS="" MAKEOPTS="-j1" emerge some-package


:?:
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
JuhazOne
n00b
n00b


Joined: 21 Mar 2003
Posts: 33
Location: Finland, Vantaa

PostPosted: Sun Feb 01, 2004 8:17 pm    Post subject: Reply with quote

robmoss2k:

Quote:
checking for i586-pc-linux-gnu-gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables

_________________
Hi! :) I'm a signature virus. Copy me into your signature to help me spread!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum