Despite the fact that I have my /usr/src/linux symlink set up correctly and that the ebuild correctly identifies the kernel source tree, make is called with O= pointing to old directory. velbloud src # emerge -1av tp_smapi These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-laptop/tp_smapi-0.30 USE="hdaps" 0 kB Total size of downloads: 0 kB Would you like to merge these packages? [Yes/No] >>> Emerging (1 of 1) app-laptop/tp_smapi-0.30 to / * tp_smapi-0.30.tgz MD5 ;-) ... [ ok ] * tp_smapi-0.30.tgz RMD160 ;-) ... [ ok ] * tp_smapi-0.30.tgz SHA1 ;-) ... [ ok ] * tp_smapi-0.30.tgz SHA256 ;-) ... [ ok ] * tp_smapi-0.30.tgz size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking tp_smapi-0.30.tgz ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.19-suspend2-r1 >>> Unpacking source... >>> Unpacking tp_smapi-0.30.tgz to /var/tmp/portage/tp_smapi-0.30/work >>> Source unpacked. >>> Compiling source in /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30 ... * Preparing thinkpad_ec module echo '/* Intentionally empty. You have proper DMI OEM Strings. */' > dmi_ec_oem_string.h make -C /usr/src/linux M=/var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30 O=/lib/modules/2.6.18-suspend2/build modules make[1]: Entering directory `/usr/src/linux-2.6.19-suspend2-r1' CC [M] /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/thinkpad_ec.o CC [M] /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/tp_smapi.o CC [M] /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/hdaps.o /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/thinkpad_ec.c: In function `check_dmi_for_ec': /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/thinkpad_ec.c:436: error: `DMI_DEV_TYPE_OEM_STRING' undeclared (first use in this function) /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/thinkpad_ec.c:436: error: (Each undeclared identifier is reported only once /var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/thinkpad_ec.c:436: error: for each function it appears in.) make[3]: *** [/var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/thinkpad_ec.o] Error 1 make[3]: *** Waiting for unfinished jobs.... ACCESS DENIED open_wr: /usr/src/linux-2.6.18-suspend2/.tmp /bin/sh: .tmp: Permission denied make[3]: *** [/var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/hdaps.o] Error 1 ACCESS DENIED open_wr: /usr/src/linux-2.6.18-suspend2/.tmp /bin/sh: .tmp: Permission denied make[3]: *** [/var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30/tp_smapi.o] Error 1 make[2]: *** [_module_/var/tmp/portage/tp_smapi-0.30/work/tp_smapi-0.30] Error 2 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.19-suspend2-r1' make: *** [modules] Error 2 !!! ERROR: app-laptop/tp_smapi-0.30 failed. Call stack: ebuild.sh, line 1546: Called dyn_compile ebuild.sh, line 937: Called src_compile ebuild.sh, line 1255: Called linux-mod_src_compile linux-mod.eclass, line 510: Called die !!! Unable to make KSRC=/usr/src/linux HDAPS=1 default. !!! If you need support, post the topmost build error, and the call stack if relevant. --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/var/log/sandbox/sandbox-app-laptop_-_tp_smapi-0.30-29000.log" open_wr: /usr/src/linux-2.6.18-suspend2/.tmp open_wr: /usr/src/linux-2.6.18-suspend2/.tmp -------------------------------------------------------------------------------- velbloud src # ls -al /usr/src/ total 40 drwxr-xr-x 5 root root 80 Dec 24 20:52 . drwxr-xr-x 17 root root 4096 Nov 26 08:21 .. -rw-r--r-- 1 root root 0 Jan 5 2006 .keep lrwxrwxrwx 1 root root 24 Dec 24 20:00 linux -> linux-2.6.19-suspend2-r1 drwxr-xr-x 20 root root 4096 Dec 24 19:26 linux-2.6.17-hardened-r1 drwxr-xr-x 20 root root 8192 Dec 23 02:12 linux-2.6.18-suspend2 drwxr-xr-x 20 root root 4096 Dec 24 20:39 linux-2.6.19-suspend2-r1
velbloud src # emerge --info Portage 2.1.1-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5, 2.6.18-suspend2 i686) ================================================================= System uname: 2.6.18-suspend2 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz Gentoo Base System version 1.12.6 Last Sync: Sun, 24 Dec 2006 09:20:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=prescott -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-O2 -march=prescott -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict userfetch userpriv usersandbox" GENTOO_MIRRORS="http://ftp.sh.cvut.cz/MIRRORS/gentoo" LINGUAS="en cs" MAKEOPTS="-j3" PKGDIR="/usr/portage//packages/x86/" 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'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac aalib acpi alsa alsa_cards_hda-intel alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol bash-completion berkdb bluetooth bzip2 cdparanoia crypt cscope css cups curl dbus dlloader dri dts dvb dvd dvdr dvdread elibc_glibc encode fam fbsplash ffmpeg flac gif hal hardened hdaps ieee1394 imlib input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 irda java jpeg kde kdeenablefinal kernel_linux libcaca linguas_cs linguas_en logrotate matroska mmx mp3 mpeg ncurses nls nptl nptlonly nsplugin ogg opengl pam pdf pic png ppds python qt3 readline samba smp speex spell sse sse2 sse3 ssl stream tga theora tiff truetype unicode usb userland_GNU userlocales vcd video_cards_fbdev video_cards_fglrx video_cards_radeon video_cards_vesa vim vorbis wifi x86 xine xinerama xorg xv xvid zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Ebuild just uses linux-mod, so the error must be there.
fixed the ebuild thanks