Quantcast
Channel:
Viewing all articles
Browse latest Browse all 443

FreeBSD Help • Compilers fail to find sys/_types.h include file

$
0
0
I have installed https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-memstick.img on an Intel NUC 11 i5 PC. The installation procedure reported no problems.

However, when I try to compile a C++ program either via c++13 or via g++13, I get the following error that complains of a missing sys/_types.h file. The following compile command successfully compiles the program under Ubuntu 24.04 so I'm confused that it fails to compile under FreeBSD. Can someone please help me to solve this problem? Thanks!

g++13 -lm -O3 -std=c++17 -pthread -D TEST_KD_TREE -W kdTreeKnlogn.cpp
In file included from /usr/local/lib/gcc13/include/c++/bits/cxxabi_init_exception.h:38,
from /usr/local/lib/gcc13/include/c++/bits/exception_ptr.h:36,
from /usr/local/lib/gcc13/include/c++/exception:164,
from kdTreeKnlogn.cpp:79:
/usr/local/lib/gcc13/gcc/x86_64-portbld-freebsd14.0/13.2.0/include/stddef.h:54:10: fatal error: sys/_types.h: No such file or directory
54 | #include <sys/_types.h>
| ^~~~~~~~~~~~~~
compilation terminated.

Statistics: Posted by kirigiri — Tue May 14, 2024 10:50 pm



Viewing all articles
Browse latest Browse all 443

Trending Articles