Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26820 - tpctl fails to compile with USE="tpctlir"
Summary: tpctl fails to compile with USE="tpctlir"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-17 13:00 UTC by roger55 (RETIRED)
Modified: 2003-10-12 07:43 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roger55 (RETIRED) gentoo-dev 2003-08-17 13:00:06 UTC
laptop tpctl # USE="tpctlir" emerge tpctl 
Calculating dependencies ...done! 
>>> emerge (1 of 1) sys-apps/tpctl-4.4-r1 to / 
>>> md5 src_uri ;-) tpctl_4.4.tar.gz 
>>> Unpacking source... 
>>> Unpacking tpctl_4.4.tar.gz to /var/tmp/portage/tpctl-4.4-r1/work 
>>> Source unpacked. 
make: Entering directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/lib' 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -I../include -fPIC -DLINUX -o 
smapidev.o -c smapidev.c 
ld -shared -lc -soname libsmapidev.so.2 -o libsmapidev.so.2.0 smapidev.o 
ln -sf libsmapidev.so.2.0 libsmapidev.so.2 
ln -sf libsmapidev.so.2 libsmapidev.so 
make: Leaving directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/lib' 
make: Entering directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/tpctl' 
gcc -Wall -Wcast-align -Wstrict-prototypes -Wno-uninitialized -O2 -L../lib 
-I../include -DLINUX -o tpctl.o -c tpctl.c 
gcc -Wall -Wcast-align -Wstrict-prototypes -Wno-uninitialized -O2 -L../lib 
-I../include -DLINUX -o tpctl tpctl.o -lncurses -lsmapidev 
make: Leaving directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/tpctl' 
make: Entering directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/ntpctl' 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -L../lib -I../include -DLINUX -o 
ntpctl.o -c ntpctl.c 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -L../lib -I../include -DLINUX -o 
event_cond.o -c event_cond.c 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -L../lib -I../include -DLINUX -o 
pointing_device.o -c pointing_device.c 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -L../lib -I../include -DLINUX -o 
timer.o -c timer.c 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -L../lib -I../include -DLINUX -o 
ntpctl ntpctl.o event_cond.o pointing_device.o timer.o -lmenu -lncurses 
-lsmapidev 
make: Leaving directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/ntpctl' 
make: Entering directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/tpctlir' 
gcc -Wall -Wcast-align -Wstrict-prototypes -O2 -o tpctlir tpctlir.c 
tpctlir.c: In function `main': 
tpctlir.c:18: warning: implicit declaration of function `strcmp' 
/var/tmp/portage/tpctl-4.4-r1/temp/ccR4UyEY.o(.text+0xa1): In function `main': 
: undefined reference to `__global_cli' 
/var/tmp/portage/tpctl-4.4-r1/temp/ccR4UyEY.o(.text+0xcc): In function `main': 
: undefined reference to `__global_sti' 
collect2: ld returned 1 exit status 
make: *** [tpctlir] Error 1 
make: Leaving directory `/var/tmp/portage/tpctl-4.4-r1/work/tpctl-4.4/tpctlir' 
 
!!! ERROR: sys-apps/tpctl-4.4-r1 failed. 
!!! Function src_compile, Line 32, Exitcode 2 
!!! tpctlir make failed 
 
This is on a Thinkpad 760EL. 
 
so I really need tpctlir. 
 
without USE="tpctlir" it compiles fine. 
 
if you need additional info: 
 
#gentoo: roger55 
 
 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Brandy Westcott (RETIRED) gentoo-dev 2003-08-17 18:02:46 UTC
This looks you are compiling an SMP module for a non-SMP kernel. In asm.system.h: 
 
#ifdef CONFIG_SMP 
 
extern void __global_cli(void); 
extern void __global_sti(void); 
extern unsigned long __global_save_flags(void); 
extern void __global_restore_flags(unsigned long); 
#define cli() __global_cli() 
#define sti() __global_sti() 
#define save_flags(x) ((x)=__global_save_flags()) 
#define restore_flags(x) __global_restore_flags(x) 
 
 
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2003-10-04 09:16:41 UTC
Added a patch that makes it compile regardless of CONFIG_SMP setting, but
I'm not certain it works perfectly anymore. (According to the Linux IO Programming
Mini-HOWTO, my new approach is how to do it, but it's probably outdated....)
Comment 3 roger55 (RETIRED) gentoo-dev 2003-10-12 07:43:25 UTC
fix works fine.
emerged and works fine.
thanks a lot!

roger55