[openbeos] Re: Build error: bfs.h error: cast from ‘const small_data*’ to ‘fssh_addr_t’ loses precision

  • From: Raymond Rodgers <obos@xxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 08 Apr 2008 07:28:20 -0700

Oliver Tappe wrote:
Hi Raymond,

Raymond Rodgers schrieb:

[ ... ]

So either my linux32 executable doesn't currently work, or perhaps
there's something else about my system that the build process doesn't
like at the moment.

You should be able to test if linux32 works by doing this:

    uname -m
    linux32 sh
    uname -m

Depending on the linux-distro you're using, I'd assume that the first uname
prints 'x86_64' or 'amd64' and the second one should print something like i686
or i586.

Does that work?

cheers,
   Oliver

Hi Oliver,
Yes it does work and that was one thing I tested (slightly differently; I used -a instead of -m) first. Anyway, here's the actual output from my machine:

[rrodgers@logan boinc]$ cd ../haiku/haiku/
[rrodgers@logan haiku]$ uname -m
x86_64
[rrodgers@logan haiku]$ linux32
-sh-3.2$ uname -m
i686
-sh-3.2$ jam -q haiku-image
[snip]
...patience...
...found 70459 target(s)...
...updating 8715 target(s)...
InitScript1 generated/haiku.image-init-vars
C++ generated/objects/linux/x86/release/tools/bfs_shell/bfs_disk_system.o
src/add-ons/kernel/file_systems/bfs/bfs.h: In member function ‘bool small_data::IsLast(const bfs_inode*) const’: src/add-ons/kernel/file_systems/bfs/bfs.h:375: error: cast from ‘const small_data*’ to ‘fssh_addr_t’ loses precision src/add-ons/kernel/file_systems/bfs/bfs.h:375: error: cast from ‘const bfs_inode*’ to ‘fssh_addr_t’ loses precision

cc -c "src/add-ons/kernel/file_systems/bfs/bfs_disk_system.cpp" -O1 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -DBFS_SHELL -Wall -Wno-multichar -fno-rtti -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -DARCH_x86 -D_NO_INLINE_ASM -D__INTEL__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DHAIKU_HOST_PLATFORM_LINUX -iquote build/user_config_headers -iquote build/config_headers -iquote src/tools/bfs_shell -iquote generated/objects/common/tools/bfs_shell -iquote generated/objects/linux/x86/common/tools/bfs_shell -iquote generated/objects/haiku/x86/common/tools/bfs_shell -iquote src/add-ons/kernel/file_systems/bfs -I headers/private/fs_shell -I headers/build/host/linux -o "generated/objects/linux/x86/release/tools/bfs_shell/bfs_disk_system.o" ;

...failed C++ generated/objects/linux/x86/release/tools/bfs_shell/bfs_disk_system.o ... ...skipped <build>bfs_shell for lack of <src!tools!bfs_shell>bfs_disk_system.o...
...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 3 target(s)...
...updated 1 target(s)...
-sh-3.2$


It may be that linux32 is indeed broken in some bizarre way on this machine, but up until a couple of weeks ago, I had no problem building Haiku. It may be that some change from Fedora 9 drifted down into Fedora 8's updates and broke it, or it may just be some corruption on my machine. I have no idea. I actually got the build to complete on a Debian installation I have running in VirtualPC 2007 under Windows, so I really have to think that it's something related to 64-bit Linux despite the linux32 command.

Raymond

Other related posts: