Unable to build lirc_gpio module

Bug #53111 reported by Mazirian on 2006-07-16
6
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Medium
Kees Cook

Bug Description

Binary package hint: lirc-modules-source

The gpio module from the lirc-modules-source package appears to be unbuildable.

I have the following packages installed from the dapper repositories:

sudo dpkg -l | grep lirc
liblircclient-dev 0.7.1pre2-11ubuntu1
liblircclient0 0.7.1pre2-11ubuntu1
lirc 0.7.1pre2-11ubuntu1
lirc-modules-source 0.7.1pre2-11ubuntu1
lirc-x 0.7.1pre2-11ubuntu1

Output of uname -a:

Linux phandaal 2.6.15-26-k7 #1 SMP PREEMPT Fri Jul 7 20:10:15 UTC 2006 i686 GNU/Linux

After extracting the lirc-modules-source tarball to /usr/src, I ran...

sudo dpkg-reconfigure lirc-modules-source

...and selected the gpio module. I verified that /etc/lirc/lirc-modules-source.conf was properly written. Then I performed the following steps to build the module:

modules-assistant fakesource
sudo module-assistant --text-mode --kernel-dir /usr/src/linux-source-2.6.15-26-k7 build lirc.

The relevant error output is below, but I note, first, that I attempted to build this module without m-a, using the directions contained in the README included with the lirc-modules-source package, which steps also resulted in failure.

Making all in lirc_gpio
make[3]: Entering directory `/usr/src/modules/lirc/drivers/lirc_gpio'
mv Makefile Makefile.automake
cp ../Makefile.kernel Makefile
/usr/bin/make -C /usr/src/linux-source-2.6.15-26-k7 SUBDIRS=/usr/src/modules/lirc/drivers/lirc_gpio modules \
  KBUILD_VERBOSE=1
make[4]: Entering directory `/usr/src/linux-source-2.6.15-26-k7'
mkdir -p /usr/src/modules/lirc/drivers/lirc_gpio/.tmp_versions
/usr/bin/make -f scripts/Makefile.build obj=/usr/src/modules/lirc/drivers/lirc_gpio
  gcc -m32 -Wp,-MD,/usr/src/modules/lirc/drivers/lirc_gpio/.lirc_gpio.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.0.3/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -DIRCTL_DEV_MAJOR=61 -DEXPORT_SYMTAB -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/src/modules/lirc/drivers/lirc_gpio/../.. -I /usr/src/linux-source-2.6.15-26-k7/include/ -DMODULE -DKBUILD_BASENAME=lirc_gpio -DKBUILD_MODNAME=lirc_gpio -c -o /usr/src/modules/lirc/drivers/lirc_gpio/.tmp_lirc_gpio.o /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:71: error: âBTTV_UNKNOWNâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:79:1: warning: "dprintk" redefined
