Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#3726 closed bug (fixed)

Can't build USB drivers for target R5

Reported by: haiqu Owned by: axeld
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

/boot/src/haiku> TARGET_PLATFORM=r5 jam usb \<usb\>ehci \<usb\>uhci
...found 376 target(s)...
...updating 35 target(s)...
MkDir1 generated/objects/r5/x86/release/add-ons 
MkDir1 generated/objects/r5/x86/release/add-ons/kernel 
MkDir1 generated/objects/r5/x86/release/add-ons/kernel/bus_managers 
MkDir1 generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb 
C++ generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb/usb.o 
In file included from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:1:
/boot/src/haiku/headers/build/HaikuBuildCompatibility.h:148: warning: `B_BAD_DATA' redefined
/boot/develop/headers/be/support/Errors.h:48: warning: this is the location of the previous definition
In file included from /boot/develop/headers/posix/fcntl.h:10,
                 from /boot/develop/headers/be/storage/StorageDefs.h:9,
                 from /boot/develop/headers/be/kernel/OS.h:13,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h:10,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb_p.h:13,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:11:
/boot/develop/headers/posix/sys/stat.h:93: warning: `DEFFILEMODE' redefined
/boot/src/haiku/headers/build/HaikuBuildCompatibility.h:45: warning: this is the location of the previous definition
In file included from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usbspec_p.h:13,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb_p.h:14,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:11:
/boot/src/haiku/headers/os/drivers/KernelExport.h:91: warning: `B_KERNEL_READ_AREA' redefined
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h:106: warning: this is the location of the previous definition
/boot/src/haiku/headers/os/drivers/KernelExport.h:92: warning: `B_KERNEL_WRITE_AREA' redefined
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h:108: warning: this is the location of the previous definition
In file included from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb_p.h:13,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:11:
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h:17: parse error before `('
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp: In function `int debug_get_pipe_for_id(int, char **)':
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:25: implicit declaration of function `int is_debug_variable_defined(...)'
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:28: implicit declaration of function `int get_debug_variable(...)'
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:33: implicit declaration of function `int set_debug_variable(...)'

gcc -c "src/add-ons/kernel/bus_managers/usb/usb.cpp" -O2 -Wall -Wno-trigraphs -Wno-multichar -include headers/build/HaikuBuildCompatibility.h -fno-rtti -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -finline -fno-builtin -fno-exceptions -DBOCHS_DEBUG_HACK=0 -D_KERNEL_MODE -D_KERNEL_MODE -DARCH_x86 -D_NO_INLINE_ASM -DCOMPILE_FOR_R5 -DHAIKU_TARGET_PLATFORM_BEOS -Ibuild/user_config_headers -Ibuild/config_headers -Isrc/add-ons/kernel/bus_managers/usb -Igenerated/objects/common/add-ons/kernel/bus_managers/usb -Igenerated/objects/r5/x86/common/add-ons/kernel/bus_managers/usb -Igenerated/objects/r5/x86/common/add-ons/kernel/bus_managers/usb -I- -Isrc/add-ons/kernel/bus_managers/usb -Iheaders/private/kernel -Iheaders/os/drivers -Iheaders/build/host/r5 -Iheaders/build/host/beos_common -o "generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb/usb.o" ;

...failed C++ generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb/usb.o ...

et cetera ...

Change History (9)

comment:1 by mmlr, 16 years ago

Resolution: fixed
Status: newclosed

Made it compile again in hrev30064. Support will be removed soon though. Note that you shouldn't use TARGET_PLATFORM=hrev5 if you actually are on Dano. Use the target platforms hrev5, bone or dano respectively.

comment:2 by haiqu, 16 years ago

Component: - GeneralBuild System
Platform: Allx86

Can a working build be created before support is removed? I just tried the package on mlotz's site and it didn't work under 5.0.3 Pro.

in reply to:  2 comment:3 by mmadia, 16 years ago

Replying to haiqu:

Can a working build be created before support is removed? I just tried the package on mlotz's site and it didn't work under 5.0.3 Pro.

This particular svn revision can always be checked out on a future date. So, building a R5/Zeta package could wait for an indefinite amount of time.

comment:4 by haiqu, 16 years ago

Resolution: fixed
Status: closedreopened

Still broken, also tried the scsi bus module and that failed too.

Using the standard compiler for BeOS as referenced on haiku_os.org

comment:5 by mmlr, 16 years ago

Ehm, sorry but I built it on BeOS after the mentioned commit, so I am absolutely sure it works. If it doesn't for you then please include enough information to at least guess where the problem could be. Things like exact build platform and build output.

comment:6 by haiqu, 16 years ago

System:

BeOS 5.0.3 Pro GCC from Oliver Tappe at http://www.bebits.com/app/4011 (the 2.95 build)

$ TARGET_PLATFORM=r5 jam usb \<usb\>ehci \<usb\>uhci
...found 419 target(s)...
...updating 4 target(s)...
C++ generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb/usb.o
In file included from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usbspec_p.h:13,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb_p.h:14,
                 from /boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:11:
/boot/src/haiku/headers/os/drivers/KernelExport.h:91: warning: `B_KERNEL_READ_AREA' redefined
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h:106: warning: this is the location of the previous definition
/boot/src/haiku/headers/os/drivers/KernelExport.h:92: warning: `B_KERNEL_WRITE_AREA' redefined
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h:108: warning: this is the location of the previous definition
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp: In function `int32 bus_std_ops(long int, ...)':
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:89: `shared' undeclared (first use this function)
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:89: (Each undeclared identifier is reported only once
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:89: for each function it appears in.)
/boot/src/haiku/src/add-ons/kernel/bus_managers/usb/usb.cpp:89: `address' undeclared (first use this function)

