# 2.6.23 und Kernel-Module auf amd64

## schotter

Guten Abend,

ich wollte mir gerade ein paar Module für den 2.6.23er Kernel bauen, die brechen aber ab. Hab schon gesucht und zu Truecrypt etwas gefunden https://forums.gentoo.org/viewtopic-t-597074.html sowie einen Lösungsansatz, der wahrscheinlich nicht gerne gesehen ist. Mit FEATURES="-sandbox" gelang es mir lediglich app-emulation/virtualbox-modules zu bauen. x11-drivers/nvidia-drivers und app-crypt/truecrypt brechen beide weiterhin ab.

```
echo \#define NV_COMPILER \"`x86_64-pc-linux-gnu-gcc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv_compiler.h

  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.23-gentoo/include -include include/linux/autoconf.h  -I/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -march=k8 -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign  -I/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wno-multichar -Werror -O -fno-common -msoft-float -mcmodel=kernel -mno-red-zone -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"100.14.09\" -UDEBUG -U_DEBUG -DNDEBUG -DNV_SIGNAL_STRUCT_RLIM -DNV_MULTIPLE_BRIDGE_AGPGART_PRESENT -DNV_PCI_GET_CLASS_PRESENT -DNV_SYSCTL_MAX_MAP_COUNT_PRESENT -DNV_PM_MESSAGE_T_PRESENT -DNV_PCI_CHOOSE_STATE_PRESENT -DNV_VM_INSERT_PAGE_PRESENT -DNV_OLD_MM_KGDB_BREAKPOINT_PRESENT -DNV_REMAP_PFN_RANGE_PRESENT -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_ACQUIRE_CONSOLE_SEM_PRESENT -DNV_VMAP_4_PRESENT -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.o /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c

/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c: In Funktion »nvidia_init_module«:

/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c:1322: Fehler: zu viele Argumente für Funktion »kmem_cache_create«

/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c:1431: Fehler: zu viele Argumente für Funktion »kmem_cache_create«

/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c:1567: Fehler: void-Wert nicht ignoriert wie es sein sollte

/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c: In Funktion »nvidia_exit_module«:

/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.c:1599: Fehler: void-Wert nicht ignoriert wie es sein sollte

make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv/nv.o] Fehler 1

make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-100.14.09/work/NVIDIA-Linux-x86_64-100.14.09-pkg2/usr/src/nv] Fehler 2

make[2]: *** [modules] Fehler 2

NVIDIA: left KBUILD.

nvidia.ko failed to build!

make[1]: *** [module] Fehler 1

make: *** [module] Fehler 2

 * 

 * ERROR: x11-drivers/nvidia-drivers-100.14.09 failed.

 * Call stack:

 *   ebuild.sh, line 1654:   Called dyn_compile

 *   ebuild.sh, line 990:   Called qa_call 'src_compile'

 *   ebuild.sh, line 44:   Called src_compile

 *   nvidia-drivers-100.14.09.ebuild, line 212:   Called linux-mod_src_compile

 *   linux-mod.eclass, line 518:   Called die

 * 

 * Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.23-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.09/temp/build.log'.

 * 

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------

LOG FILE = "/var/log/sandbox/sandbox-x11-drivers_-_nvidia-drivers-100.14.09-6951.log"

open_wr:   /usr/src/linux-2.6.23-gentoo/null.gcda

open_wr:   /usr/src/linux-2.6.23-gentoo/null.gcda

open_wr:   /usr/src/linux-2.6.23-gentoo/null.gcda

open_wr:   /usr/src/linux-2.6.23-gentoo/null.gcda

open_wr:   /usr/src/linux-2.6.23-gentoo/null.gcda

--------------------------------------------------------------------------------

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

 * 

 * ERROR: x11-drivers/nvidia-drivers-100.14.09 failed.

 * Call stack:

 *   ebuild.sh, line 1654:   Called dyn_compile

 *   ebuild.sh, line 990:   Called qa_call 'src_compile'

 *   ebuild.sh, line 44:   Called src_compile

 *   nvidia-drivers-100.14.09.ebuild, line 212:   Called linux-mod_src_compile

 *   linux-mod.eclass, line 518:   Called die

 * 

 * Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.23-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.09/temp/build.log'.
```

Die Fehlermeldungen zwischen nvidia und truecrypt unterscheiden sich eigentlich nicht. Ohne FEATURES="-sandbox" bringt auch virtualbox-modules die "gleiche" Fehlermeldung nur mit dem Unterschied, das es fehlerfrei durchcompiliert und am Schluss erst so rumzickt.

Dieses null.gcda gibt es im übrigen nicht.

```
Portage 2.1.3.9 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.23-gentoo x86_64)

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

System uname: 2.6.23-gentoo x86_64 AMD Athlon 64 Processor 3400+

Timestamp of tree: Tue, 16 Oct 2007 13:00:01 +0000

distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p17

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.4.4-r5

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.18.1

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.17-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.22-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -Os -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-march=k8 -Os -pipe"

DISTDIR="/usr/portage.old/distfiles"

FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo/  ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"

LANG="de_DE.utf8"

LC_ALL="de_DE.utf8"

LINGUAS="de"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

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/local/portage/local /usr/local/layman/sunrise"

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

USE="X a52 aac acl acpi alsa amd64 apache2 berkdb bitmap-fonts bluetooth bzip2 cddb cdparanoia cdr cli cracklib crypt cups dbus dri dts dv dvd dvdr dvdread encode ffmpeg firefox flac fortran ftp gdbm gif glitz gnome gphoto2 gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog javascript jpeg ldap lm_sensors mad matroska midi mime mmx mp3 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp pam pcre pdf perl php png pppd python quicktime readline reflection samba sdl session spl sse sse2 ssl svg tcpd tetex theora truetype-fonts type1-fonts unicode usb vcd vim-syntax vorbis x264 xinerama xml xorg xvid zlib" ALSA_CARDS="i8x0" 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" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nv nvidia"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

Mit der Sandbox hat's anscheinend nichts zu tun, denn es klappt weder mit sys-apps/sandbox-1.2.17 noch mit sys-apps/sandbox-1.2.18.1

Schönen Abend noch,

t.s.

----------

## gimpel

https://bugs.gentoo.org/show_bug.cgi?id=135745

..mal ganz von dem compile error abgesehen. 

Der neueste nvidia treiber kompiliert und funktioniert, mal von dem sandbox bug abgesehen  :Wink: 

----------

## UTgamer

Duplicated Beitrag von

https://forums.gentoo.org/viewtopic-t-594800.html

 :Wink: 

----------

## boris64

Hiho, was dein truecrypt-Problem angeht, unter folgendem Link/Bugreport 

findest du einen Patch, der das Problem mit Dm-target.c behebt

-> https://bugs.gentoo.org/show_bug.cgi?id=186901

----------

