# New Kernel -> need help with nvidia drivers

## Mati

Hi there,

i'm relatively new to gentoo and i just compiled successfully a new kernel and my system boots fine. Now i would like to 

install (or get somehow accessible) the correct nvidia drivers. However, i don't know what exactly to do. 

I thought i have to use module-rebuild rebuild but it complains with 

```

module-rebuild rebuild

** Preparing to merge modules:

** Packages which I will emerge are:

        =x11-drivers/nvidia-drivers-295.59

5 4 3 2 1 

emerge: there are no ebuilds to satisfy "=x11-drivers/nvidia-drivers-295.59".

```

Maybe i should do something different. Can anybody help me?

EDIT: 

I have an xorg already running (i think because i have wallpaper on and can open shells) so i dont think i need xorg installation - am i right? 

I got stuck at http://wiki.gentoo.org/wiki/NVidia/nvidia-drivers#Testing_your_Card

at point "Drivers"

thanks for any hint!

EDIT2: 

I would like to crosspoast because it might have to do something with the last posts at 

https://forums.gentoo.org/viewtopic-t-956040-highlight-.html

However, I still do not understand where my problem lie...

----------

## bpoint

The reason for that error message is because x11-drivers/nvidia-drivers-295.59 isn't in the Portage tree anymore (it's quite old).

Make sure you've run 'emerge --sync' to update your local repository first, then simply update to the latest version of the nvidia-drivers (313.30) with this:

```
emerge -vt1 x11-drivers/nvidia-drivers
```

----------

## Mati

Thanks for the first. 

I did the emerge --sync and unmasked the nvidia stuff. Now i get:

```

emerge -vt1 x11-drivers/nvidia-drivers

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

Calculating dependencies... done!

[ebuild     U  ] x11-drivers/nvidia-drivers-313.30 [295.59] USE="X%* acpi tools (-multilib) -pax_kernel%" 37,936 kB

Total: 1 package (1 upgrade), Size of downloads: 37,936 kB

!!! Multiple package instances within a single package slot have been pulled

!!! into the dependency graph, resulting in a slot conflict:

x11-drivers/nvidia-drivers:0

  (x11-drivers/nvidia-drivers-313.30::gentoo, ebuild scheduled for merge) pulled in by

    (no parents that aren't satisfied by other packages in this slot)

  (x11-drivers/nvidia-drivers-295.59::gentoo, installed) pulled in by

    =x11-drivers/nvidia-drivers-2* required by (media-video/nvidia-settings-295.20::gentoo, installed)

It may be possible to solve this problem by using package.mask to

prevent one of those packages from being selected. However, it is also

possible that conflicting dependencies exist such that they are

impossible to satisfy simultaneously.  If such a conflict exists in

the dependencies of two different packages, then those packages can

not be installed simultaneously. You may want to try a larger value of

the --backtrack option, such as --backtrack=30, in order to see if

that will solve this conflict automatically.

For more information, see MASKED PACKAGES section in the emerge man

page or refer to the Gentoo Handbook.

!!! The following installed packages are masked:

- x11-base/xorg-server-1.12.4::gentoo (masked by: package.mask)

For more information, see the MASKED PACKAGES section in the emerge

man page or refer to the Gentoo Handbook

```

what does that mean?

----------

## bpoint

nvidia-settings also needs to be updated at the same time.  You can't have mismatched versions installed simultaneously.

This should do the trick:

```
emerge -vt1 x11-drivers/nvidia-drivers media-video/nvidia-settings
```

----------

## Mati

Thanks again and sorry to bother...i'm just thinking of the resulting output now: 

