Forums

Skip to content

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

[SOLVED]nvidia-drivers-1.0.8774 building with wrong gcc

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

[SOLVED]nvidia-drivers-1.0.8774 building with wrong gcc

  • Quote

Post by mahdi » Tue Oct 17, 2006 6:18 pm

For some reason when I emerge x11-drivers/nvidia-drivers-1.0.8774 they will not load with the following error

Code: Select all

# modprobe nvidia
FATAL: Error inserting nvidia (/lib/modules/2.6.17-gentoo-r8/video/nvidia.ko): Invalid module format
I know this error usually means that the compiled module version doesn't match the compiled kernel version...so here's that info

Code: Select all

# cat /proc/version
Linux version 2.6.17-gentoo-r8 (root@Daedalus) (gcc version 4.1.1 (Gentoo 4.1.1)) #1 PREEMPT Tue Oct 17 12:10:47 CDT 2006

# modinfo nvidia
filename:       /lib/modules/2.6.17-gentoo-r8/video/nvidia.ko
license:        NVIDIA
alias:          char-major-195-*
vermagic:       2.6.17-gentoo-r8 preempt mod_unload K7 gcc-3.4
depends:        i2c-core
Obviously that is true here, I've been wrestling with this for quite some time now and rebuilt a new kernel this morning and re-emerged the nvidia-drivers to see it that would help, still no good. I have no idea why nvidia-drivers are building with gcc-3.4 when gcc-4.1 is the system default. Any tips from here would be greatly appreciated...here's additional info I think that is relevant. I've converted the gcc-4.1 a long time ago.

Code: Select all

# gcc-config -l
 [1] i686-pc-linux-gnu-3.3.6
 [2] i686-pc-linux-gnu-3.3.6-hardened
 [3] i686-pc-linux-gnu-3.3.6-hardenednopie
 [4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i686-pc-linux-gnu-3.3.6-hardenednossp
 [6] i686-pc-linux-gnu-3.4.6
 [7] i686-pc-linux-gnu-3.4.6-hardened
 [8] i686-pc-linux-gnu-3.4.6-hardenednopie
 [9] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.6-hardenednossp
 [11] i686-pc-linux-gnu-4.1.1 *


# cat /etc/make.conf
# These settings were set by the catalyst build script that automatically built this stage
#CFLAGS="-O2 -march=athlon-xp -mmmx -m3dnow -msse -msse2 -fomit-frame-pointer"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
USE="aalib aac alsa apm cdr cups dvd dvdr dvdread encode foomaticdb gimpprint gstreamer gtk2 gpm imap java joystick maildir flac firefox mono mpeg mysql ncurses nvidia offensive opengl samba spell svga thunar truetype usb wxwindows X x86 mmx2 3dnow 3dnowex sse -emacs -xemacs -ipv6 -kde -qt -qt3 -arts -usermodeos bitmap-fonts truetype-fonts type1-fonts xprint real win32codecs unicode nsplugin softmmu glitz cairo gnome svg nptl nptlonly xvid"
CXXFLAGS="${CFLAGS}"
ALSA_CARDS="emu10k1"
VIDEO_CARDS="nvidia nv"
INPUT_DEVICES="keyboard mouse"
PORTDIR_OVERLAY="/usr/local/xfce /usr/local/portage"
FEATURES="candy"
AUTOCLEAN="yes"
Manually installing NVIDIA-Linux-x86-1.0-8774-pkg1.run works and runs fine, so I think something might be messed up on my system but everything else is fine, even other modules, but the nvidia is the only non-kernel module I use... I have run fix_libtool_files.sh 3.4.6 but still get the bad build, and removed /lib/modules/2.6.17-gentoo-r4/video/nvidia.ko then emerged to no avail :(
Last edited by mahdi on Mon Feb 12, 2007 3:45 pm, edited 1 time in total.
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Tue Oct 17, 2006 11:16 pm

Try the beta nvidia drivers (1.0.9625) after removing the current ones.
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Wed Oct 18, 2006 1:23 am

Ah, thanks I just realized that after they merged the nvidia-kernel and nvidia-glx they also changed it x11-drivers/

But that didn't help, they still compiled with 3.4 and manually installing the 9625 caused a hard lock of X when started (even though they did build with 4.1 manually).

I'm back on the manual install of the 8774 as the main problem I'm having is an ebuild error, I'm looking forward to more suggestions :)
Top
alienjon
Veteran
Veteran
User avatar
Posts: 1740
Joined: Wed Feb 09, 2005 4:37 pm

  • Quote

Post by alienjon » Wed Oct 18, 2006 1:44 am

Do you have the log file from the lock? If possible, would you be able to reproduce it for us? It might give us a clue :)
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Wed Oct 18, 2006 2:20 am

I'm more concerned about the wacky compiling thing then the X with the new drivers

It has nothing to do with the nvidia-drivers as I stated they install properly manually, it's the emerge that for some reason uses gcc 3.4 instead of 4.1 like everything else...after that I'll worry about the X lock thing :D
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Wed Oct 18, 2006 3:32 am

What does "gcc -v" output?
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Wed Oct 18, 2006 5:02 am

Two different things, as a user...

Code: Select all

$ gcc -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.5/specs
Configured with: ./configure
Thread model: posix
gcc version 3.4.5
and as root

Code: Select all

# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1)
Top
yabbadabbadont
Advocate
Advocate
User avatar
Posts: 4791
Joined: Fri Mar 14, 2003 12:02 am
Location: 2 exits past crazy

  • Quote

Post by yabbadabbadont » Wed Oct 18, 2006 5:20 am

Root and your user have two different PATH settings. Your user must have a gcc symlink in his path that points to the older version.

Run "which gcc" both as user and root and then check the resulting symlinks.

EDIT: actually, it may not be a symlink, but two different versions of the gcc binary in two different directories.

EDIT2: Since you still have both versions of gcc installed, make sure that 4.1.1 appears in your user's PATH before the older version. You may need to edit /etc/env.d/05gcc
Bones McCracker wrote:On the other hand, regex is popular with the ladies.
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Wed Oct 18, 2006 12:25 pm

Thanks yabbadabbadont, that's made some progress

They were using different directories for gcc but the /etc/env.d/05gcc did show that 4.1.1 was first...but it looks like the user login isn't sourcing that which might be what's going on here because if I "source /etc/profile.env then gcc-4.1 .1 is used like it is with root. But after sourcing that I seem to lose a few paths, like /bin :p

Code: Select all

# cat /etc/env.d/05gcc
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.1"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.1"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.1.1:/usr/lib/gcc/i686-pc-linux-gnu/3.4.6:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6"
GCC_SPECS=""
So maybe fixing up my env is what needs to be done...any link suggestions on how gentoo manages profile environments it seems to pull variables from all over the place...
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Wed Nov 08, 2006 6:15 pm

I have made a little progress on this but I'm still having the same problem of the nvidia-drivers compiling with gcc-3.4 instead of gcc-4.1

I've removed the instances of gcc-3.4 from the /etc/env.d/05gcc and now as root and a user gcc -v shows version 4.1
Protage will emerge everything properly using gcc-4.1 but for some very strange reason it still uses gcc-3.4 for nvidia.

I think we're getting closer but any other tips/hints would be great so I can finish this :)

Also looked a little more into the nvidia-drivers-9625 graphic lock when that module is loaded when build from the NVIDIA installer. It locks up all running displays but I can ssh in and see that it is caused when it trys to find the card version with "cat /proc/driver/nvidia/cards/0"

Using the NVIDIA installed 8774 the output is

Code: Select all

Model:           GeForce 6600
IRQ:             12
Video BIOS:      05.43.02.46.51
Card Type:       AGP
DMA Size:        32 bits
DMA Mask:        0xffffffff
this is totally unreleated to the gcc problem but since it was asked there it is :)
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Thu Nov 09, 2006 3:35 am

