Opened 11 years ago

Closed 11 years ago

#2686 closed bug (fixed)

"failed C++ generated/objects/linux/x86/release/tools/fs_shell/unistd.o "

Reported by: revivaldbm Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

I attempted to compile Haiku and had some trouble. When I typed in and ran jam -q haiku-image this error was shown: "failed C++ generated/objects/linux/x86/release/tools/fs_shell/unistd.o"

Change History (5)

comment:1 by bonefish, 11 years ago

You have to provide more info for this to be helpful, like what platform you're building on (apparently some Linux), with what compiler and cross-compiler, and the complete output "jam" (and its subprocesses) produced.

comment:2 by revivaldbm, 11 years ago

Right then, as you have been able to tell, I'm running Linux, Fedora 9 is the distro, the cross-compiler was 2.95, and the output of jam in full was (without the multiple "patience" messages):

...found 71264 target(s)... ...updating 8244 target(s)... InitScript1 generated/haiku.image-init-vars C++ generated/objects/linux/x86/release/tools/fs_shell/unistd.o src/tools/fs_shell/unistd.cpp:36:23: error: stropts.h: No such file or directory src/tools/fs_shell/unistd.cpp: In function ‘int fssh_ioctl(int, long unsigned int, ...)’: src/tools/fs_shell/unistd.cpp:173: error: ‘ioctl’ was not declared in this scope

cc -c "src/tools/fs_shell/unistd.cpp" -O -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -DFS_SHELL=1 -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -DARCH_x86 -D_NO_INLINE_ASM -DINTEL -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAIKU_HOST_PLATFORM_LINUX -iquote build/user_config_headers -iquote build/config_headers -iquote src/tools/fs_shell -iquote generated/objects/common/tools/fs_shell -iquote generated/objects/linux/x86/common/tools/fs_shell -iquote generated/objects/haiku/x86/common/tools/fs_shell -I headers/build -I headers/build/os -I headers/build/os/kernel -I headers/build/os/storage -I headers/build/os/support -I headers/private/fs_shell -I headers/private/shared -I headers/build/host/linux -o "generated/objects/linux/x86/release/tools/fs_shell/unistd.o" ;

...failed C++ generated/objects/linux/x86/release/tools/fs_shell/unistd.o ... ...skipped <build>fs_shell.a for lack of <build>fs_shell.a(unistd.o)... ...skipped <build>bfs_shell for lack of <build>fs_shell.a... ...skipped <HaikuImage>haiku.image-init-vars for lack of <build>bfs_shell... ...skipped haiku.image for lack of <HaikuImage>haiku.image-init-vars... ...failed updating 1 target(s)... ...skipped 4 target(s)... ...updated 1 target(s)...

in reply to:  2 comment:3 by bonefish, 11 years ago

Replying to revivaldbm:

Right then, as you have been able to tell, I'm running Linux, Fedora 9 is the distro, the cross-compiler was 2.95, and the output of jam in full was (without the multiple "patience" messages):

...found 71264 target(s)... ...updating 8244 target(s)... InitScript1 generated/haiku.image-init-vars C++ generated/objects/linux/x86/release/tools/fs_shell/unistd.o src/tools/fs_shell/unistd.cpp:36:23: error: stropts.h: No such file or directory

Seems to be that the Fedora (or Linux or glibc) folks have made a brilliant move by removing the header which is the POSIXly correct place for the ioctl() prototype: stropts.h. Google turned up this article.

Unless more distributions start removing this header, I don't feel particularly inclined to introduce special-casing for this idiocy. Please just touch /usr/include/stropts.h for the time being.

comment:4 by revivaldbm, 11 years ago

I done so, however it still won't compile: src/tools/fs_shell/unistd.cpp: In function ‘int fssh_ioctl(int, long unsigned int, ...)’: src/tools/fs_shell/unistd.cpp:173: error: ‘ioctl’ was not declared in this scope

I downloaded a copy of stropts.h from koders.com, however there are other header files it requires which I cannot find.

in reply to:  4 comment:5 by bonefish, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev27293. We do now include <sys/ioctl.h> instead, which seems to be the standard in Linux.

Note: See TracTickets for help on using tickets.