guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cmake build system 'ld: cannot find -lpthreads' (OpenClonk)


From: Tonton
Subject: cmake build system 'ld: cannot find -lpthreads' (OpenClonk)
Date: Sat, 17 Nov 2018 16:23:47 +0100

I've been trying to define and build openclonk, but I keep getting build
failures because pthreads are missing.

tl;dr: how to make pthreads work with cmake-build-system for linking...

I have grepped the guix sources for pthreads but I can't seem to find it
explicitly declared used. And AFAIK pthreads is part of gcc, stdc or glib or
something; I seem to remember only needing to tack on the -lpthreads flag on
the compiler when I was playing with it, no extra packages.

So I'm a bit at a loss. Maybe this is a quirk with cmake or how openclonk
uses cmake; though it seems they are doing the necessary steps in their
cmakelists.txt

The definition I'm working on can be found at the following link. I apologize
in advance for the cluttered file - it's basically my playroom (I have some
work in front of me to declutter and send patches with the definitions that
work from here - in the future).

https://notabug.org/thomassgn/guixsd-configuration/src/master/modules/ton-tull.scm#L571

The relevant errors I get here are:
/tmp/guix-build-openclonk-8.1.drv-0/build/CMakeFiles/CMakeError.log:

Linking C executable cmTC_e2823
/gnu/store/g85ikfjxs2d7aydvg5w06jn2h9xrjmpc-cmake-3.11.0/bin/cmake -E
        cmake_link_script CMakeFiles/cmTC_e2823.dir/link.txt --verbose=1 
/gnu/store/zrhwhlqqk51qslbddk4cip2z2p3fpvxd-gcc-5.5.0/bin/gcc
        -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic
        CMakeFiles/cmTC_e2823.dir/CheckFunctionExists.c.o  -o cmTC_e2823
        -lpthreads
ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status



reply via email to

[Prev in Thread] Current Thread [Next in Thread]