```

emerge -vt1 x11-drivers/nvidia-drivers media-video/nvidia-settings

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

Calculating dependencies... done!

[ebuild   R    ] media-video/nvidia-settings-295.20  USE="-examples" 0 kB

[ebuild     U  ]  x11-drivers/nvidia-drivers-313.30 [295.59] USE="X%* acpi tools (-multilib) -pax_kernel%" 37,936 kB

Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 37,936 kB

!!! Multiple package instances within a single package slot have been pulled

!!! into the dependency graph, resulting in a slot conflict:

x11-drivers/nvidia-drivers:0

  (x11-drivers/nvidia-drivers-313.30::gentoo, ebuild scheduled for merge) pulled in by

    (no parents that aren't satisfied by other packages in this slot)

  (x11-drivers/nvidia-drivers-295.59::gentoo, installed) pulled in by

    =x11-drivers/nvidia-drivers-2* required by (media-video/nvidia-settings-295.20::gentoo, ebuild scheduled for merge)

It may be possible to solve this problem by using package.mask to

prevent one of those packages from being selected. However, it is also

possible that conflicting dependencies exist such that they are

impossible to satisfy simultaneously.  If such a conflict exists in

the dependencies of two different packages, then those packages can

not be installed simultaneously. You may want to try a larger value of

the --backtrack option, such as --backtrack=30, in order to see if

that will solve this conflict automatically.

For more information, see MASKED PACKAGES section in the emerge man

page or refer to the Gentoo Handbook.

!!! The following installed packages are masked:

- x11-base/xorg-server-1.12.4::gentoo (masked by: package.mask)

For more information, see the MASKED PACKAGES section in the emerge

man page or refer to the Gentoo Handbook.
```

puh...

----------

## gerard27

Is my hunch that you haven't upgraded for quite a while?

If so better emerge --sync and then do 

```

emerge -uDNpv world
```

----------

## Mati

 *Quote:*   

> s my hunch that you haven't upgraded for quite a while? 
> 
> If so better emerge --sync and then do

 

thanks. Ok now we proceed: I did an

```

emerge -C nvidia-settings nvidia-drivers 

```

afterwards an emerge --sync and an emerge depclean. Now if i put emerge world i obtain: 

```

emerge -uDNpv world

 * IMPORTANT: 5 config files in '/etc/portage' need updating.

 * See the CONFIGURATION FILES section of the emerge

 * man page to learn how to update config files.

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

Calculating dependencies... done!

[ebuild     U  ] dev-python/python-exec-0.3.1 [0.2] PYTHON_TARGETS="(jython2_5) (jython2_7) (python2_5) (python2_6) (python2_7) (python3_1) (python3_2) (-pypy1_9) (-pypy2_0) (-python3_3)" 73 kB

[ebuild  N     ] dev-libs/re2-0_p20130115  998 kB

[ebuild  N     ] dev-libs/jsoncpp-0.5.0-r1  USE="-doc" 105 kB

[ebuild     U  ] net-misc/rdate-1.4-r4 [1.4-r3] USE="ipv6" 0 kB

[ebuild     U  ] dev-lang/v8-3.16.14.9-r1:0/3.16.14.9 [3.15.11.15:0/3.15.11] 10,217 kB

[ebuild     U  ] app-text/psutils-1.17-r2 [1.17] 40 kB

[ebuild     U  ] www-client/chromium-26.0.1410.43 [25.0.1364.160] USE="-bindist -cups -custom-cflags -gnome -gnome-keyring -gps% -kerberos (-pulseaudio) (-selinux) (-system-ffmpeg) (-tcmalloc) {-test}" LINGUAS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr sv sw ta te th tr uk vi zh_CN zh_TW" 137,669 kB

[ebuild     U  ] dev-tex/glossaries-3.04 [3.01] USE="-doc -examples" 0 kB

[ebuild     U  ] dev-ruby/json-1.7.7 [1.6.8] USE="-doc {-test}" RUBY_TARGETS="ruby18 ruby19 -jruby (-ree18)" 145 kB

[ebuild  N     ] x11-drivers/nvidia-drivers-313.30  USE="X acpi tools (-multilib) -pax_kernel" 37,936 kB

[ebuild   R    ] x11-base/xorg-drivers-1.13  INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -synaptics -tslib -vmmouse -void -wacom" VIDEO_CARDS="nvidia -apm -ark -ast -chips -cirrus -dummy -epson -fbdev* -fglrx -geode -glint -i128 -i740 -intel -mach64 -mga -modesetting -neomagic (-newport) -nouveau -nv (-omap) (-omapfb) -qxl -r128 -radeon -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa* -via -virtualbox -vmware (-voodoo)" 0 kB

Total: 11 packages (7 upgrades, 3 new, 1 reinstall), Size of downloads: 187,180 kB

!!! The following installed packages are masked:

- x11-base/xorg-server-1.12.4::gentoo (masked by: package.mask)

For more information, see the MASKED PACKAGES section in the emerge

man page or refer to the Gentoo Handbook.

```

