[SOLVED] Sys/stat.h not found

~/haiku/src/apps/mediaconverter> jam -q MediaConverter
Starting build of type regular ... 
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...
...found 10778 target(s)...
...updating 2092 target(s)...
MkDir1 ../../../generated/objects/haiku/x86_64/release/apps/mediaconverter 
C++ ../../../generated/objects/haiku_host/x86_64/release/build/libroot/function_remapper.o 
In file included from <command-line>:
./../../../headers/build/HaikuBuildCompatibility.h:19:10: fatal error: sys/stat.h: No such file or directory
   19 | #include <sys/stat.h>
      |          ^~~~~~~~~~~~
compilation terminated.

gcc -c "../../build/libroot/function_remapper.cpp" -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -include ../../../headers/build/HaikuBuildCompatibility.h -D'HAIKU_BUILD_ATTRIBUTES_DIR="/boot/home/haiku/generated/attributes"' -D_HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS=1 -fPIC -fvisibility=hidden -include ../../../headers/build/BeOSBuildCompatibility.h -DARCH_x86_64 -D_NO_INLINE_ASM -D__NO_INLINE__ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_USE_XATTR -DHAIKU_HOST_PLATFORM_HAIKU -DHAIKU_HOST_PLATFORM_64_BIT -DHAIKU_PACKAGING_ARCH=\"x86_64\" -iquote ../../../build/user_config_headers -iquote ../../../build/config_headers -iquote ../../build/libroot -iquote ../../../generated/objects/common/build/libroot -iquote ../../../generated/objects/haiku_host/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/haiku_host -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/haiku_host/x86_64/release/build/libroot/function_remapper.o"

...failed C++ ../../../generated/objects/haiku_host/x86_64/release/build/libroot/function_remapper.o ...

BUILD FAILURE:
...failed updating 1 target(s)...
...skipped 5 target(s)...
...updated 1 target(s)...

getting the above error whenever I try to compile any application

Do you have the haiku_devel package installed?
It contains the system headers and is required to compile stuff.

1 Like

It got resolved when I restarted my host system.

actually i recently upgraded to linux mint 22.1 from 22 and forgot to restart, as soon as I restarted, the compilation worked without any such errors.

1 Like

Hey, I again faced the issue, haiku_devel was not present so I installed it, after installing compilation was successful but the compiled application is not opening, here is the youtube link: https://www.youtube.com/watch?v=ipiUP1rvAPQ&ab_channel=AkashKumar