I upgraded my Ubuntu from 20.04 to 21.10 (which I don’t think is officially supported for zcash builds yet), and I encountered this build problem at the last step when linking zcashd (and most of the other executables):
$ zcutil/build.sh
(usual build output ....)
CXXLD zcashd
ld.lld: error: undefined symbol: pthread_yield
>>> referenced by os_yield.c
>>> os_yield.o:(__os_yield) in archive /g/master-zcash/depends/x86_64-pc-linux-gnu/share/../lib/libdb_cxx-6.2.a
>>> did you mean: pthread_yield@GLIBC_2.2.5
>>> defined in: /lib/x86_64-linux-gnu/libc.so.6
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:3401: zcashd] Error 1
This is strange, right now, I don’t encounter this error (I’m still running Ubuntu 21.10) even if I don’t use that workaround. I don’t know what’s changed. Are you seeing the same os_yield.o linker error? When you run ./configure, do you see it checking for yield or os_yield, something like that? I remember seeing (when I posted the workaround above) something like checking for yield... yes and then when I added the above workaround, it changed to ... no. But now I don’t see it checking for yield at all. (And I don’t get the error even without using the workaround.) So I don’t know what’s going on.
Yes, my impression when I posted that workaround in January was that pthread_yield is deprecated, and that workaround forces the build to not use it (which isn’t a fatal error; it simply uses some equivalent mechanism). I don’t know how to tell which glibc I’m using; that string “glibc” doesn’t appear in the output of make V=1 (verbose), nor does it appear in my config.log. Keep in mind that I’m doing a default clang build, but I was, or thought I was, doing that also when I ran into the problem in January. Does the Arch build use gcc or clang? I’ve never done that build. I’m sorry I can’t be more helpful.
Yes, please open a ticket. I was just talking with one of our build people, and he says that anything above 20.04 on Arch Linux (or probably any version of linux) isn’t officially supported yet, but they’re aware and working on it. But it would be good if you could open a ticket.