On Thu, 26 Apr 2012 15:47:57 +0200 KewlCat kewlcat.fr@gmail.com wrote:
Hello
I've tried to compile flashrom-0.9.5.2 on a Slackware (-current) with kernel 3.2.13 but I encountered this error :
cc -MMD -Os -Wall -Wshadow -Werror -D'CONFIG_INTERNAL=1' -D'CONFIG_SERPROG=1' -D'CONFIG_RAYER_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_NIC3COM=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICREALTEK=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_SATAMV=1' -D'CONFIG_LINUX_SPI=1' -D'NEED_PCI=1' -D'HAVE_UTSNAME=1' -D'FLASHROM_VERSION="0.9.5.2-r1515"' -o linux_spi.o -c linux_spi.c In file included from linux_spi.c:27:0: /usr/include/linux/spi/spidev.h:83:2: error: unknown type name ‘__u64’ /usr/include/linux/spi/spidev.h:84:2: error: unknown type name ‘__u64’ /usr/include/linux/spi/spidev.h:86:2: error: unknown type name ‘__u32’ /usr/include/linux/spi/spidev.h:87:2: error: unknown type name ‘__u32’ /usr/include/linux/spi/spidev.h:89:2: error: unknown type name ‘__u16’ /usr/include/linux/spi/spidev.h:90:2: error: unknown type name ‘__u8’ /usr/include/linux/spi/spidev.h:91:2: error: unknown type name ‘__u8’ /usr/include/linux/spi/spidev.h:92:2: error: unknown type name ‘__u32’ linux_spi.c: In function ‘linux_spi_init’: linux_spi.c:93:17: error: ‘__u32’ undeclared (first use in this function) linux_spi.c:93:17: note: each undeclared identifier is reported only once for each function it appears in linux_spi.c:102:16: error: ‘__u8’ undeclared (first use in this function) make: *** [linux_spi.o] Error 1
... so I started looking around and found the fix : I added #include <linux/types.h> before #include <linux/spi/spidev.h>, line 27 of flashrom-0.9.5.2/linux_spi.c
It now compiles and works.
afaics this should not be necessary at all. the header in http://packages.slackverse.org/?v=3&p=316 includes linux/types.h itself at the top (as expected). can you explain why yours does not?
... well, mostly. I have this message telling me that Intel H67 chipset is supported but since the motherboard is not on your wiki, I thought i'd send you the log ;-) If you can do something for me, please let me know. I'd be very interested in being able to flash my motherboard without fiddling with bottable floppy
- iso images !
a part of the flash is locked down, we wont support this in the foreseeable future, sorry. ill add your board to the wiki shortly.
On Fri, 2012-04-27 at 01:45 +0200, Stefan Tauner wrote:
... so I started looking around and found the fix : I added #include <linux/types.h> before #include <linux/spi/spidev.h>, line 27 of flashrom-0.9.5.2/linux_spi.c
It now compiles and works.
afaics this should not be necessary at all. the header in http://packages.slackverse.org/?v=3&p=316 includes linux/types.h itself at the top (as expected). can you explain why yours does not?
Old kernel headers. We already fixed that incompatibility in r1517, which is shortly after 0.9.5.2
Regards, Michael Karcher
On Fri, Apr 27, 2012 at 7:56 AM, Michael Karcher < flashrom@mkarcher.dialup.fu-berlin.de> wrote:
On Fri, 2012-04-27 at 01:45 +0200, Stefan Tauner wrote:
... so I started looking around and found the fix : I added #include <linux/types.h> before #include <linux/spi/spidev.h>, line 27 of flashrom-0.9.5.2/linux_spi.c
It now compiles and works.
afaics this should not be necessary at all. the header in http://packages.slackverse.org/?v=3&p=316 includes linux/types.h itself at the top (as expected). can you explain why yours does not?
Old kernel headers. We already fixed that incompatibility in r1517, which is shortly after 0.9.5.2
Oh my...
% ls -l /usr/include/linux/spi/spidev.h -rw-r--r-- 1 root root 4595 Nov 14 2008 /usr/include/linux/spi/spidev.h
2008 !?! You are absolutely right.
% grep LINUX_VERSION_CODE /usr/include/linux/version.h #define LINUX_VERSION_CODE 132635
That's version 2.6.27 ! I'll have a look around.
Thanks for guessing my issue, and thanks for the fix "maybe superfluous but just in case". And thanks for the explanation about the motherboard ;-)
Sincerely, =^.^=