EDIT: I tried to put into my /etc/portage/package.use the line

```

=media-video/nvidia-settings-313.30 X acpi tools

```

but it didnt help.

----------

## gerard27

Quote:

!!! The following installed packages are masked:

- x11-base/xorg-server-1.12.4::gentoo (masked by: package.mask) 

Did you mask it?

I don't quite understand what is going on in your setup.

Anyway check your /etc/portage/package.mask file.

And if xorg-server gets upgraded or reinstalled you also need to emerge all the x11-drivers/xf86-input-* that are installed.

If you don't you will probably have no mouse or keyboard.

Gerard.

----------

## Mati

*grmpf...

lets get back under control: I unmasked (put away) my xorg stuff from package.mask. There is nothing inside this file.

Still i get: 

```

emerge -uDNpv world

 * IMPORTANT: 10 config files in '/etc/portage' need updating.

 * See the CONFIGURATION FILES section of the emerge

 * man page to learn how to update config files.

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

Calculating dependencies... done!

[ebuild     U  ] dev-python/python-exec-0.3.1 [0.2] PYTHON_TARGETS="(jython2_5) (jython2_7) (python2_5) (python2_6) (python2_7) (python3_1) (python3_2) (-pypy1_9) (-pypy2_0) (-python3_3)" 73 kB

[ebuild  N     ] dev-libs/re2-0_p20130115  998 kB

[ebuild  N     ] dev-libs/jsoncpp-0.5.0-r1  USE="-doc" 105 kB

[ebuild     U  ] net-misc/rdate-1.4-r4 [1.4-r3] USE="ipv6" 0 kB

[ebuild     U  ] dev-lang/v8-3.16.14.9-r1:0/3.16.14.9 [3.15.11.15:0/3.15.11] 10,217 kB

[ebuild   R    ] sys-devel/autoconf-2.69:2.5  USE="-emacs -multislot%" 0 kB

[ebuild     U  ] app-text/psutils-1.17-r2 [1.17] 40 kB

[ebuild     U  ] www-client/chromium-26.0.1410.43 [25.0.1364.160] USE="-bindist -cups -custom-cflags -gnome -gnome-keyring -gps% -kerberos (-pulseaudio) (-selinux) (-system-ffmpeg) (-tcmalloc) {-test}" LINGUAS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr sv sw ta te th tr uk vi zh_CN zh_TW" 137,669 kB

[ebuild     U  ] dev-tex/glossaries-3.04 [3.01] USE="-doc -examples" 0 kB

[ebuild     U  ] dev-ruby/json-1.7.7 [1.6.8] USE="-doc {-test}" RUBY_TARGETS="ruby18 ruby19 -jruby (-ree18)" 145 kB

[ebuild     U  ] x11-base/xorg-server-1.13.1 [1.12.4] USE="ipv6 nptl suid%* udev xorg -dmx -doc -kdrive -minimal (-selinux) -static-libs -tslib -xnest -xvfb" 5,352 kB

[ebuild  N     ] x11-drivers/nvidia-drivers-313.30  USE="X acpi tools (-multilib) -pax_kernel" 37,936 kB

[ebuild   R    ] x11-base/xorg-drivers-1.13  INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -synaptics -tslib -vmmouse -void -wacom" VIDEO_CARDS="nvidia -apm -ark -ast -chips -cirrus -dummy -epson -fbdev* -fglrx -geode -glint -i128 -i740 -intel -mach64 -mga -modesetting -neomagic (-newport) -nouveau -nv (-omap) (-omapfb) -qxl -r128 -radeon -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa* -via -virtualbox -vmware (-voodoo)" 0 kB

Total: 13 packages (8 upgrades, 3 new, 2 reinstalls), Size of downloads: 192,531 kB

```