What if you:

Code: Select all

# Use quickpkg to backup your older gcc's:
quickpkg =gcc-3.3*
quickpkg =gcc-3.4*

# Leave only the latest version of gcc installed (this uninstalls 3.3 and 3.4):
emerge -aP gcc

# Verify that 4.x is the only version installed now:
gcc-config -l

env-update
source /etc/profile

# Try it again:
emerge -a nvidia-drivers

# Restore gcc 3.x backups:
emerge -aK =gcc-3.3* =gcc-3.4*
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Thu Nov 09, 2006 1:14 pm

Same thing, I've already removed all the old installs of gcc out of desperation which is why this REALLY troubles me :)

Code: Select all

 # gcc-config -l
 [1] i686-pc-linux-gnu-4.1.1 *
If I do a whereis gcc and run each binary with -v they all show gcc-4.1.1
Where is the profile for portage stored? Maybe I can find something usefully in there?
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Fri Nov 10, 2006 1:03 am

mahdi wrote:Same thing, I've already removed all the old installs of gcc out of desperation which is why this REALLY troubles me :)

Code: Select all

 # gcc-config -l
 [1] i686-pc-linux-gnu-4.1.1 *
What happens? Does the kernel module still somehow get built with a 3.4 you don't even have installed?
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Fri Nov 10, 2006 1:21 am

Exactly what I've been saying :p

that is why it makes absolutely no sense
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Fri Nov 10, 2006 1:23 am

nVidia's driver installer comes with precompiled kernel modules - maybe somehow it's using one of those instead of actually compiling one?

Maybe there's a gcc 3.4 installation that portage isn't aware of, one you installed manually? Is there a gcc in /usr/local/bin or somewhere else in $PATH?
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Fri Nov 10, 2006 1:30 am

Code: Select all

$ whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/X11R6/bin/gcc /usr/bin/X11/gcc /usr/local/lib/gcc /usr/libexec/gcc

Code: Select all

# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/X11R6/bin/gcc /usr/bin/X11/gcc /usr/local/lib/gcc /usr/libexec/gcc
I've gone through every one of those and the ones that are binaries all report 4.1.1

I still think it might be the profile portage uses but I can't find anything one that
Top
mahdi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Mon May 05, 2003 4:51 pm
Location: Dallas TX
Contact:
Contact mahdi
Website

  • Quote

Post by mahdi » Mon Feb 12, 2007 3:45 pm

I think I've found the problem here, it's crazy and I don't know the 'proper way' to fix it so I had to do it via brute force...

Even though everything system wise was pointing towards gcc-4.1.1 the portage profile was using the gcc-3.4.5 because even though I've removed it, the binaries and libs were still installed on the system. Portage's env pointed to /usr/local/lib (where 3.4.5 lived) before /usr/lib (where 4.1.1 lives) so through the nature of Unix it used the fist binary it found, which was the old one.

The brute force I did was simply removing the binaries and libs for the gcc-3.4.5 and the nature of Unix is to look in the next location for the binaries. This problem is fixed but was due to a portage profile error.
Top
Post Reply

17 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