glbinding icon indicating copy to clipboard operation
glbinding copied to clipboard

Missing -lpthread

Open yurivict opened this issue 3 years ago • 2 comments

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)

yurivict avatar Feb 08 '22 18:02 yurivict

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?

scheibel avatar Feb 10 '22 21:02 scheibel

FreeBSD

yurivict avatar Feb 10 '22 22:02 yurivict