----------

## lexflex

This looks ok doesn't it ? 

xorg-server is no longer masked.

I mean,  you should update the configs ( use dispatch-conf or etc-update), but the emerge output itself does not give any blocking packages does it ? ( as it did before?).

Alex.

----------

## Mati

ok sorry, i forgot to run dispatch conf. now 

the emerge of  -vt1 x11-drivers/nvidia-drivers media-video/nvidia-settings runs through. 

Now i dont have anything in my package.use and nothing in package.mask. 

The output is the following:

```

emerge -vt1 x11-drivers/nvidia-drivers media-video/nvidia-settings

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

Calculating dependencies... done!

[ebuild  N    ~] media-video/nvidia-settings-313.26  USE="-examples" 0 kB

[ebuild  N     ]  x11-drivers/nvidia-drivers-313.30  USE="X acpi tools (-multilib) -pax_kernel" 0 kB

Total: 2 packages (2 new), Size of downloads: 0 kB

>>> Verifying ebuild manifests

>>> Running pre-merge checks for x11-drivers/nvidia-drivers-313.30

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.7.10-gentoo/build

 * Found sources for kernel version:

 *     3.7.10-gentoo

 * Checking for suitable kernel configuration options...                                      [ ok ]

>>> Emerging (1 of 2) x11-drivers/nvidia-drivers-313.30

 * NVIDIA-Linux-x86-313.30.run SHA256 SHA512 WHIRLPOOL size ;-) ...                           [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.7.10-gentoo/build

 * Found sources for kernel version:

 *     3.7.10-gentoo

>>> Unpacking source...

>>> Unpacking NVIDIA-Linux-x86-313.30.run to /var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work

>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work

>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work ...

 * Converting /kernel/Makefile.kbuild to use M= instead of SUBDIRS= ...                       [ ok ]

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work ...

 * Preparing nvidia module

make -j3 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= ARCH=i386 IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/3.7.10-gentoo/build CC=i686-pc-linux-gnu-gcc clean module 

The C compiler 'i686-pc-linux-gnu-gcc' does not appear to be able to

create object files.  Please make sure you have 

your Linux distribution's libc development package

installed and that 'i686-pc-linux-gnu-gcc' is a valid C compiler

name.

*** Failed CC sanity check. Bailing out! ***

make: *** [select_makefile] Fehler 1

 * ERROR: x11-drivers/nvidia-drivers-313.30 failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-313.30'`,

 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-313.30'`.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/temp/environment'.

 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work/kernel'

 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work/'

>>> Failed to emerge x11-drivers/nvidia-drivers-313.30, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/temp/build.log'

*** Resuming merge...

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

Calculating dependencies... done!

 * emerge --keep-going: media-video/nvidia-settings-313.26 dropped because it

 * requires =x11-drivers/nvidia-drivers-3*, =x11-drivers/nvidia-drivers-3*

 * Messages for package x11-drivers/nvidia-drivers-313.30:

 * ERROR: x11-drivers/nvidia-drivers-313.30 failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-313.30'`,

 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-313.30'`.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/temp/environment'.

 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work/kernel'

 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/work/'

