Building dev-vcs/git-2.1.2 with USE=-threads results in the following failure: x86_64-pc-linux-gnu-gcc -O2 -march=x86-64 -mtune=core-avx-i -mmmx -msse -msse2 -pipe -fno-strict-aliasing -Wall -I. -DHAVE_ALLOCA_H -DNO_GETTEXT -DNO_PTHREADS -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DSHA1_HEADER='"block-sha1/sha1.h"' -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' -o test-line-buffer -Wl,-O1 -Wl,--as-needed test-line-buffer.o libgit.a xdiff/lib.a vcs-svn/lib.a libgit.a xdiff/lib.a -lz -lrt builtin/index-pack.o: In function `find_unresolved_deltas': index-pack.c:(.text+0x158b): undefined reference to `type_cas_lock' index-pack.c:(.text+0x159c): undefined reference to `type_cas_unlock' index-pack.c:(.text+0x16cf): undefined reference to `type_cas_unlock' collect2: error: ld returned 1 exit status The compile command for the relevant source file has these warnings: x86_64-pc-linux-gnu-gcc -o builtin/index-pack.o -c -MF builtin/.depend/index-pack.o.d -MQ builtin/index-pack.o -MMD -MP -O2 -march=x86-64 -mtune=core-avx-i -mmmx -msse -msse2 -pipe -fno-strict-aliasing -Wall -I. -DHAVE_ALLOCA_H -DNO_GETTEXT -DNO_PTHREADS -DHAVE_PATHS_H -DHAVE_DEV_TTY -DXDL_FAST_HASH -DHAVE_CLOCK_GETTIME -DSHA1_HEADER='"block-sha1/sha1.h"' -DNO_STRLCPY -DNO_MKSTEMPS -DSHELL_PATH='"/bin/sh"' builtin/index-pack.c builtin/index-pack.c: In function 'compare_and_swap_type': builtin/index-pack.c:907:2: warning: implicit declaration of function 'type_cas_lock' [-Wimplicit-function-declaration] builtin/index-pack.c:911:2: warning: implicit declaration of function 'type_cas_unlock' [-Wimplicit-function-declaration] It looks like upstream forgot to protect type_cas_[un]lock() calls with #ifndef NO_PTHREADS.
Confirm, couldnt build with -threads having the same type_cas_ lines But turning on threds builds.
Is this still an issue with recent git versions? I cannot reproduce this on my dev machine...
Ignore my previous comment. It still fails. I could reproduce it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0958dd0bca87b69933521acb8a28b44b2cb3b41d commit 0958dd0bca87b69933521acb8a28b44b2cb3b41d Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2020-04-15 16:03:41 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2020-04-15 16:06:43 +0000 dev-vcs/git: Fixed build with USE="-threads" Closes: https://bugs.gentoo.org/524430 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> dev-vcs/git/git-2.23.1-r1.ebuild | 2 +- dev-vcs/git/git-2.23.2.ebuild | 2 +- dev-vcs/git/git-2.24.1.ebuild | 2 +- dev-vcs/git/git-2.24.2.ebuild | 2 +- dev-vcs/git/git-2.25.1.ebuild | 2 +- dev-vcs/git/git-2.25.2.ebuild | 2 +- dev-vcs/git/git-2.25.3.ebuild | 2 +- dev-vcs/git/git-2.26.0.ebuild | 2 +- dev-vcs/git/git-2.26.1.ebuild | 2 +- dev-vcs/git/git-9999-r1.ebuild | 2 +- dev-vcs/git/git-9999-r2.ebuild | 2 +- dev-vcs/git/git-9999-r3.ebuild | 2 +- dev-vcs/git/git-9999.ebuild | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)