[ltp] Re: Compiling ibm-acpi 0.6 on Debian Sarge fails

Juergen Stuber linux-thinkpad@linux-thinkpad.org
Fri, 22 Oct 2004 20:48:23 +0200


Hi Maarten,

Maarten den Braber <mdb@twister.cx> writes:
>
> When trying to compile ibm-acpi 0.6 on Debian Sarge it fails with the
> following errors:
>
> | vortex:/usr/src/ibm-acpi-0.6# make
> | make -C /lib/modules/2.6.9/build SUBDIRS=/usr/src/ibm-acpi-0.6 modules
> | make[1]: Entering directory `/usr/src/linux-2.6.9'
> |   CC [M]  /usr/src/ibm-acpi-0.6/ibm_acpi.o
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c: In function `hotkey_notify':
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:394: warning: implicit declaration of function `acpi_bus_generate_event'
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c: In function `setup_notify':
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1006: warning: implicit declaration of function `acpi_bus_get_device'
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1012: warning: implicit declaration of function `acpi_driver_data'
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1012: error: invalid lvalue in assignment
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1013: warning: implicit declaration of function `acpi_device_class'
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1013: warning: passing arg 1 of `sprintf' makes pointer from integer without a cast
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c: In function `register_driver':
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1037: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1043: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1043: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1043: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1043: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1043: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1043: error: invalid application of `sizeof' to an incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1044: error: dereferencing pointer to incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1045: error: dereferencing pointer to incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1046: error: dereferencing pointer to incomplete type
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1048: warning: implicit declaration of function `acpi_bus_register_driver'
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c: In function `ibm_exit':
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1117: warning: implicit declaration of function `acpi_bus_unregister_driver'
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c: In function `acpi_ibm_exit':
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1179: error: `acpi_root_dir' undeclared (first use in this function)
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1179: error: (Each undeclared identifier is reported only once
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1179: error: for each function it appears in.)
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c: In function `acpi_ibm_init':
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1186: error: `acpi_disabled' undeclared (first use in this function)
> | /usr/src/ibm-acpi-0.6/ibm_acpi.c:1189: error: `acpi_root_dir' undeclared (first use in this function)
> | make[2]: *** [/usr/src/ibm-acpi-0.6/ibm_acpi.o] Error 1
> | make[1]: *** [_module_/usr/src/ibm-acpi-0.6] Error 2
> | make[1]: Leaving directory `/usr/src/linux-2.6.9'
> | make: *** [default] Error 2
>
> I mailed Boris about this, but he couldn't find a solution. He suspected
> it to be missing kernel headers or another missing package. Could it be
> some cutting-edge gcc or so that is breaking the compile process? I'm
> running kernel 2.6.9, gcc 3.3.5 and make 3.80.

it works fine for me with a self-compiled kernel 2.6.9,
gcc 3.3.4 and make 3.80.  gcc 3.5 is also ok except for a warning:

% make CC=gcc-3.5
...
/usr/local/src/ibm-acpi-0.6/ibm_acpi.c: In function `acpi_evalf':
/usr/local/src/ibm-acpi-0.6/ibm_acpi.c:191: warning: second parameter of `va_sta
...

Have you checked that the kernel contains the right acpi patch?
Maybe it is too new or too old?


Jürgen

-- 
Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91  23D9 BED6 9A7A AF9E 68B4

Looking for consulting and project work in Mozart/Oz, Linux kernel, USB