Forums

Skip to content

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

gcc-config: error: could not run/locate 'gcc'

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
Sujao
l33t
l33t
User avatar
Posts: 677
Joined: Sat Sep 25, 2004 11:24 am
Location: Germany

gcc-config: error: could not run/locate 'gcc'

  • Quote

Post by Sujao » Sun Apr 25, 2010 11:07 am

I spent the last several hours trying to figure this out but with no luck. My problem is a little complicated since I moved my system to another partition recently and apparently didn't had a working before the move. My / partition was full so presumably the last emerge -vauDN world failed.

So I am not sure if it's entirely a emerge problem or I forgot to move something correctly. (But I am 95% sure its NOT a move problem).

I realized there is a problem when I tried to recompile my kernel to include ext4 support.

Code: Select all

linux # make menuconfig
  HOSTCC  scripts/kconfig/conf.o
gcc-config: error: could not run/locate 'gcc'
make[1]: *** [scripts/kconfig/conf.o] Error 1
make: *** [menuconfig] Error 2

Code: Select all

# gcc-config -l
 [1] x86_64-pc-linux-gnu-4.3.4 *

Code: Select all

# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/kde, gcc-4.3.4, glibc-2.10.1-r1, 2.6.33-zen1 x86_64)
=================================================================
System uname: Linux-2.6.33-zen1-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-1.12.13
Timestamp of tree: Wed, 21 Apr 2010 12:15:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r2, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=nocona -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="<removed for privacy reasons>"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-v -v"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acpi ada addbookmarks alsa amd64 amrnb amrwb bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdio cdparanoia cdr cli consolekit cracklib crypt css cups custom-optimization cxx dbus device-mapper divx dmraid doc dri dts dv dvd dvdr emboss enca encode exif fam fat fbcon ffmpeg firefox flac fortran gdbm gif gimp gnutls gpm gtk hal hddtemp iconv icq id3tag ieee1394 imap jabber java javascript jpeg kate kcal kde kipi lcms ldap libass libcaca libnotify libv4l2 lirc live lm_sensors lzo mad matroska mikmod mmx mmxext mng modules mozilla mp2 mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly nsplugin ntfs nvidia offensive ogg openal opengl openmp pam pango pcre pdf perl plasma png ppds pppd python qt3support qt4 readline reflection rtc sasl schroedinger sdl semantic-desktop session slang sound speex spell spl srt sse sse2 ssl ssse3 startup-notification svg sysfs taglib tcpd tetex theora threads tiff truetype type1 unicode usb v4l v4l2 vcd vdpau videos vim vim-syntax vim-with-x vorbis wifi wxwindows x264 xcb xfs xml xorg xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" LIRC_DEVICES="hauppauge" RUBY_TARGETS="ruby18" SANE_BACKENDS="snapscan" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

Code: Select all

# uname -ipmvr
2.6.33-zen1 #1 ZEN SMP Fri Mar 19 18:43:57 CET 2010 x86_64 Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz GenuineIntel
I found several threads stating that this problem could be due to a broken gcc profile but gcc-config and emerge --info returns no errors.

What seems strange to me that updating gcc requires x11-libs. I think this is where the update process must have stopped when my root partition became full.

Code: Select all

# emerge -vauDN gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] x11-libs/libX11-1.3.3 [1.2.2] USE="doc%* xcb -debug -ipv6 -test%" 0 kB
[ebuild     U ] x11-libs/libXext-1.1.1 [1.0.5] USE="-debug" 0 kB
[ebuild     U ] x11-libs/libXt-1.0.8 [1.0.7-r1] USE="-static-libs% (-debug%)" 0 kB
[ebuild     U ] x11-libs/libXi-1.3 [1.2.1] USE="-debug" 0 kB
[ebuild     U ] x11-libs/libXtst-1.1.0 [1.0.3] USE="-debug" 0 kB

Total: 5 packages (5 upgrades), Size of downloads: 0 kB
Top
jfp
Guru
Guru
Posts: 326
Joined: Sun Jul 08, 2007 9:10 pm
Location: Virginia, USA

  • Quote

Post by jfp » Sun Apr 25, 2010 2:21 pm

As a wild guess.

Code: Select all

zippy ~ # gcc-config -h
Usage: gcc-config [options] [CC Profile]
Change the current cc/gcc profile, or give info about profiles.

Options:
  -C, --nocolor              Disable color output
  -O, --use-old              Use the old profile if one was selected.
  -f, --force                Make sure all config files are regenerated.
  -P, --use-portage-chost    Only set to given profile if its CHOST is the 
                             same as that set for portage in /etc/make.conf
                             (or one of other portage config files...).
  -c, --get-current-profile  Print current used gcc profile.
  -l, --list-profiles        Print a list of available profiles.
  -S, --split-profile        Split profiles into their components
  -E, --print-environ        Print environment that can be used to setup the
                             current gcc profile, or a specified one.
  -B, --get-bin-path         Print path where binaries of the given/current
                             profile are located.
  -L, --get-lib-path         Print path where libraries of the given/current
                             profile are located.
  -X, --get-stdcxx-incdir    Print path where g++ include files of the
                             given/current profile are located.

Profile names are of the form:  <CHOST>-<gcc version>
For example:                    i686-pc-linux-gnu-3.2.1
maybe you could try the --force option. For example: gcc-config --force 1
jfp
Top
Sujao
l33t
l33t
User avatar
Posts: 677
Joined: Sat Sep 25, 2004 11:24 am
Location: Germany

  • Quote

Post by Sujao » Sun May 02, 2010 7:03 pm

I spent another several hours on this problem, still with no luck. The -f option did not work either.

Can someone explain to me why gcc-config is being run at all when I launch gcc executables? Is this gentoo specific to force the use of gcc-config as a wrapper? I also don'unterstand why gcc-config does not find the files if they are clearly there.

What I was able to find out is that there was definately no gcc update in the last several months so this is not the problem. The last package that was installed was x11-libs/libxcb-1.5, then media-gfx/exiv2-0.19 failed probably due to no space on root partition.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun May 02, 2010 7:51 pm

What is the output of equery list gcc ; equery check gcc; strace /usr/bin/gcc?
Top
Sujao
l33t
l33t
User avatar
Posts: 677
Joined: Sat Sep 25, 2004 11:24 am
Location: Germany

  • Quote

Post by Sujao » Mon May 03, 2010 11:10 am

OK, I got it. For unknown reasons the files /usr/x86_64-pc-linux-gnu/gcc-bin/4.3.4/x86_64-pc-linux-gnu-* had size 0. I didn't really pay attention to the size since I can't think of any reason they became empty.

I still don't understand the connection between /usr/bin/gcc and the files mentioned above. Is the former the gcc-config wrapper that runs the latter?

@Hu: Thank you for your post. If I had know equery check package before I would not have spent so much time searching for the problem.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue May 04, 2010 2:50 am

Sujao wrote:I still don't understand the connection between /usr/bin/gcc and the files mentioned above. Is the former the gcc-config wrapper that runs the latter?
Yes, which is what strace would show you. ;) I requested it because I anticipated that its output would lead us to a damaged file, even if the equery check came back clean.
Top
Sujao
l33t
l33t
User avatar
Posts: 677
Joined: Sat Sep 25, 2004 11:24 am
Location: Germany

  • Quote

Post by Sujao » Tue May 04, 2010 9:08 am

OK, I couldn't give you the output because strace was not installed and I coudn't install anything. I forgot to mention this.
Top
Post Reply

7 posts • Page 1 of 1

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

 

 

magic