Cannot compile a driver due to missing files in linux-source

Bug #114218 reported by TomasHnyk
2
Affects Status Importance Assigned to Milestone
linux-meta (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: linux-source

I am using Feisty stable.
I tried to compile the new http://http//sourceforge.net/projects/sdricohcs/ driver in order to make my SD card reader work. Requirements according to the README
kernel-default >= 2.6.18
gcc
make
kernel-source
kernel-syms
I figured what I was needing was either linux-source or linux-headers, so I installed both (BTW:linux source was a tar file I had to manually untar, should I fill that as a specific bug?). When I tried to compile the driver, I got following error:
make -C /lib/modules/2.6.20-15-generic/build SUBDIRS=/home/tom/Desktop/sdricohcs/sdricoh_cs modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
  CC [M] /home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.o
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:39:32: error: linux/mmc/protocol.h: No such file or directory
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c: In function ‘sdricoh_reset’:
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:228: error: ‘MMC_GO_IDLE_STATE’ undeclared (first use in this function)
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:228: error: (Each undeclared identifier is reported only once
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:228: error: for each function it appears in.)
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:234: error: ‘MMC_APP_CMD’ undeclared (first use in this function)
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c: In function ‘sdricoh_request’:
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:321: error: ‘SD_APP_SEND_SCR’ undeclared (first use in this function)
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:354: error: ‘MMC_SELECT_CARD’ undeclared (first use in this function)
/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.c:355: error: ‘MMC_APP_CMD’ undeclared (first use in this function)
make[2]: *** [/home/tom/Desktop/sdricohcs/sdricoh_cs/sdricoh_cs.o] Error 1
make[1]: *** [_module_/home/tom/Desktop/sdricohcs/sdricoh_cs] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make: *** [default] Error 2

I indeed did not find linux/mmc/protocol.h anywhere on my system. I know that Ubuntu does not guarantee custom compiles of a kernel, but this is just a driver and I do not understand how the file got excluded. Anyway, I am afraid that file should be there.
Related ubuntuforums and linuxquestion threads:
http://ubuntuforums.org/showthread.php?p=2635598
http://www.linuxquestions.org/questions/showthread.php?t=552086
P.S.:this might be a bug in linux-headers as well.

Revision history for this message
Ben Collins (ben-collins) wrote :

It's not us, it's that upstream kernel does not guarantee stable API, so this driver might not be compatible with 2.6.20 kernels.

Changed in linux-meta:
status: Unconfirmed → Rejected
Revision history for this message
TomasHnyk (sup) wrote :

it is, it needs (according to the readme) 2.6.18 or higher. I do not understand how the file dropped out. However, I guess I can wait for Gutsy, there it should work out of the box, I hope.

Revision history for this message
jevgtv (tugevus) wrote :
Download full text (4.9 KiB)

I experience the same problem in 12.04

jevgtv@jevgtv-HP-Compaq-6910p ~ $ cd Downloads/
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads $ cd ricoh_xd_3/
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/ricoh_xd_3 $ ./make && sudo make install && sudo make load
bash: ./make: No such file or directory
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/ricoh_xd_3 $ make
make -C /lib/modules/3.2.0-23-generic/build M=/home/jevgtv/Downloads/ricoh_xd_3
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-23-generic'
  LD /home/jevgtv/Downloads/ricoh_xd_3/nand/built-in.o
  CC [M] /home/jevgtv/Downloads/ricoh_xd_3/nand/nand_base.o
In file included from /home/jevgtv/Downloads/ricoh_xd_3/nand/nand_base.c:42:0:
/home/jevgtv/Downloads/ricoh_xd_3/include/linux/mtd/mtd.h:16:33: fatal error: linux/mtd/compatmac.h: No such file or directory
compilation terminated.
make[3]: *** [/home/jevgtv/Downloads/ricoh_xd_3/nand/nand_base.o] Error 1
make[2]: *** [/home/jevgtv/Downloads/ricoh_xd_3/nand] Error 2
make[1]: *** [_module_/home/jevgtv/Downloads/ricoh_xd_3] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-23-generic'
make: *** [build] Error 2
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/ricoh_xd_3 $ ./configure
bash: ./configure: No such file or directory
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/ricoh_xd_3 $ ./make && sudo make install && sudo make load
bash: ./make: No such file or directory
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/ricoh_xd_3 $ sudo !!
sudo ./make && sudo make install && sudo make load
[sudo] password for jevgtv:
sudo: ./make: command not found
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/ricoh_xd_3 $ cd
jevgtv@jevgtv-HP-Compaq-6910p ~ $ cd Downloads/
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads $ cd sdricoh_cs-0.1.4/
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/sdricoh_cs-0.1.4 $ make
make -C /lib/modules/3.2.0-23-generic/build SUBDIRS=/home/jevgtv/Downloads/sdricoh_cs-0.1.4 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-23-generic'
  CC [M] /home/jevgtv/Downloads/sdricoh_cs-0.1.4/sdricoh_cs.o
/home/jevgtv/Downloads/sdricoh_cs-0.1.4/sdricoh_cs.c:34:29: fatal error: pcmcia/cs_types.h: No such file or directory
compilation terminated.
make[2]: *** [/home/jevgtv/Downloads/sdricoh_cs-0.1.4/sdricoh_cs.o] Error 1
make[1]: *** [_module_/home/jevgtv/Downloads/sdricoh_cs-0.1.4] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-23-generic'
make: *** [default] Error 2
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/sdricoh_cs-0.1.4 $ make install
if test ! -d /lib/modules/3.2.0-23-generic/kernel/drivers/mmc ; then mkdir -p /lib/modules/3.2.0-23-generic/kernel/drivers/mmc ; fi
install -D -m 644 *.ko /lib/modules/3.2.0-23-generic/kernel/drivers/mmc
install: cannot stat `*.ko': No such file or directory
make: *** [install] Error 1
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/sdricoh_cs-0.1.4 $ sudo modprobe sdricoh_cs
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/sdricoh_cs-0.1.4 $ lsmod | grep ricohsdricoh_cs 12953 0
pcmcia 39791 2 sdricoh_cs,pata_pcmcia
jevgtv@jevgtv-HP-Compaq-6910p ~/Downloads/sdricoh_cs-0.1.4 $ lspci | grep Ricoh
02:06.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b9)
02:06.1 CardBus bri...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.