View previous topic :: View next topic |
Author |
Message |
devilevil n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Feb 2009 Posts: 29
|
Posted: Thu Feb 03, 2011 7:26 am Post subject: Vanilla 2.6.37 & tp_smapi-0.40 |
|
|
Hi,
I am trying to solve a problem. I am running vanilla kernel 2.6.37 with no patch on my thinkpad laptop. I want to emerge tp_smapi but emerge failed. I wanted to figure out why, in my opinion one of the possibilities are, that patch for 2.6.37 kernel do not apply due emerging (I checked source codes), but I dont know if it is the problem. Can anyone help me?
Thanks.
Some interesting ouputs:
build.log
Code: | [/post]
* Package: app-laptop/tp_smapi-0.40
* Repository: gentoo
* Maintainer: mobile@gentoo.org
* USE: amd64 elibc_glibc hdaps kernel_linux multilib userland_GNU
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found kernel object directory:
* /lib/modules/2.6.37/build
* Found sources for kernel version:
* 2.6.37
* Checking for suitable kernel configuration options...
[ ok ]
* Checking for suitable kernel configuration options...
[ ok ]
>>> Unpacking source...
>>> Unpacking tp_smapi-0.40.tgz to /var/tmp/portage/app-laptop/tp_smapi-0.40/work
>>> Source unpacked in /var/tmp/portage/app-laptop/tp_smapi-0.40/work
>>> Preparing source in /var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40 ...
ln: failed to create symbolic link `Module.symvers': File exists
* Preparing thinkpad_ec module
make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= KSRC=/usr/src/linux KBUILD=/lib/modules/2.6.37/build HDAPS=1 default
make -C /lib/modules/2.6.37/build M=/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40 O=/lib/modules/2.6.37/build modules
make[1]: Entering directory `/usr/src/linux-2.6.37'
CC [M] /var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.o
CC [M] /var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.o
CC [M] /var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/hdaps.o
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:91: warning: type defaults to ‘int’ in declaration of ‘DECLARE_MUTEX’
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:91: warning: parameter names (without types) in function declaration
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c: In function ‘thinkpad_ec_lock’:
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:108: error: ‘thinkpad_ec_mutex’ undeclared (first use in this function)
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:108: error: (Each undeclared identifier is reported only once
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:108: error: for each function it appears in.)
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c: In function ‘thinkpad_ec_try_lock’:
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:122: error: ‘thinkpad_ec_mutex’ undeclared (first use in this function)
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c: In function ‘thinkpad_ec_unlock’:
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.c:134: error: ‘thinkpad_ec_mutex’ undeclared (first use in this function)
make[3]: *** [/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/thinkpad_ec.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/hdaps.c: In function ‘hdaps_dmi_match_invert’:
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/hdaps.c:717: warning: cast from pointer to integer of different size
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c:112: warning: type defaults to ‘int’ in declaration of ‘DECLARE_MUTEX’
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c:112: warning: parameter names (without types) in function declaration
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c: In function ‘store_battery_start_charge_thresh’:
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c:776: error: ‘smapi_mutex’ undeclared (first use in this function)
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c:776: error: (Each undeclared identifier is reported only once
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c:776: error: for each function it appears in.)
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c: In function ‘store_battery_stop_charge_thresh’:
/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.c:818: error: ‘smapi_mutex’ undeclared (first use in this function)
make[3]: *** [/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40/tp_smapi.o] Error 1
make[2]: *** [_module_/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37'
make: *** [modules] Error 2
emake failed
* ERROR: app-laptop/tp_smapi-0.40 failed:
* Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= KSRC=/usr/src/linux KBUILD=/lib/modules/2.6.37/build HDAPS=1 default
*
* Call stack:
* ebuild.sh, line 56: Called src_compile
* environment, line 3562: Called linux-mod_src_compile
* environment, line 2722: Called die
* The specific snippet of code:
* eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CROSS_COMPILE=${CHOST}- LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
*
* If you need support, post the output of 'emerge --info =app-laptop/tp_smapi-0.40',
* the complete build log and the output of 'emerge -pqv =app-laptop/tp_smapi-0.40'.
* The complete build log is located at '/var/tmp/portage/app-laptop/tp_smapi-0.40/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-laptop/tp_smapi-0.40/temp/environment'.
* S: '/var/tmp/portage/app-laptop/tp_smapi-0.40/work/tp_smapi-0.40'
|
emerge --info =app-laptop/tp_smapi-0.40
Code: |
Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.37 x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-2.6.37-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8700_@_2.53GHz-with-gentoo-1.12.14
Timestamp of tree: Thu, 03 Feb 2011 07:00:01 +0000
app-shells/bash: 4.1_p9
dev-lang/python: 2.6.6-r1, 3.1.2-r4
dev-util/cmake: 2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox: 2.4
sys-devel/autoconf: 2.13, 2.65-r1
sys-devel/automake: 1.10.3, 1.11.1
sys-devel/binutils: 2.20.1-r1
sys-devel/gcc: 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.10
sys-devel/make: 3.81-r2
virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/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/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/fitkit /var/lib/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session sse sse2 ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
=================================================================
Package Settings
=================================================================
app-laptop/tp_smapi-0.40 was built with the following:
USE="hdaps (multilib)"
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ToeiRei Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/6751558806237adbec266c.jpg)
Joined: 03 Jan 2005 Posts: 1191 Location: Austria
|
Posted: Thu Feb 03, 2011 8:28 am Post subject: |
|
|
there's a patch needed:
Code: | --
diff --git a/thinkpad_ec.c b/thinkpad_ec.c
--- a/thinkpad_ec.c
+++ b/thinkpad_ec.c
@@ -88,7 +88,11 @@ static u64 prefetch_jiffies;
#define TPC_PREFETCH_JUNK (INITIAL_JIFFIES+1) /* Ignore prefetch */
/* Locking: */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
static DECLARE_MUTEX(thinkpad_ec_mutex);
+#else
+static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
+#endif
/* Kludge in case the ACPI DSDT reserves the ports we need. */
static int force_io; /* Willing to do IO to ports we couldn't reserve? */
diff --git a/tp_smapi.c b/tp_smapi.c
--- a/tp_smapi.c
+++ b/tp_smapi.c
@@ -109,7 +109,11 @@ static struct { u8 rc; char *msg; int re
#define SMAPI_PORT2 0x4F /* fixed port, meaning unclear */
static unsigned short smapi_port; /* APM control port, normally 0xB2 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
static DECLARE_MUTEX(smapi_mutex);
+#else
+static DEFINE_SEMAPHORE(smapi_mutex);
+#endif
/**
* find_smapi_port - read SMAPI port from NVRAM
|
I would suggest modifying the ebuild in your local overlay by adding the following paragraph to the ebuild (right before pkg_setup) and drop the patch into the files-directory:
Code: | src_prepare() {
epatch "${FILESDIR}/declare_mutex.patch"
}
|
_________________ Please stand by - The mailer daemon is busy burning your messages in hell... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
devilevil n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Feb 2009 Posts: 29
|
Posted: Thu Feb 03, 2011 9:59 am Post subject: |
|
|
ToeiRei wrote: | there's a patch needed:
...
|
Thanks a lot. It worked for me. There is this patch included in the package called tp_smapi-0.40-2.6.37.patch. So after edit ebuild:
Code: |
src_prepare() {
epatch "${FILESDIR}/tp_smapi-0.40-2.6.37.patch"
}
|
Thanks a lot. Problem solved. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Dwokfur Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/893190356484d7b3659421.jpg)
Joined: 15 Sep 2006 Posts: 86 Location: Budapest, Hungary, Europe
|
Posted: Wed Feb 09, 2011 6:46 pm Post subject: |
|
|
devilevil wrote: | ToeiRei wrote: | there's a patch needed:
...
|
Thanks a lot. It worked for me. There is this patch included in the package called tp_smapi-0.40-2.6.37.patch. So after edit ebuild:
Code: |
src_prepare() {
epatch "${FILESDIR}/tp_smapi-0.40-2.6.37.patch"
}
|
Thanks a lot. Problem solved. |
Problem has been fixed in -r1. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|