Build haiku problem (newbie needs help)

Host ubuntu 23.10, dev packages and haiku jam installed

/home/user/src directory with buildtools and haiku subdirectory

In haiku ./configure --cross-tools-source …/buildtools --build-cross-tools x86_64 successfull

I have folder generate in haiku folder:

ubu@t470s:~/src/haiku$ tree -L 2 generated
├── build
│ ├── BuildConfig
│ ├── header_cache
│ └── jamfile_cache
├── cross-tools-x86_64
│ ├── bin
│ ├── include
│ ├── lib
│ ├── libexec
│ ├── share
│ └── x86_64-unknown-haiku
├── haiku.image-init-vars
├── Jamfile
└── objects
└── linux

WHAT NOW? Call jam? From where and with what parameters? Set Path?

Yes, call jam with the profile you want, for example jam @nightly-anyboot to build a nightly image.

Useful options to jam are:

-q to quit on errors (I think it’s a good idea to always have this)
-j to use more than 1 CPU core (for example -j4 to run 4 jobs in parallel) to get faster builds

That is the problem i think i am missing a step setting a path or enviroment varoiable or something because i get this errors, i think it is using my system compiler:

ubu@t470s:~/src/haiku$ jam @nightly-anyboot
Starting build of type regular …
Building Haiku Nightly
Asked for bios_ia32 target boot platform
Unknown path to handle adding to image
Asked for pxe_ia32 target boot platform
Unknown path to handle adding to image
…found 106354 target(s)…
…updating 16389 target(s)…
MkDir1 generated/objects/linux/x86_64/release/tools
MkDir1 generated/objects/linux/x86_64/release/tools/anyboot
C++ generated/objects/linux/x86_64/release/tools/anyboot/anyboot.o
Link generated/objects/linux/x86_64/release/tools/anyboot/anyboot
Chmod1 generated/objects/linux/x86_64/release/tools/anyboot/anyboot
MkDir1 generated/objects/haiku
MkDir1 generated/objects/haiku/x86_64
MkDir1 generated/objects/haiku/x86_64/release
MkDir1 generated/objects/haiku/x86_64/release/system
MkDir1 generated/objects/haiku/x86_64/release/system/boot
MkDir1 generated/objects/haiku/x86_64/release/system/boot/bios_ia32
MkDir1 generated/objects/haiku/x86_64/release/system/boot/bios_ia32/revisioned
C++ generated/objects/linux/x86_64/release/build/libroot/atomic.o
In file included from headers/build/os/BeBuild.h:5,
from headers/build/…/os/support/SupportDefs.h:12,
from headers/build/os/support/SupportDefs.h:2,
from headers/build/…/os/kernel/OS.h:14,
from headers/build/os/kernel/OS.h:9,
from src/build/libroot/atomic.cpp:5:
headers/build/…/os/BeBuild.h:59:9: error: #error Unsupported compiler!
59 | # error Unsupported compiler!
| ^~~~~

gcc -c “src/build/libroot/atomic.cpp” -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -D’HAIKU_BUILD_ATTRIBUTES_DIR=“/home/ubu/src/haiku/generated/attributes”’ -D_HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS=1 -include headers/build/BeOSBuildCompatibility.h -fPIC -DARCH_x86_64 -D_NO_INLINE_ASM -D__NO_INLINE__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_USE_XATTR -DHAIKU_HOST_PLATFORM_LINUX -DHAIKU_HOST_PLATFORM_64_BIT -DHAIKU_PACKAGING_ARCH="x86_64" -iquote build/user_config_headers -iquote build/config_headers -iquote src/build/libroot -iquote generated/objects/common/build/libroot -iquote generated/objects/linux/x86_64/common/build/libroot -iquote generated/objects/haiku/x86_64/common/build/libroot -I headers/build -I headers/build/os -I headers/build/os/app -I headers/build/os/drivers -I headers/build/os/kernel -I headers/build/os/interface -I headers/build/os/storage -I headers/build/os/support -I headers/build/private/kernel -I headers/build/private/libroot -I headers/build/private/system -I headers/private/system -I headers/build/host/linux -I headers/build -I headers/build/os -I headers/build/os/add-ons/registrar -I headers/build/os/app -I headers/build/os/bluetooth -I headers/build/os/drivers -I headers/build/os/kernel -I headers/build/os/interface -I headers/build/os/locale -I headers/build/os/storage -I headers/build/os/support -I headers/build/private -o “generated/objects/linux/x86_64/release/build/libroot/atomic.o”

…failed C++ generated/objects/linux/x86_64/release/build/libroot/atomic.o …

What is your gcc version?

gcc --version

We use the host gcc to build some tools running on the host system, and we have to adjust a few things with each new release of gcc, maybe yours isn’t known yet.

You can try to modify headers/os/BeBuild.h yourself to add the needed version there; and submit a patch if you want :slight_smile:

ubuntu 23.10

ubu@t470s:~/src/haiku$ gcc --version
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

Sorry, i have no clue what to adjust there, i am just a simple sysadmin :wink:

Will try compiling it on an older Linux release first, thanks for the help

I thought it should use the compiler from the buildtools instead of the system one

It uses both. From your log, I can see from the path of the file with an erorr (containing /linux/x86_64/) that it is a step using the host compiler.

For a simple sysadmin you’re doing well, Ubu, especially with dual screens. The (Haiku) world is watching you with great interest. :slight_smile:

1 Like

Also check what you are compiling. gcc 13 support was included some 6 months ago, so a tree from before will give you the error you got.