* Messages for package media-video/nvidia-settings-313.26:

 * emerge --keep-going: media-video/nvidia-settings-313.26 dropped because it

 * requires =x11-drivers/nvidia-drivers-3*, =x11-drivers/nvidia-drivers-3*

 * 

 * The following 2 packages have failed to build or install:

 * 

 *  (x11-drivers/nvidia-drivers-313.30::gentoo, ebuild scheduled for merge), Log file:

 *   '/var/tmp/portage/x11-drivers/nvidia-drivers-313.30/temp/build.log'

 *  (media-video/nvidia-settings-313.26::gentoo, ebuild scheduled for merge)

```

something maybe is wrong with my gcc compiler? 

```

 gcc-config i686-pc-linux-gnu-gcc

 * gcc-config: Could not locate 'i686-pc-linux-gnu-gcc' in '/etc/env.d/gcc/' !

```

Last edited by Mati on Sun Apr 07, 2013 8:14 pm; edited 1 time in total

----------

## Jaglover

Output of emerge --info sys-devel/gcc please.

----------

## lexflex

Hi Mati,

 *Mati wrote:*   

> 
> 
> ```
> 
> make -j3 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= ARCH=i386 IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/3.7.10-gentoo/build CC=i686-pc-linux-gnu-gcc clean module 
> ...

 

Why does it say "host CC = i686"  and CROSS_COMPILE= i686 ? 

What system are you running this on ? You seem to try to install "NVIDIA-Linux-x86-313.30", for x86 ?

I would expect something like "HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- " for most regular systems.

Maybe post make.conf?

Alex.

PS: As Jaglover says,  emerge --info sys-devel/gcc should give some more info.Last edited by lexflex on Sun Apr 07, 2013 8:29 pm; edited 2 times in total

----------

## Mati

Ok thats getting interesting. It seems i dont have any gcc anymore: 

```

emerge --info sys-devel/gcc

!!! No gcc found. You probably need to 'source /etc/profile'

!!! to update the environment of this terminal and possibly

!!! other terminals also.

Portage 2.1.11.55 (default/linux/x86/13.0, [unavailable], glibc-2.15-r3, 3.7.10-gentoo i686)

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

                         System Settings

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

System uname: Linux-3.7.10-gentoo-i686-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.1

KiB Mem:     2067860 total,     92084 free

KiB Swap:    4192928 total,   4192928 free

Timestamp of tree: Sun, 07 Apr 2013 17:45:01 +0000

ld GNU ld (GNU Binutils) 2.22

ccache version 3.1.9 [enabled]

app-shells/bash:          4.2_p37

dev-lang/python:          2.7.3-r3, 3.2.3-r2

dev-util/ccache:          3.1.9

dev-util/cmake:           2.8.9

dev-util/pkgconfig:       0.28

sys-apps/baselayout:      2.1-r1

sys-apps/openrc:          0.11.8

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.11.6

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.6.3

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.7 (virtual/os-headers)

sys-libs/glibc:           2.15-r3

Repositories: gentoo

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O3 -march=native -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="-O3 -march=native -pipe"

DISTDIR="/usr/portage/distfiles"

EMERGE_DEFAULT_OPTS="--keep-going --autounmask=y --autounmask-write=y --quiet-build=n"

FCFLAGS="-O2 -march=i686 -pipe"

FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans"

FFLAGS="-O2 -march=i686 -pipe"

GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo "

LANG="de_DE.UTF-8"

LC_ALL="de_DE.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X acl acpi alsa apng berkdb bzip2 cairo cdr cli cracklib crashreporter crypt cxx dbus dri dvdr dvipdfm extra ffmpeg fortran gdbm gif gpm graphics gstreamer gtk hal iconv ipc ipv6 jpeg jpeg2k lightning loop-aes modules mp3 mplayer mudflap mysql nautilus ncurses network nls nptl openmp pam pcre perl php pic png pstricks python readline science session sql sse2check ssl svg tcpd threads tiff unicode webm x86 xml xvid zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

                        Package Settings

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

sys-devel/gcc-4.6.3 was built with the following:

USE="cxx fortran gtk mudflap nls nptl openmp (-altivec) -doc (-fixed-point) -gcj -graphite (-hardened) (-libssp) (-multilib) -multislot -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"

CFLAGS="-march=native -pipe -O2"

CXXFLAGS="-march=native -pipe -O2"

```

I tried to emerge gcc and i get: 

```

...

...

 ERROR: sys-devel/gcc-4.6.3 failed (compile phase):

 *   failed to run configure

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_compile

 *   environment, line 4150:  Called toolchain_src_compile

 *   environment, line 4806:  Called gcc_do_configure

 *   environment, line 2300:  Called die

 * The specific snippet of code:

 *       "${S}"/configure "$@" || die "failed to run configure";

 * 

 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.6.3'`,

 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.6.3'`.

 * 

 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/gcc-build-logs.tar.bz2 in your bug report

 * 

 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'

 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3'

 Failed to emerge sys-devel/gcc-4.6.3, Log file:

>>>  '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'

 * Messages for package sys-devel/gcc-4.6.3:

 * 

 * LTO support is still experimental and unstable.

 * Any bugs resulting from the use of LTO will not be fixed.

 * 

 * ERROR: sys-devel/gcc-4.6.3 failed (compile phase):

 *   failed to run configure

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_compile

 *   environment, line 4150:  Called toolchain_src_compile

 *   environment, line 4806:  Called gcc_do_configure

 *   environment, line 2300:  Called die

 * The specific snippet of code:

 *       "${S}"/configure "$@" || die "failed to run configure";

 * 

 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.6.3'`,

 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.6.3'`.

 * 

 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/gcc-build-logs.tar.bz2 in your bug report

 * 

 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'

 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3'

 * 

 * The following package has failed to build or install:

 * 

 *  (sys-devel/gcc-4.6.3::gentoo, ebuild scheduled for merge), Log file:

 *   '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'

```

i have to think what to do now...any hints?

----------

## lexflex

You can try to boot from a cd and chroot to rebuild gcc ?

----------

## Mati

 *Quote:*   

> You can try to boot from a cd and chroot to rebuild gcc ?

 

thanks for the advice. Is this the only possibility?  :Smile: 

I never did that but should be possible with Knoppix i hope...got to know how to do that - could take some time...

----------

## NeddySeagoon

Mati,

What does 

```
gcc-config -l
```

tell ?

----------

## Mati

My make.conf: 

```

CFLAGS="-O3 -march=native -pipe"

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="i686-pc-linux-gnu"

MAKEOPTS="-j3"

GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo "

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="dvipdfm extra graphics linguas_de linguas_en pstricks png science threads gtk ncurses nls readline cairo png ipv6 ssl bzip2 alsa crashreporter crypt dbus ipc lightning webm apng mysql hal -fontforge sse2check -kde -multilib -vdpau loop-aes nautilus cdr dvdr mplayer xml gstreamer acpi gtk mp3 network pic xvid sql svg X gif tiff jpeg 

jpeg2k php python perl ffmpeg"

FEATURES="ccache buildpkg -userfetch"

RSYNC_TIMEOUT="10"

PORTAGE_NICENESS="19"

INPUT_DEVICES="keyboard mouse evdev"

VIDEO_CARDS="nvidia"

EMERGE_DEFAULT_OPTS="--keep-going --autounmask=y --autounmask-write=y --quiet-build=n"
```

yes thats true - i wanna install "NVIDIA-Linux-x86-313.30", for x86 !

I have a 32 Bit machine...

```

gcc-config -l

 * gcc-config: Active gcc profile is invalid!

 [1] i686-pc-linux-gnu-4.6.3

```

----------

## Mati

Ok i did an 

```

gcc-config i686-pc-linux-gnu-gcc

```

and now the emerge of the nvidia-stuff works. Thanks a lot for your help!

----------

