Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 208270 - x11-drivers/nvidia-drivers-100.14.19 compile (configure) fails
Summary: x11-drivers/nvidia-drivers-100.14.19 compile (configure) fails
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 08:37 UTC by Jens Stutte
Modified: 2008-01-31 20:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info output (nvidia-error.logs.tar,10.00 KB, application/octet-stream)
2008-01-31 10:47 UTC, Jens Stutte
Details
build.log of emerge nvidia-drivers (build.log,3.74 KB, text/plain)
2008-01-31 11:13 UTC, Jens Stutte
Details
Th script that causes the error (conftest.sh,31.40 KB, text/plain)
2008-01-31 11:43 UTC, Jens Stutte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Stutte 2008-01-31 08:37:19 UTC
emerge nvidia-drivers on a freshly upgraded kernel 2.6.24 fails.

Poking around, I found that the configure.sh script of the nvidia driver expects the directory:
/usr/src/linux/include/asm-i386
to exist, instead of using the asm symlink of linux. A workaround is creating the symlink in 
/usr/src/linux/include
with
ln -s asm-x86 asm-i386

This seems to be a consequence of folder renaming in the linux 2.6.24 source tree, not sure on where to put hands on your side...

After adding the symlink, everything works as expected.

Reproducible: Always

Steps to Reproduce:
1. Install, symlink and compile gentoo-sources.2.6.24
2. emerge nvidia-drivers
3. done

Actual Results:  
emerge says:
make: *** [select_makefile] Fehler 1
 *
 * ERROR: x11-drivers/nvidia-drivers-100.14.19 failed.
 * Call stack:
 *                         ebuild.sh, line 1701:  Called dyn_compile
 *                         ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *                         ebuild.sh, line   44:  Called src_compile
 *   nvidia-drivers-100.14.19.ebuild, line  214:  Called linux-mod_src_compile
 *                  linux-mod.eclass, line  519:  Called die
 * The specific snippet of code:
 *                      emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" \
 *                                ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \
 *                              || die "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}."
 *  The die message:
 *   Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.24-gentoo/build clean module.
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/temp/build.log'.
 *

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

 *
 * ERROR: x11-drivers/nvidia-drivers-100.14.19 failed.
 * Call stack:
 *                         ebuild.sh, line 1701:  Called dyn_compile
 *                         ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *                         ebuild.sh, line   44:  Called src_compile
 *   nvidia-drivers-100.14.19.ebuild, line  214:  Called linux-mod_src_compile
 *                  linux-mod.eclass, line  519:  Called die
 * The specific snippet of code:
 *                      emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" \
 *                                ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \
 *                              || die "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}."
 *  The die message:
 *   Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.24-gentoo/build clean module.
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/temp/build.log'.
 *


Expected Results:  
A clean compile and install...

Probably a bug of the nvidia-driver sources itself, as they do not respect the asm symlink convention. To evaluate, if gentoo-sources.2.6.24 nvidia-drivers should contain a workaround or patch on behalf of gentoo.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-31 08:43:45 UTC
It compiles perfectly fine here without any such directory.
 
$ ls /usr/src/linux/include/asm-i386
ls: cannot access /usr/src/linux/include/asm-i386: No such file or directory

<snip>
  ld -m elf_i386 -r   --build-id -o /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/work/NVIDIA-Linux-x86-100.14.19-pkg0/usr/src/nv/nvidia.ko /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/work/NVIDIA-Linux-x86-100.14.19-pkg0/usr/src/nv/nvidia.o /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/work/NVIDIA-Linux-x86-100.14.19-pkg0/usr/src/nv/nvidia.mod.o
NVIDIA: left KBUILD.
>>> Source compiled.
</snip>


Post emerge --info and attach full emerge.log; thanks.
Comment 2 Jens Stutte 2008-01-31 10:47:59 UTC
Created attachment 142263 [details]
build.log and emerge --info output

