I am getting a compile/link error relating to pthreads. Not sure if upstream or my system is broken or what. Haven't been able to get any flavor of arch package of freecad to work for the past week or so. git commit for the freecad repo is 82e7ae0e35b7.
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/plyons/.cache/yay/freecad-git/src/FreeCAD/build_dir/CMakeFiles/CMakeTmp
Run Build Command(s):/bin/ninja cmTC_ad2a2 && [1/2] Building C object CMakeFiles/cmTC_ad2a2.dir/src.c.o
[2/2] Linking C executable cmTC_ad2a2
FAILED: cmTC_ad2a2
: && /bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection -fPIC -w -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now CMakeFiles/cmTC_ad2a2.dir/src.c.o -o cmTC_ad2a2
&& :
/bin/ld: CMakeFiles/cmTC_ad2a2.dir/src.c.o: in function `main':
src.c:(.text.startup+0x28): undefined reference to `pthread_create'
/bin/ld: src.c:(.text.startup+0x32): undefined reference to `pthread_detach'
/bin/ld: src.c:(.text.startup+0x3c): undefined reference to `pthread_cancel'
/bin/ld: src.c:(.text.startup+0x48): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Pinned Comments
adrianinsaval commented on 2023-03-12 14:50 (UTC)
If the check fails there is little I can do about it as it most likely needs to be fixed upstream, in such cases report those upstream (maybe wait a day or two as sometimes it's quickly solved upstream) or skip the check with
makepkg --nocheck
if you don't care about the functionality that is being reported as failing in the check.