Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603710 - >=dev-vcs/git-2.10.1 on musl libc - git-compat-util.h:987:53: error: 'REG_STARTEND' undeclared (first use in this function)
Summary: >=dev-vcs/git-2.10.1 on musl libc - git-compat-util.h:987:53: error: 'REG_STA...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-25 17:59 UTC by Aric Belsito
Modified: 2016-12-26 16:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aric Belsito 2016-12-25 17:59:25 UTC
>=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
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-12-26 16:06:05 UTC
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