I have seen this issue for other distributions around in some linux mailing threads (but have not stored the links).
Comment 3 Jens Stutte 2008-01-31 10:50:56 UTC
Portage 2.1.3.19 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo i686)
=================================================================
System uname: 2.6.24-gentoo i686 AMD Athlon(tm) X2 Dual Core Processor BE-2350
Timestamp of tree: Wed, 30 Jan 2008 13:16:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE"
LINGUAS="de it en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--bwlimit=30"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gentoo-de"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa apache2 arts berkdb bigpatch bitmap-fonts cairo cdr child-protection cli cracklib crypt css cups dbus divx dri dvb dvd dvdr dvdread eds emboss encode esd evo exiscan-acl fam firefox flac fortran gdbm gif gpm gstreamer gtk hal iconv imagemagick innodb ipv6 isdnlog jpeg kde kerberos ldap lirc mad midi mikmod mmx mmxext mp3 mpeg mudflap musepack mysql ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl php png pppd python qt qt3 qt3support qt4 quicktime rds-timeout readline reflection sasl sdl server session spell spl sse sse2 sse3 ssl submenu subtitles svg swat tcpd tiff tk transcode truetype truetype-fonts type1-fonts unicode v4l v4l2 vcd vidx visualization vorbis wavpack win32codecs x86 xml xml2 xorg xv xvid xvmc zlib" 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 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" DVB_CARDS="ttpci" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de it en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-01-31 10:54:37 UTC
Comment on attachment 142263 [details]
build.log and emerge --info output

*Please* don't attach tarballs. Plaintext log, thanks.
Comment 5 Jens Stutte 2008-01-31 11:13:37 UTC
Created attachment 142265 [details]
build.log of emerge nvidia-drivers

Sorry for the inconvenience, next time i'll know.
Comment 6 Jens Stutte 2008-01-31 11:14:55 UTC
To judge from the log, there seem to be some codepage issue on my machine... Don't think it's related, though.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2008-01-31 11:25:30 UTC
Are you using KBUILD_OUTPUT or something?
Comment 8 Jens Stutte 2008-01-31 11:33:32 UTC
(In reply to comment #7)
> Are you using KBUILD_OUTPUT or something?
> 

I do not know what this means, how can I check this?
Comment 9 Jens Stutte 2008-01-31 11:43:54 UTC
Created attachment 142267 [details]
Th script that causes the error

Just to pin down what's happening: The following lines produce the wrong include options for gcc:

if [ "$OUTPUT" != "$SOURCES" ]; then
    ARCH=`uname -m | sed -e 's/i.86/i386/'`
    CFLAGS="$CFLAGS -I$OUTPUT/include2 -I$OUTPUT/include \
-I$HEADERS -I$HEADERS/asm-$ARCH/mach-default"
else
    CFLAGS="$CFLAGS -I$HEADERS -I$HEADERS/asm/mach-default"
fi

Actually, $OUTPUT IS different from $SOURCES on my machine, wich adds the i386 part to the path. The make calls:
sh ./conftest.sh "i686-pc-linux-gnu-gcc" "i686-pc-linux-gnu-gcc" /usr/src/linux /lib/modules/2.6.24-gentoo/build select_makefile full_output

where "/usr/src/linux" becomes $SOURCES and "/lib/modules/2.6.24-gentoo/build" becomes $OUTPUT. Obviously I ignore if this is OK or not...
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2008-01-31 14:32:41 UTC
100.x drivers don't work with 2.6.24. That's why there's 169.x series.

Mixing ~arch kernel with arch package that build a kernel modules = not guaranteed to work.
Comment 11 Jens Stutte 2008-01-31 20:09:57 UTC
(In reply to comment #10)
> 100.x drivers don't work with 2.6.24. That's why there's 169.x series.
> 
> Mixing ~arch kernel with arch package that build a kernel modules = not
> guaranteed to work.
> 
Ok, sorry for the noise.