[openbeos] Re: Misc. problems building Haiku on Linux

On Sun, 13 Nov 2005, Oliver Tappe wrote:
On 2005-11-13 at 19:34:47 [+0100], Ingo Weinhold wrote:
On 2005-11-13 at 17:42:03 [+0100], Vegard Wærp wrote:
Some are having problems building the cross tools, with the build
failing with:

from /home/kane/haiku-src/buildtools/binutils/gas/app.c:30:
/home/kane/haiku-src/buildtools/binutils/gas/config/tc-i386.h:451:
error: array type has incomplete element type
[...]
This one has been reported both on Ubuntu and Fedora. Don't know which
versions though.

The Linux distro isn't that interesting. I expect most problems depending on the compiler version. I've tested things with the older gcc 3.3.4. The 3.4.* series is stricter and the the 4.0.* series even more so. In this case I suspect gcc 4 has been used. Maybe we can update our gas/binutils. Oliver, are you listening? Would you deem that unwise?

Yep, I'm listening >;o)

Something at the back of my head is telling me that there was some problem
with binutils > 2.15, but currently I can't remember what it was (maybe it
was an incompatible interface change in ehopt.c [of which we use an old,
forward-ported version], maybe it was something else). I guess the only way
to find out is to try the update >:o/

Mmh, considering how much time you spent to "fine-tune" the binutils-gcc combo, I don't feel so motivated to experiment with newer binutils in this context. I think I'll rather move this binutils version + gcc 2.95.3 into a subdirectory "legacy" and import a current binutils version alongside with gcc 4, renaming the "gcc4" directory to just "gcc".


Having looked into the mentioned problem just now, I suppose the problem
could be fixed by moving the definition of struct relax_type from tc.h to
as.h (where, according to a comment in tc.h, it used to live at some time
in the past). I think the theory mentioned in the comment at tc.h:28 is no
longer true (with gcc4), so we might just as well move the definition back
into as.h.

Could someone that has encountered the mentioned build issue with gcc4
please refer to the enclosed patch and tell me if that fixes it?

I've just updated my gcc under Linux to 4.0.2 and could reproduce the problem and also verified that the patch fixes it. Both binutils and gcc 2.95.3 build just fine here now (SuSE 9.2). Shall I check your patch in, or do you want to do it?


I've fixed the problems in the Haiku tree that I encountered when building with host gcc 4, so that I hope the people who reported problems can now build Haiku, too. If not, please let me know.

On related news, building Haiku with a gcc 4.0.2 cross-compiler is supported now (configure option "--build-cross-tools-gcc4") -- under Linux at least; I haven't tried BeOS yet. The resulting Haiku image is not binary compatible with BeOS R5 (due to ABI changes).

My next steps on the gcc 4 front will be to clone the i586-pc-beos configurations of binutils and gcc to i586-pc-haiku, create powerpc-???-haiku (any idea about the middle part?) configurations and get cross compilation for those working...

CU, Ingo

Other related posts: