glbinding
glbinding copied to clipboard
Missing -lpthread
On FreeBSD 13 version 3.1.0 breaks:
[ 16% 5/6] : && /usr/bin/c++ -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fstack-protector-strong source/tools/glmeta/CMakeFiles/glmeta.dir/main.cpp.o -o glmeta -Wl,-rpath,/disk-samsung/freebsd-ports/graphics/glbinding/work/.build: libglbinding-aux.so.3.1.0 libglbinding.so.3.1.0 && :
FAILED: glmeta
: && /usr/bin/c++ -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -fstack-protector-strong source/tools/glmeta/CMakeFiles/glmeta.dir/main.cpp.o -o glmeta -Wl,-rpath,/disk-samsung/freebsd-ports/graphics/glbinding/work/.build: libglbinding-aux.so.3.1.0 libglbinding.so.3.1.0 && :
ld: error: libglbinding-aux.so.3.1.0: undefined reference to pthread_create [--no-allow-shlib-undefined]
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks for reporting.
It seems as if we need to update our condition when to add pthread
to the list of linked libraries (cf. https://github.com/cginternals/glbinding/blob/master/cmake/CompileOptions.cmake#L157).
What is the value of CMAKE_SYSTEM_NAME
on your system? I assume it should be FreeBSD
?
FreeBSD