Skip to content
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

Missing -lpthread #327

Open
yurivict opened this issue Feb 8, 2022 · 2 comments
Open

Missing -lpthread #327

yurivict opened this issue Feb 8, 2022 · 2 comments

Comments

@yurivict
Copy link

yurivict commented Feb 8, 2022

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)
@scheibel
Copy link
Member

scheibel commented Feb 10, 2022

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?

@yurivict
Copy link
Author

FreeBSD

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