In file included from /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:53:
include/../drivers/media/video/bttvp.h:227:1: warning: this is the location of the previous definition
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:98: error: âBTTV_PXELVWPLTVPAKâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:99: error: âBTTV_PXELVWPLTVPROâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:100: error: âBTTV_PV_BT878P_9Bâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:101: error: âBTTV_PV_BT878P_PLUSâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:102: error: âBTTV_AVERMEDIAâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:103: error: âBTTV_AVPHONE98â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:104: error: âBTTV_AVERMEDIA98â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:112: error: âBTTV_CHRONOS_VS2â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:115: error: âBTTV_MIROâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:116: error: âBTTV_DYNALINKâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:117: error: âBTTV_WINVIEW_601â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:122: error: âBTTV_MAGICTVIEW061â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:123: error: âBTTV_MAGICTVIEW063â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:124: error: âBTTV_PHOEBE_TVMASâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:130: error: âBTTV_FLYVIDEOâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:131: error: âBTTV_FLYVIDEO_98â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:132: error: âBTTV_TYPHOON_TVIEWâ undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:142: error: âBTTV_WINFAST2000â undeclared here (not in a function)
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c: In function âbuild_keyâ:
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:191: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:223: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:229: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:240: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:242: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:243: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:244: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:256: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:257: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:258: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:265: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:266: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:267: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:268: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:269: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:270: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:294: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:297: warning: case label value exceeds maximum value for type
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c: In function âinit_moduleâ:
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:473: warning: comparison between pointer and integer
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:495: warning: comparison between pointer and integer
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:496: warning: statement with no effect
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:498: warning: comparison between pointer and integer
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:499: warning: statement with no effect
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:501: warning: comparison between pointer and integer
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:502: warning: statement with no effect
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:504: warning: comparison between pointer and integer
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:505: warning: statement with no effect
make[5]: *** [/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.o] Error 1
make[4]: *** [_module_/usr/src/modules/lirc/drivers/lirc_gpio] Error 2
make[4]: Leaving directory `/usr/src/linux-source-2.6.15-26-k7'
make[3]: *** [lirc_gpio.o] Error 2
make[3]: Leaving directory `/usr/src/modules/lirc/drivers/lirc_gpio'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/modules/lirc/drivers'
make[1]: *** [gpio] Error 2
make[1]: Leaving directory `/usr/src/modules/lirc'
make: *** [build-stamp] Error 2
BUILD FAILED!

Brian Rogers (brian-rogers) wrote :

Confirmed on Edgy, although I am getting an error message about missing headers:
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:56:41: error: ../drivers/media/video/bttv.h: No such file or directory
/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:57:42: error: ../drivers/media/video/bttvp.h: No such file or directory

Changed in lirc:
status: Unconfirmed → Confirmed

You'd get that error probably if you building against the kernel headers
rather than the full kernel sources. This problem is most definitely
fixed in lirc_0.8.0-5ubuntu1 and the work around for me was to grab the
source package for lirc (which contains the lirc-odules) and then use
modules-assistant to build the modules and debuild to build the lirc
package. There really needs to be a backport of the lirc packages in
dapper.

On Sat, 2006-09-09 at 14:02 +0000, Brian Rogers wrote:
> Confirmed on Edgy, although I am getting an error message about missing headers:
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:56:41: error: ../drivers/media/video/bttv.h: No such file or directory
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:57:42: error: ../drivers/media/video/bttvp.h: No such file or directory
>
>
> ** Changed in: lirc (Ubuntu)
> Status: Unconfirmed => Confirmed
>
--
Bradford R. Bowman
<email address hidden>

foolofatook (foolofatook) wrote :

I can confirm the problem that Brian Rogers reported on Edgy. My work-around was a little different than Mazirian's. Disclaimer: this may not be the "right" way to do it; I'm new at building kernel modules.

To get the missing files, I installed and unbzipped the kernel souces

  sudo apt-get install linux-source
  cd /usr/src
  sudo bzcat linux-source-2.6.17.tar.bz2 | sudo tar xv

Then I copied the missing files into the kernel headers area:

  cd /usr/src/linux-source-2.6.17/drivers/media/video/bt8xx
  sudo cp -a * /usr/src/linux/drivers/media/video/bt8xx/
  cd /usr/src/linux/drivers/media/video
  sudo cp bt8xx/bt* .

Then rebuilding with module-assistant I got another error.

include/../drivers/media/video/bttvp.h:51:23: error: btcx-risc.h: No such file or directory

I fixed this in a similar way:

  cd /usr/src/linux-source-2.6.17/drivers/media/video
  sudo cp -a btcx-risc.h /usr/src/linux/drivers/media/video

This allowed the module-assistant build to work:

  sudo m-a a-i lirc

Kees Cook (kees) wrote :

This will be fixed in Feisty shortly.

Changed in lirc:
assignee: nobody → keescook
importance: Undecided → Medium
status: Confirmed → Fix Committed
Kees Cook (kees) wrote :

This should be fixed with the latest upload of lirc to feisty.

Changed in lirc:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers