[haiku-development] SecondaryArchitecture compiler broken OS headers

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 11 Jan 2014 20:19:23 -0600

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, 
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)

GCC2 primary  -  gcc -xc++ -E -v -
---------------------------------------------------
GNU CPP version 2.95.3-haiku-2013_08_15 (i386 Haiku/ELF)
using priority 5
#include "..." search starts here:
#include <...> search starts here:
 
/packages/gcc-2.95.3_2013_08_15-2/.self/develop/tools/lib/gcc-lib/i586-pc-ha
iku/2.95.3-haiku-2013_08_15/../../../../include/g++
 
/packages/gcc-2.95.3_2013_08_15-2/.self/develop/tools/lib/gcc-lib/i586-pc-ha
iku/2.95.3-haiku-2013_08_15/include
 /boot/system/develop/headers/os
 /boot/system/develop/headers/os/app
 /boot/system/develop/headers/os/device
 /boot/system/develop/headers/os/drivers
 /boot/system/develop/headers/os/game
 /boot/system/develop/headers/os/interface
 /boot/system/develop/headers/os/kernel
 /boot/system/develop/headers/os/locale
 /boot/system/develop/headers/os/mail
 /boot/system/develop/headers/os/media
 /boot/system/develop/headers/os/midi
 /boot/system/develop/headers/os/midi2
 /boot/system/develop/headers/os/net
 /boot/system/develop/headers/os/storage
 /boot/system/develop/headers/os/support
 /boot/system/develop/headers/os/translation
 /boot/system/develop/headers/os/add-ons/graphics
 /boot/system/develop/headers/os/add-ons/input_server
 /boot/system/develop/headers/os/add-ons/screen_saver
 /boot/system/develop/headers/os/add-ons/tracker
 /boot/system/develop/headers/os/be_apps/Deskbar
 /boot/system/develop/headers/os/be_apps/NetPositive
 /boot/system/develop/headers/os/be_apps/Tracker
 /boot/system/develop/headers/3rdparty
 /boot/system/develop/headers/bsd
 /boot/system/develop/headers/glibc
 /boot/system/develop/headers/gnu
 /boot/system/develop/headers/posix
 /boot/system/develop/headers
End of search list.
The following default directories have been omitted from the search path:
 /boot/common/non-packaged/develop/headers
 /boot/common/develop/headers
 /boot/system/develop/headers/os/opengl
End of omitted list.

GCC4 secondary  -  gcc-x86 -xc++ -E -v -
---------------------------------------------------
gcc version 4.7.3 (2013_08_12) 
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=pentium' '-march=pentium'
 /boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/cc1plus 
-E -quiet -v -iprefix 
/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/ - -fpic 
-Wno-multichar -mtune=pentium -march=pentium -Wno-ctor-dtor-privacy
ignoring nonexistent directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/../../../
../i586-pc-haiku/include"
ignoring duplicate directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/../../lib/gcc/i586-pc-haiku/4
.7.3/../../../../include/c++/4.7.3"
ignoring duplicate directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/../../lib/gcc/i586-pc-haiku/4
.7.3/../../../../include/c++/4.7.3/i586-pc-haiku"
ignoring duplicate directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/../../lib/gcc/i586-pc-haiku/4
.7.3/../../../../include/c++/4.7.3/backward"
ignoring duplicate directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/../../lib/gcc/i586-pc-haiku/4
.7.3/include"
ignoring duplicate directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/../../lib/gcc/i586-pc-haiku/4
.7.3/include-fixed"
ignoring nonexistent directory 
"/boot/system/develop/tools/x86/bin/../lib/gcc/../../lib/gcc/i586-pc-haiku/4
.7.3/../../../../i586-pc-haiku/include"
ignoring nonexistent directory 
"/boot/common/non-packaged/develop/headers/x86"
ignoring nonexistent directory "/boot/common/develop/headers/x86"
ignoring nonexistent directory "/boot/system/develop/headers/os/opengl"
#include "..." search starts here:
#include <...> search starts here:
 
/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/../../../.
./include/c++/4.7.3
 
/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/../../../.
./include/c++/4.7.3/i586-pc-haiku
 
/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/../../../.
./include/c++/4.7.3/backward
 /boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/include
 
/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/4.7.3/include-fi
xed
 /boot/system/develop/headers/os
 /boot/system/develop/headers/os/app
 /boot/system/develop/headers/os/device
 /boot/system/develop/headers/os/drivers
 /boot/system/develop/headers/os/game
 /boot/system/develop/headers/os/interface
 /boot/system/develop/headers/os/kernel
 /boot/system/develop/headers/os/locale
 /boot/system/develop/headers/os/mail
 /boot/system/develop/headers/os/media
 /boot/system/develop/headers/os/midi
 /boot/system/develop/headers/os/midi2
 /boot/system/develop/headers/os/net
 /boot/system/develop/headers/os/storage
 /boot/system/develop/headers/os/support
 /boot/system/develop/headers/os/translation
 /boot/system/develop/headers/os/add-ons/graphics
 /boot/system/develop/headers/os/add-ons/input_server
 /boot/system/develop/headers/os/add-ons/mail_daemon
 /boot/system/develop/headers/os/add-ons/registrar
 /boot/system/develop/headers/os/add-ons/screen_saver
 /boot/system/develop/headers/os/add-ons/tracker
 /boot/system/develop/headers/os/be_apps/Deskbar
 /boot/system/develop/headers/os/be_apps/NetPositive
 /boot/system/develop/headers/os/be_apps/Tracker
 /boot/system/develop/headers/3rdparty
 /boot/system/develop/headers/bsd
 /boot/system/develop/headers/glibc
 /boot/system/develop/headers/gnu
 /boot/system/develop/headers/posix
 /boot/system/develop/headers/x86
 /boot/system/develop/headers
End of search list.


Notice that while the gcc-x86 searches /boot/system/develop/headers/x86, it 
doesn't search /boot/system/develop/headers/x86/os


Thoughts?


 -- Alex

Other related posts: