On Sat, 22 Mar 2008 12:19:52 +0100 Ingo Weinhold <ingo_weinhold@xxxxxx> wrote: > > On 2008-03-21 at 19:32:28 [+0100], Marco Minutoli > <mminutoli@xxxxxxxxx> wrote: > > > > first of all I don't know if this is the right ML for this question > > or there is a more appropriate place to discuss about it. But I > > will give it a shot :). > > If you're a developer and want to discuss the code the developer list > would be better suited. Filing a bug report isn't a bad idea either. > > > Today I was trying to crosscompile a x86 haiku-image on a linux-ppc > > host but the compilation ended complaining about > > __swap_int{16,32,64} undefined in the scope. > > > > Having a look at the source code it seems that the problem is a > > missing header file (ByteOrder.h) so I tried to include it > > producing the attached patch. Is that the right place for including > > that header? > > > > Now the compiler can't find the header so I think I should edit the > > Jamfile to pass the the directory where ByteOrder.h resides to gcc > > but at the moment I don't know how to do it. > > > > I am going to read something about jam but the point is: am I > > moving in the right way or not? :) > > Not quite. :-) > > bfs_endian.h includes system_dependencies.h, which is supposed to > include whatever is needed. The reason for this is that BFS is > compiled for two very different purposes: As Haiku kernel module > (also for the boot loader) and for the build platform's bfs_shell > which is used to create the Haiku image. Unless compiled for the > bfs_shell, system_dependencies.h already includes <ByteOrder.h>, so I > assume the error occurs when compiling for the bfs_shell (BTW, it is > usually helps a lot, if the build output is provided). And indeed > there's a bug in the fs_shell headers. I'll fix that later. > > CU, Ingo > Thank you Ingo for your reply. Yesterday I forgot to attach the file with the compiler error messages. Yes I was compiling the bfs_shell and as you can see in system_dependencies.h if is defined BFS_SHELL there is no inclusion of ByteOrder.h. I am going to open a ticket in short as you suggested and if I manage to fix it myself I'll attach a patch too. I'm not a Haiku developer, but now I've not choice to become one as Salvatore is making my life miserable :). Kidding aside, I'd like to become one. I haven't chosen an area of interest yet but I am reading Dominic's book on BFS it becomes more interesting page after page so maybe I'll start by having a look at the Haiku BFS implementation. Thank you again. Marco