LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 850|回复: 4

无法安装tp_smapi 0.37

[复制链接]
发表于 2008-10-4 17:27:25 | 显示全部楼层 |阅读模式
>>> Emerging (1 of 1) app-laptop/tp_smapi-0.37
* tp_smapi-0.37.tgz RMD160 SHA1 SHA256 size ;-) ...                                   [ ok ]
* checking ebuild checksums ;-) ...                                                   [ ok ]
* checking auxfile checksums ;-) ...                                                  [ ok ]
* checking miscfile checksums ;-) ...                                                 [ ok ]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 2.6.25-gentoo-r7hdaps
* Checking for suitable kernel configuration options...                                [ ok ]
>>> Unpacking source...
>>> Unpacking tp_smapi-0.37.tgz to /var/tmp/portage/app-laptop/tp_smapi-0.37/work
* Applying thinkpad_ec_semaphore.patch ...                                             [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37 ...
* Preparing thinkpad_ec module
make -C /usr/src/linux M=/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37 O=/usr/src/linux modules
make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7'
  CC [M]  /var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.o
  CC [M]  /var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/tp_smapi.o
  CC [M]  /var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/hdaps.o
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:39:29: error: linux/semaphore.h: No such file or directory
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:86: warning: type defaults to 'int' in declaration of 'DECLARE_MUTEX'
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:86: warning: parameter names (without types) in function declaration
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c: In function 'thinkpad_ec_lock':
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:97: error: implicit declaration of function 'down_interruptible'
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:97: error: 'thinkpad_ec_mutex' undeclared (first use in this function)
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:97: error: (Each undeclared identifier is reported only once
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:97: error: for each function it appears in.)
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c: In function 'thinkpad_ec_try_lock':
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:111: error: implicit declaration of function 'down_trylock'
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:111: error: 'thinkpad_ec_mutex' undeclared (first use in this function)
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c: In function 'thinkpad_ec_unlock':
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:123: error: implicit declaration of function 'up'
/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.c:123: error: 'thinkpad_ec_mutex' undeclared (first use in this function)
make[3]: *** [/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37/thinkpad_ec.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [_module_/var/tmp/portage/app-laptop/tp_smapi-0.37/work/tp_smapi-0.37] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r7'
make: *** [modules] Error 2
*
* ERROR: app-laptop/tp_smapi-0.37 failed.
* Call stack:
* ebuild.sh, line   49:  Called src_compile
* environment, line 3169:  Called linux-mod_src_compile
* environment, line 2433:  Called die
* The specific snippet of code:
* eval "emake HOSTCC="$(tc-getBUILD_CC)"                                                 CC="$(get-KERNEL_CC)"                                                 LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES}                                                 ${BUILD_PARAMS}                         ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
* The die message:
* Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  KSRC=/usr/src/linux KBUILD=/usr/src/linux HDAPS=1 default
*
* 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/app-laptop/tp_smapi-0.37/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-laptop/tp_smapi-0.37/temp/environment'.
*

>>> Failed to emerge app-laptop/tp_smapi-0.37, Log file:

>>>  '/var/tmp/portage/app-laptop/tp_smapi-0.37/temp/build.log'

* Messages for package app-laptop/tp_smapi-0.37:

*
* ERROR: app-laptop/tp_smapi-0.37 failed.
* Call stack:
* ebuild.sh, line   49:  Called src_compile
* environment, line 3169:  Called linux-mod_src_compile
* environment, line 2433:  Called die
* The specific snippet of code:
* eval "emake HOSTCC="$(tc-getBUILD_CC)"                                                 CC="$(get-KERNEL_CC)"                                                 LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES}                                                 ${BUILD_PARAMS}                         ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
* The die message:
* Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  KSRC=/usr/src/linux KBUILD=/usr/src/linux HDAPS=1 default
*
* 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/app-laptop/tp_smapi-0.37/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-laptop/tp_smapi-0.37/temp/environment'.
*

below is emerge --info

laptop ~ # emerge --info
Portage 2.2_rc11 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7hdaps i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r7hdaps-i686-Intel-R-_Pentium-R-_M_processor_1.86GHz-with-glibc2.0
Timestamp of tree: Fri, 03 Oct 2008 09:05:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /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="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.lecl.net/pub/gentoo/ "
LANG="zh_CN.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en zh zh_CN zh_TW"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gentoo-china /usr/portage/local/layman/desktop-effects"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi aim alsa asf avahi avi bash-completion berkdb bitmap-fonts blas bzip2 cdparanoia cdr chm cjk cli cracklib crypt cups dbus divx4linux dri dv dvd dvdread emacs encode examples exif ffmpeg firefox flac foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gtk hal hdaps iconv isdnlog java jpeg lame lm_sensors mad midi mjpeg mp3 mp4 mpeg msn mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl pic png ppds pppd python qq quicktime rar readline real reflection session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype type1 unicode usb vcd vim-syntax vorbis win32codecs wmv x86 xcb xft xine xinerama xml xorg xscreensaver xv xvid zip zlib" ALSA_CARDS="intel8x0" 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="keyboard evdev mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en zh zh_CN zh_TW" USERLAND="GNU" VIDEO_CARDS="radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
发表于 2008-10-4 17:37:46 | 显示全部楼层
看了一下源码,似乎 linux/semaphore.h 改了放在 asm/semaphore.h 。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-4 21:02:38 | 显示全部楼层
那需要怎么改
回复 支持 反对

使用道具 举报

发表于 2008-10-6 08:53:50 | 显示全部楼层
解压源码,make patch可以生成一个内核补丁,直接打给内核就好了,里面有hdaps和smapi模块
回复 支持 反对

使用道具 举报

发表于 2008-10-6 15:44:02 | 显示全部楼层
拜托,不用改吧,我现在用的就是这个版本,好好的。

xxx@xxx ~ $ eix tp_smapi
app-laptop/tp_smapi
     Available versions:  0.20 (~)0.21 (~)0.27 (~)0.30 0.31 (~)0.32 (~)0.33 (~)0.37 {hdaps kernel_linux}
     Installed versions:  0.37(06:30:30 AM 08/18/2008)(hdaps kernel_linux)
     Homepage:            http://tpctl.sourceforge.net/
     Description:         IBM ThinkPad SMAPI BIOS driver

这是我是emerge -info
xxx@xxx ~ $ sudo emerge --info
Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p2008060
2-r0, 2.6.26.2 i686)
=================================================================
System uname: 2.6.26.2 i686 Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz
Timestamp of tree: Sat, 04 Oct 2008 03:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled
]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O3 -pipe -msse3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/
fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash
/etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O3 -pipe -msse3 -fomit-frame-pointer"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache distcc distlocks metadata-transfer parallel-fetch sa
ndbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/package.rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclu
de=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gentoo-china /usr/portage/local/layma
n/sajinet /usr/portage/local/layman/hanno-xgl /usr/portage /usr/local/portage /u
sr/portage/local/layman"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa apm bash-completion berkdb bluetooth branding
bzip2 cairo caps cdr cjk cli cracklib crypt cups dbus directfb divx4linux dri d
ts dvd dvdr dvdread emboss encode esd evo fam fbcon ffmpeg firefox flac fontconf
ig fortran gdbm gif glibc-omitfp gpm gtk gtkhtml hal iconv imlib isdnlog java ja
vascript jpeg jpeg2k kerberos ldap libnotify lm_sensors mad midi mikmod mmx mng
mp3 mp4 mpeg mudflap nas ncurses nls nptl nptlonly nsplugin ogg openal opengl op
enmp oss pam pcre pdf perl plugins png ppds pppd python qt3support qt4 quicktime
readline real reflection sdl session smp speex spell spl sse sse2 ssl startup-n
otification svg svga sysfs tcpd theora thread tiff truetype unicode usb vcd vorb
is wifi win32codecs wma wmp x264 x86 xcb xinerama xml xorg xprint xscreensaver x
ulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym
copy dmix dshare dsnoop empty extplug iec958 file hooks ioplug ladspa lfloat lin
ear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="a
ctions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_fil
e authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user auto
index cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter fi
le_cache filter headers include info log_config logio mem_cache mime mime_magic
negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_al
ias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_D
EVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" U
SERLAND="GNU" VIDEO_CARDS="radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LI
NGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

另外,kernel config

CONFIG_HWMON=y

内核我还打了一个 hdasp-2.6.26.patch
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表