You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /usr/ports/misc/llama-cpp/work/llama.cpp-b4418/ggml/src/ggml-vulkan/ggml-vulkan.cpp:8:
/usr/local/include/vulkan/vulkan.hpp:145:41: error: use of undeclared identifier 'strnlen'
145 | return std::string( this->data(), strnlen( this->data(), N ) );
| ^
The same argument is set in cmake scripts as well.
Please don't fix POSIX support at random ancient levels.
In general it shouldn't be necessary to ever set _XOPEN_SOURCE.
FreeBSD 14.2
First Bad Commit
n/a
Relevant log output
n/a
The text was updated successfully, but these errors were encountered:
Hi. I had the same compilation problem under FreeBSD 14.2. #11103 did not correct the compilation error for me. Following the suggestions the following did (for me)
File
[llama.cpp]/ggml/src/CMakeLists.txt
# Somehow in OpenBSD whenever POSIX conformance is specified
# some string functions rely on locale_t availability,
# which was introduced in POSIX.1-2008, forcing us to go higher
if (NOT (CMAKE_SYSTEM_NAME MATCHES "FreeBSD"))
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
add_compile_definitions(_XOPEN_SOURCE=700)
else()
add_compile_definitions(_XOPEN_SOURCE=600)
endif()
endif()
Of course your style may vary.
File
[llama.cpp]//Makefile
setup MK_CPPFLAGS similarly to the above so that may require review, too.
Git commit
4418
Operating systems
BSD
GGML backends
CPU
Problem description & steps to reproduce
This -D_XOPEN_SOURCE=600 argument breaks compilation:
The same argument is set in cmake scripts as well.
Please don't fix POSIX support at random ancient levels.
In general it shouldn't be necessary to ever set _XOPEN_SOURCE.
FreeBSD 14.2
First Bad Commit
n/a
Relevant log output
The text was updated successfully, but these errors were encountered: