Skip to content

Building on FreeBSD 14.1 Errors #3081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
leonardorame opened this issue Apr 26, 2025 · 1 comment
Open

Building on FreeBSD 14.1 Errors #3081

leonardorame opened this issue Apr 26, 2025 · 1 comment

Comments

@leonardorame
Copy link

Hi, I'm getting this errors when I try to build on FreeBSD 14.1:

gmake
cmake -B build
-- The C compiler identification is Clang 18.1.5
-- The CXX compiler identification is Clang 18.1.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/local/bin/git (found version "2.46.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: amd64
-- Including CPU backend
-- Found OpenMP_C: -fopenmp=libomp (found version "5.1")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native 
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Configuring done (0.9s)
-- Generating done (0.0s)
-- Build files have been written to: /home/leonardo/whisper.cpp/build
cmake --build build --config Release
gmake[1]: se entra en el directorio '/usr/home/leonardo/whisper.cpp/build'
[  2%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml.c.o
[  4%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-alloc.c.o
[  7%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o
In file included from /home/leonardo/whisper.cpp/ggml/src/ggml-backend.cpp:14:
In file included from /home/leonardo/whisper.cpp/ggml/src/ggml-impl.h:595:
In file included from /usr/include/c++/v1/vector:308:
In file included from /usr/include/c++/v1/__algorithm/copy.h:12:
/usr/include/c++/v1/__algorithm/copy_move_common.h:18:10: fatal error: '__string/constexpr_c_functions.h' file not found
   18 | #include <__string/constexpr_c_functions.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[3]: *** [ggml/src/CMakeFiles/ggml-base.dir/build.make:104: ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:1035: ggml/src/CMakeFiles/ggml-base.dir/all] Error 2
gmake[1]: *** [Makefile:146: all] Error 2
gmake[1]: se sale del directorio '/usr/home/leonardo/whisper.cpp/build'
gmake: *** [Makefile:8: build] Error 2

Any hint?

@danbev
Copy link
Collaborator

danbev commented Apr 29, 2025

I've tried to reproduce this but not been able to. I'm using FreeBSD 14.2 and Clang 18.1.16 (the version of the base system).

This looks like there might be an issue with the c++ headers. Could you show us the output of:

find /usr/include -name "constexpr_c_functions.h" -o -path "*__string*"

Looking at the path /usr/include/c++ suggests that these headers are expected to be in the base system. One option could be to update the base system in case it has become corrupted for some reason:

sudo freebsd-update fetch
sudo freebsd-update install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants