>=dev-vcs/git-2.10.1 introduce a configuration option that enables non-posix compatible regex by default resulting in the following error when building on musl systems: In file included from cache.h:4:0, from bisect.c:1: git-compat-util.h:978:2: error: #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" ^~~~~ git-compat-util.h: In function ‘regexec_buf’: git-compat-util.h:987:53: error: ‘REG_STARTEND’ undeclared (first use in this function) return regexec(preg, buf, nmatch, pmatch, eflags | REG_STARTEND); ^~~~~~~~~~~~ git-compat-util.h:987:53: note: each undeclared identifier is reported only once for each function it appears in In file included from cache.h:4:0, from blob.c:1: git-compat-util.h:978:2: error: #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" ^~~~~ git-compat-util.h: In function ‘regexec_buf’: git-compat-util.h:987:53: error: ‘REG_STARTEND’ undeclared (first use in this function) return regexec(preg, buf, nmatch, pmatch, eflags | REG_STARTEND); ^~~~~~~~~~~~ git-compat-util.h:987:53: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:2008: bisect.o] Error 1 In file included from cache.h:4:0, from base85.c:1: git-compat-util.h:978:2: error: #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" ^~~~~ make: *** Waiting for unfinished jobs.... git-compat-util.h: In function ‘regexec_buf’: git-compat-util.h:987:53: error: ‘REG_STARTEND’ undeclared (first use in this function) return regexec(preg, buf, nmatch, pmatch, eflags | REG_STARTEND); ^~~~~~~~~~~~ git-compat-util.h:987:53: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:2008: blob.o] Error 1 make: *** [Makefile:2008: base85.o] Error 1 I have submitted a pull request at https://github.com/gentoo/gentoo/pull/3237 which sets NO_REGEX=YesPlease
More information: https://public-inbox.org/git/20161004150848.GA7949@brightrain.aerifal.cx/ https://github.com/git/git/commit/2f8952250a84313b74f96abb7b035874854cf202
commit 076cafffdbbb06c50da7ab174fbee4c6be05bcb0 Author: Aric Belsito <lluixhi@gmail.com> Date: Sun Dec 25 18:47:52 2016 dev-vcs/git: Fix build on musl 2.10.1+ introduce a configuration option which enables non-posix compatible regex by default, which breaks compilation on musl. Gentoo-Bug: https://bugs.gentoo.org/603710 Closes: https://github.com/gentoo/gentoo/pull/3237