[haiku-development] Re: SecondaryArchitecture compiler broken OS headers

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 12 Jan 2014 15:21:07 +0100

On 01/12/2014 03:19 AM, kallisti5@xxxxxxxxxxx wrote:
I just realized that the HaikuPorts build system doesn't pick up on
secondary architecture os headers.

For example, gcc would generally be pre-configured to look for
/boot/system/develop/headers/os

However, mesa_x86 for example installs its headers to
/boot/system/develp/headers/x86/os (done by HaikuPorter)

Building libSDL2_x86 fails missing #include <OpenGLKit.h> as it doesn't
exist in /boot/system/develop/headers/os but
/boot/system/develop/headers/x86/os

Looking at HaikuPorter, runConfigure adds the following include directory:
'includeDir':       'develop/headers' + secondaryArchSubDir,

We could go about adding another includeDir to the configure options,

That actually means something different. It's the place where the build system installs include files.

however shouldn't secondary architecture compilers be looking in
/boot/system/develop/headers/x86/os as well as
/boot/system/develop/headers/os? (likely x86/os should be first)

So far the OS headers have been architecture safe/aware, so there has been no need to consider an <arch>/os directory.

Since the OpenGL kit is no longer part of the core system (and could theoretically be installed in home), I think the best solution would be to not put the headers in an "os" subdirectory in the first place. Alas, due to Be's unfortunate decision to allow (and even prefer) including kit specific headers without specifying the kit directory (i.e. for example "#include <GLView.h>" instead of "#include <opengl/GLView.h>"), this would still not solve all problems.

So that leaves two options: 1. Do it that way and ignore the remaining issues, i.e. require client code to be adjusted (unless only <OpenGLKit.h> is included). 2. Add the <arch>/os[/opengl] search paths to gcc [1,2].

In the former (or maybe either) case I would pull the GL subdirectory out of opengl.

CU, Ingo

[1] http://cgit.haiku-os.org/buildtools/tree/legacy/gcc/gcc/config/i386/haiku.h#n361
[2] http://cgit.haiku-os.org/buildtools/tree/gcc/gcc/config/haiku.h#n71



Other related posts: