Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292922 - sys-fs/udev-147 cannot find bsg.h which is missing in <=sys-kernel/linux-headers-2.6.28-r1
Summary: sys-fs/udev-147 cannot find bsg.h which is missing in <=sys-kernel/linux-head...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-12 14:51 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2009-11-13 19:35 UTC (History)
1 user (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 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-11-12 14:51:15 UTC
Hi,

udev-147 has its internal bsg.h file removed which leads to an error during compilation when <=sys-kernel/linux-headers-2.6.28-r1 is installed:


  CC     extras/usb_id/usb_id.o 
extras/scsi_id/scsi_serial.c:31:23: error: linux/bsg.h: No such file or directory 
extras/scsi_id/scsi_serial.c:156: warning: ‘struct sg_io_v4’ declared inside parameter list 
extras/scsi_id/scsi_serial.c:156: warning: its scope is only this definition or declaration, which is probably not what you want 
extras/scsi_id/scsi_serial.c: In function ‘sg_err_category4’:
extras/scsi_id/scsi_serial.c:158: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:159: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:159: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:160: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:161: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c: At top level: 
extras/scsi_id/scsi_serial.c:286: warning: ‘struct sg_io_v4’ declared inside parameter list 
extras/scsi_id/scsi_serial.c: In function ‘scsi_dump_v4’: 
extras/scsi_id/scsi_serial.c:288: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:288: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:289: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:297: error: dereferencing pointer to incomplete type 
extras/scsi_id/scsi_serial.c:297: error: dereferencing pointer to incomplete type
extras/scsi_id/scsi_serial.c:297: error: dereferencing pointer to incomplete type
extras/scsi_id/scsi_serial.c:300: error: dereferencing pointer to incomplete type
extras/scsi_id/scsi_serial.c:301: error: dereferencing pointer to incomplete type
extras/scsi_id/scsi_serial.c:302: error: dereferencing pointer to incomplete type
extras/scsi_id/scsi_serial.c: In function ‘scsi_inquiry’:
extras/scsi_id/scsi_serial.c:328: error: storage size of ‘io_v4’ isn’t known 
extras/scsi_id/scsi_serial.c:330: error: invalid application of ‘sizeof’ to incomplete type ‘struct sg_io_v4’
extras/scsi_id/scsi_serial.c:332: error: ‘BSG_PROTOCOL_SCSI’ undeclared (first use in this function) 
extras/scsi_id/scsi_serial.c:332: error: (Each undeclared identifier is reported only once
extras/scsi_id/scsi_serial.c:332: error: for each function it appears in.)
extras/scsi_id/scsi_serial.c:333: error: ‘BSG_SUB_PROTOCOL_SCSI_CMD’ undeclared (first use in this function)
make[2]: *** [extras/scsi_id/scsi_serial.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
 * ERROR: sys-fs/udev-147 failed:

Upgrading to >=sys-kernel/linux-headers-2.6.29 is fixing this problem as those versions install bsg.h 

Reproducible: Always

Steps to Reproduce:
Comment 1 Matthias Schwarzott gentoo-dev 2009-11-13 12:15:06 UTC
According to Kay who removed the file from udev, Kernel >=2.6.23 provide this file.
So it seems this is a bug at linux-headers package, that we can ask to be fixed or just depend on >=sys-kernel/linux-headers-2.6.28-r1.

I played with latest stable, linux-headers-2.6.27-r2 ebuild and found out:
The file bsg.h exists as $S/include/linux/bsg.h, but does not get installed.
Comment 2 SpanKY gentoo-dev 2009-11-13 18:34:06 UTC
that's because linux didnt export it until v2.6.29

commit a229fc61ef0ee3c30fd193beee0eeb87410227f1
Author: Boaz Harrosh <bharrosh@panasas.com>
Date:   Mon Jan 19 10:37:38 2009 +0100

    include/linux: Add bsg.h to the Kernel exported headers

so the fact that the kernel has included it since 2.6.23 is terribly relevant if it wasnt exported to userspace until 2.6.29
Comment 3 Matthias Schwarzott gentoo-dev 2009-11-13 19:35:10 UTC
Added ">=sys-kernel/linux-headers-2.6.29" to DEPEND.