Build error on RHEL

I am following the Haiku build guide (Compiling for x86_64 | Haiku Project). I am getting the error -lsupc++ not found when running the command jam -q -j2 @nightly-raw

(haiku) ➜  generated.x86_64 git:(master) jam -q -j2 @nightly-anyboot
Starting build of type regular ... 
Building Haiku Nightly 
AddHaikuImagePackages: package mawk not available! 
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 
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...found 108062 target(s)...
...updating 16685 target(s)...
MkDir1 objects 
MkDir1 /home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects 
MkDir1 /home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux 
MkDir1 objects/linux 
MkDir1 objects/haiku 
MkDir1 objects/linux/x86_64 
MkDir1 objects/haiku/x86_64 
MkDir1 objects/linux/x86_64/release 
MkDir1 objects/haiku/x86_64/release 
MkDir1 objects/linux/x86_64/release/tools 
MkDir1 objects/haiku/x86_64/release/system 
MkDir1 objects/linux/x86_64/release/tools/anyboot 
C++ objects/linux/x86_64/release/tools/anyboot/anyboot.o 
MkDir1 objects/haiku/x86_64/release/system/boot 
MkDir1 objects/haiku/x86_64/release/system/boot/bios_ia32 
MkDir1 objects/haiku/x86_64/release/system/boot/bios_ia32/revisioned 
MkDir1 objects/linux/x86_64/release/build 
MkDir1 objects/linux/x86_64/release/build/libroot 
C++ objects/linux/x86_64/release/build/libroot/function_remapper.o 
Link objects/linux/x86_64/release/tools/anyboot/anyboot 
Archive objects/linux/x86_64/release/build/libroot/libroot_build_function_remapper.a 
ar: creating objects/linux/x86_64/release/build/libroot/libroot_build_function_remapper.a
/usr/bin/ld: cannot find -lsupc++
collect2: error: ld returned 1 exit status

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux/lib" ../build/scripts/rm_attrs objects/linux/x86_64/release/tools/rm_attrs -f "objects/linux/x86_64/release/tools/anyboot/anyboot"
gcc -Xlinker --no-as-needed -Wl,--copy-dt-needed-entries -Wl,-rpath,/home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux/lib -lm -ldl -lz -o "objects/linux/x86_64/release/tools/anyboot/anyboot"   "objects/linux/x86_64/release/tools/anyboot/anyboot.o" \
 -lsupc++  \


...failed Link objects/linux/x86_64/release/tools/anyboot/anyboot ...
MkDir1 /home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux/lib 
File /home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux/lib/libroot_build.so 
Ranlib objects/linux/x86_64/release/build/libroot/libroot_build_function_remapper.a 
cp: cannot stat 'objects/linux/x86_64/release/build/libroot/libroot_build.so': No such file or directory

cp -f "objects/linux/x86_64/release/build/libroot/libroot_build.so" "/home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux/lib/libroot_build.so"

...failed File /home/praaagar/Desktop/Haiku/haiku/generated.x86_64/objects/linux/lib/libroot_build.so ...

BUILD FAILURE:
...failed updating 2 target(s)...
...skipped 6 target(s)...
...updated 21 target(s)...

Please help

Did you follow Pre-requisite Software | Haiku Project ?

specifically the rpm distro section.

RPM-based GNU/Linux Distributions using yum (Fedora, CentOS…)

**Basic requirements:**


sudo yum install git nasm autoconf automake texinfo flex bison gcc gcc-c++ make glibc-devel zlib-devel zstd-devel xorriso curl-devel byacc libstdc++-static glibc-devel.i686 libstdc++-devel.i686 libstdc++-devel python36

zstd-devel is libzstd-devel in RHEL. The command was failing before changing that. It is working now. Thank you!

2 Likes