Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294251 - app-laptop/tp_smapi-0.40 fails to compile when KBUILD_OUTPUT is set
Summary: app-laptop/tp_smapi-0.40 fails to compile when KBUILD_OUTPUT is set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-23 17:54 UTC by Myk Taylor
Modified: 2011-03-21 06:02 UTC (History)
1 user (show)

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


Attachments
fixes makefile header check; place in files/ directory (fix_header_check.patch,701 bytes, patch)
2009-11-23 17:57 UTC, Myk Taylor
Details | Diff
patch to ebuild (tp_smapi-0.40.ebuild.patch,331 bytes, patch)
2009-11-23 17:58 UTC, Myk Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myk Taylor 2009-11-23 17:54:04 UTC
An error in the Makefile "sanity check" prevents tp_smapi from compiling.  The Makefile erroneously checks for the existence of a header file in ${KBUILD} when it should be checking ${KSRC}.  When KBUILD_OUTPUT is not set, these two directories happen to be the same, and the check passes.  When KBUILD_OUTPUT is set, warnings are shown about not being able to find kernel headers.

Reproducible: Always

Steps to Reproduce:
1. Set KBUILD_OUTPUT in /etc/make.conf
2. Build the kernel such that the output appears in ${KBUILD_OUTPUT}
3. Build tp_smapi-0.40

Actual Results:  
Compile step fails with the following error:
make -j2 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= KSRC=/usr/src/linux KBUILD=/var/portage/kernel HDAPS=1 default
Makefile:31: Building tp_smapi requires Linux kernel 2.6.19 or newer, and matching kernel headers.
Makefile:32: You may need to override the following Make variables:
Makefile:33: .   KVER=2.6.30-tuxonice-r6
Makefile:34: .   KBUILD=/var/portage/kernel
Makefile:35: .   MOD_DIR=/lib/modules/2.6.30-tuxonice-r6/kernel
Makefile:36: For "make patch", you may also need the full kernel sources, and may need to override:
Makefile:37: .   KSRC=/usr/src/linux
Makefile:38: *** Missing kernel headers.  Stop.

Expected Results:  
Installed correctly.

Portage 2.1.6.13 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-tuxonice-r6 i686)
=================================================================
System uname: Linux-2.6.30-tuxonice-r6-i686-Intel-R-_Pentium-R-_M_processor_2.00GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 22 Nov 2009 22:30:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://gentoo.llarian.net/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en vi zh zh_TW"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi adns alsa ao audiofile bash-completion berkdb bidi bluetooth branding bzip2 cairo cddb cdparanoia cdr cjk cli consolekit cracklib crypt cscope cups curl dbus dga directfb dri dts dvd dvdr eds emboss encode evo exif expat fam fbcon ffmpeg firefox flac fontconfig foomaticdb fortran ftp gd gdbm ggi gif gimp gmp gnutls gphoto2 gpm graphviz gstreamer gtk gtkhtml hal iconv idn imagemagick imap imlib ipod jabber java java6 jbig jikes joystick jpeg jpeg2k kde kdeenablefinal lame lcms ldap libnotify libsamplerate lirc lm_sensors lzo mad matroska mikmod mmap mmx mng modules mono mp3 mp4 mpeg mplayer mudflap musepack musicbrainz mysql ncurses nls nptl nptlonly nsplugin ofx ogg openal openexr opengl openmp oracle pam pango pch pcmcia pcre pdf perl plotutils png portaudio ppds pppd python qt3support qt4 quicktime readline reflection samba sasl scanner sdl session slang slp sndfile snmp speex spell spl sse sse2 ssl startup-notification subversion svg sysfs tcl tcpd theora threads thunar tiff tk truetype unicode usb v4l v4l2 vcd vim-syntax vorbis webkit win32codecs wmf wxwindows x264 x86 xcomposite xine xinerama xml xorg xosd xpm xprint xscreensaver xulrunner xv xvid yahoo 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 mmap_emul 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en vi zh zh_TW" LIRC_DEVICES="sir" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby soa visualweb webcommon websvccommon xml" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Myk Taylor 2009-11-23 17:57:32 UTC
Created attachment 210998 [details, diff]
fixes makefile header check; place in files/ directory

add app-laptop/tp_smapi/files/fix_header_check.patch
Comment 2 Myk Taylor 2009-11-23 17:58:11 UTC
Created attachment 210999 [details, diff]
patch to ebuild

add patch to app-laptop/tp_smapi/tp_smapi-0.40.ebuild
Comment 3 Myk Taylor 2009-11-23 18:00:43 UTC
Incidentally, tp_smapi-0.37 and tp_smapi-0.39 can be fixed to work with a set KBUILD_OUTPUT as well by applying the following patch:

<       BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_DIR}"
---
>       BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}"
Comment 4 Guenther Brunthaler 2010-08-06 21:46:07 UTC
I suspect this bug might be a consequence of bug # 331467 which I have just reported.
Comment 5 Nick Bowler 2010-09-22 15:25:55 UTC
(In reply to comment #4)
> I suspect this bug might be a consequence of bug # 331467 which I have just
> reported.

No, this is a real bug in the tp_smapi build system.  There's a report upstream
as well:

  http://sourceforge.net/tracker/?func=detail&aid=2674922&group_id=1212&atid=101212
Comment 6 Alexey Shvetsov archtester gentoo-dev 2010-11-29 01:15:25 UTC
Fixed in -r1
Comment 7 Anton Bolshakov 2011-03-21 06:02:04 UTC
Alexey,

I'm getting QA warning with -r1 revision:


 * QA Notice: command not found:
 * 
 *      /var/tmp/portage/app-laptop/tp_smapi-0.40-r1/temp/environment: line 3580: linux-mod_src_prepare: command not found
strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment


Could you fix it please?

Cheers.