gcc -c "src/add-ons/kernel/bus_managers/usb/usb.cpp" -O2 -Wall -Wno-trigraphs -Wno-multichar -include headers/build/HaikuBuildCompatibility.h -fno-rtti -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -finline -fno-builtin -fno-exceptions -DBOCHS_DEBUG_HACK=0 -D_KERNEL_MODE -D_KERNEL_MODE -DARCH_x86 -D_NO_INLINE_ASM -DCOMPILE_FOR_R5 -DHAIKU_TARGET_PLATFORM_BEOS -Ibuild/user_config_headers -Ibuild/config_headers -Isrc/add-ons/kernel/bus_managers/usb -Igenerated/objects/common/add-ons/kernel/bus_managers/usb -Igenerated/objects/r5/x86/common/add-ons/kernel/bus_managers/usb -Igenerated/objects/r5/x86/common/add-ons/kernel/bus_managers/usb -I- -Isrc/add-ons/kernel/bus_managers/usb -Iheaders/private/kernel -Iheaders/os/drivers -Iheaders/build/host/r5 -Iheaders/build/host/beos_common -o "generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb/usb.o" ;

...failed C++ generated/objects/r5/x86/release/add-ons/kernel/bus_managers/usb/usb.o ...
...skipped usb for lack of <src!add-ons!kernel!bus_managers!usb>usb.o...
...failed updating 1 target(s)...
...skipped 1 target(s)...
Link generated/objects/r5/x86/release/add-ons/kernel/busses/usb/ehci
XRes1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/ehci
SetType1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/ehci
MimeSet1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/ehci
SetVersion1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/ehci
Chmod1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/ehci
...updated 1 target(s)...
Link generated/objects/r5/x86/release/add-ons/kernel/busses/usb/uhci
XRes1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/uhci
SetType1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/uhci
MimeSet1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/uhci
SetVersion1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/uhci
Chmod1 generated/objects/r5/x86/release/add-ons/kernel/busses/usb/uhci
...updated 1 target(s)...
$ 

comment:7 by haiqu, 16 years ago

OK, I've fixed this myself.

usb.cpp line 49

  • #ifndef should be #ifdef

usb_scsi.c lines 980, 993, 1006, 1031 and 1042

  • device_node_handle should be device_node *

Rob

comment:8 by mmlr, 16 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in hrev30141. The usb_scsi module is not compatible anymore and building it for BeOS is not supported anymore. You should however be able to use one of the old compiled packages from BeBits for example.

comment:9 by haiqu, 16 years ago

Actually after severe testing last night I couldn't get any of those drivers to work, and the last known good version is at http://haiku.mlotz.ch/

Note: See TracTickets for help on using tickets.