Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2026 18:57:12 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Gleb Popov <arrowd@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 852c6720aa0d - main - devel/libgnuregex: Fix building after gnulib update
Message-ID:  <CAFDf7UKUJV%2BXM0jBaSJCbYCShLc52nicRSwm6syGEgyyY_ngaQ@mail.gmail.com>
In-Reply-To: <69df91af.4212f.3aa2fa2c@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hello,

This change broken editors/zile:

===
checking for gcc... cc
checking whether the C compiler works... no
configure: error: in '/wrkdirs/usr/ports/editors/zile/work/zile-2.6.4':
configure: error: C compiler cannot create executables

See 'config.log' for more details
<snip>

ld: error: undefined reference: gl_dynarray_resize
>>> referenced by /usr/local/lib/libgnuregex.so (disallowed by
--no-allow-shlib-undefined)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
===
https://pkg-status.freebsd.org/beefy23/data/150amd64-default/ab94ba4b9a3f/logs/zile-2.6.4.log

Fixing zile with:

```diff
--- a/editors/zile/Makefile
+++ b/editors/zile/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=      zile
 DISTVERSION=   2.6.4
+PORTREVISION=  1
 CATEGORIES=    editors
 MASTER_SITES=  GNU

@@ -10,8 +11,7 @@ WWW=          https://www.gnu.org/software/zile/
 LICENSE=       GPLv3

 BUILD_DEPENDS= ${LOCALBASE}/bin/help2man:misc/help2man
-LIB_DEPENDS=   libgee-0.8.so:devel/libgee \
-               libgnuregex.so:devel/libgnuregex
+LIB_DEPENDS=   libgee-0.8.so:devel/libgee

 USES=          compiler:c++11-lang gmake gnome localbase:ldflags ncurses
perl5 \
                pkgconfig vala:build
@@ -20,8 +20,6 @@ USE_PERL5=    build

 GNU_CONFIGURE= yes

-LDFLAGS+=      -lgnuregex
-
 PLIST_FILES=   bin/${PORTNAME} \
                share/man/man1/${PORTNAME}.1.gz
 PORTDOCS=      AUTHORS FAQ NEWS dotzile.sample
```

Q/A check doesn't complain and run-test is OK.
Maybe other ports are affected too, didn't do a exp-run...

Cheers,

Gleb Popov <arrowd@freebsd.org> escreveu (quarta, 15/04/2026 à(s) 14:25):

> The branch main has been updated by arrowd:
>
> URL:
> https://cgit.FreeBSD.org/ports/commit/?id=852c6720aa0ddf896adc7d4f8e713c4b5834a2e9
>
> commit 852c6720aa0ddf896adc7d4f8e713c4b5834a2e9
> Author:     Gleb Popov <arrowd@FreeBSD.org>
> AuthorDate: 2026-04-14 09:10:55 +0000
> Commit:     Gleb Popov <arrowd@FreeBSD.org>
> CommitDate: 2026-04-15 13:24:58 +0000
>
>     devel/libgnuregex: Fix building after gnulib update
>
>     Approved by: kevans (maintainer)
>     Differential Revision: https://reviews.freebsd.org/D56386
> ---
>  devel/libgnuregex/Makefile                      | 18 +++++++++++++++---
>  devel/libgnuregex/files/config.h                |  2 ++
>  devel/libgnuregex/files/patch-regex.c           | 20 +++++---------------
>  devel/libgnuregex/files/patch-regex.h           |  4 ++--
>  devel/libgnuregex/files/patch-regex__internal.h | 11 -----------
>  5 files changed, 24 insertions(+), 31 deletions(-)
>
> diff --git a/devel/libgnuregex/Makefile b/devel/libgnuregex/Makefile
> index 3bf76386fbb8..97b562041893 100644
> --- a/devel/libgnuregex/Makefile
> +++ b/devel/libgnuregex/Makefile
> @@ -15,18 +15,30 @@ EXTRACT_DEPENDS=    gnulib>0:devel/gnulib
>  USES=          uidfix
>  USE_LDCONFIG=  yes
>
> +CFLAGS=                -I${WRKSRC}
>  MAKE_ENV+=     INCLUDEDIR="${PREFIX}/include" LIBDIR="${PREFIX}/lib"
>
> -REGEX_FILES=   lib/regex.c \
> +REGEX_FILES=   lib/attribute.h \
> +               lib/cdefs.h \
> +               lib/dynarray.h \
> +               lib/gettext.h \
> +               lib/intprops.h \
> +               lib/intprops-internal.h \
> +               lib/libc-config.h \
> +               lib/regex.c \
>                 lib/regex.h \
>                 lib/regex_internal.c \
>                 lib/regex_internal.h \
>                 lib/regexec.c \
> -               lib/regcomp.c
> +               lib/regcomp.c \
> +               lib/verify.h
> +REGEX_MALLOC_FILES=    lib/malloc/dynarray.h \
> +                       lib/malloc/dynarray-skeleton.c
>
>  do-extract:
> -       ${MKDIR} ${WRKSRC}
> +       ${MKDIR} -p ${WRKSRC}/malloc
>         ${CP} -a ${REGEX_FILES:C,^,${LOCALBASE}/share/gnulib/,} ${WRKSRC}
> +       ${CP} -a ${REGEX_MALLOC_FILES:C,^,${LOCALBASE}/share/gnulib/,}
> ${WRKSRC}/malloc
>         ${CP} -a ${FILESDIR}/config.h ${FILESDIR}/gnuregex.h \
>                 ${FILESDIR}/Makefile ${WRKSRC}
>
> diff --git a/devel/libgnuregex/files/config.h
> b/devel/libgnuregex/files/config.h
> index b117619d0b02..f196bad93147 100644
> --- a/devel/libgnuregex/files/config.h
> +++ b/devel/libgnuregex/files/config.h
> @@ -11,3 +11,5 @@
>  #define        HAVE_ALLOCA     1
>  #define        HAVE_STDBOOL_H  1
>  #define        HAVE_STDINT_H   1
> +#define _GL_CONFIG_H_INCLUDED 1
> +#define _GL_ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough));
> diff --git a/devel/libgnuregex/files/patch-regex.c
> b/devel/libgnuregex/files/patch-regex.c
> index 8f7c831cb18c..68a84ef0d3b3 100644
> --- a/devel/libgnuregex/files/patch-regex.c
> +++ b/devel/libgnuregex/files/patch-regex.c
> @@ -1,20 +1,10 @@
> ---- regex.c.orig       2014-02-03 00:48:46 UTC
> +--- regex.c.orig       2026-01-27 18:52:19 UTC
>  +++ regex.c
> -@@ -18,7 +18,7 @@
> -    <http://www.gnu.org/licenses/>.  */
> -
> - #ifndef _LIBC
> --# include <config.h>
> -+# include "config.h"
> -
> - # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
> - #  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
> -@@ -64,7 +64,7 @@
> +@@ -63,6 +63,7 @@
> +    GNU regex allows.  Include it before <regex.h>, which correctly
>      #undefs RE_DUP_MAX and sets it to the right value.  */
>   #include <limits.h>
> ++#include <stdbool.h>
>
> --#include <regex.h>
> -+#include "regex.h"
> + #include <regex.h>
>   #include "regex_internal.h"
> -
> - #include "regex_internal.c"
> diff --git a/devel/libgnuregex/files/patch-regex.h
> b/devel/libgnuregex/files/patch-regex.h
> index f76971296606..148444cb380d 100644
> --- a/devel/libgnuregex/files/patch-regex.h
> +++ b/devel/libgnuregex/files/patch-regex.h
> @@ -1,6 +1,6 @@
> ---- regex.h.orig       2020-12-28 19:24:49 UTC
> +--- regex.h.orig       2026-01-27 18:52:19 UTC
>  +++ regex.h
> -@@ -30,7 +30,7 @@ extern "C" {
> +@@ -29,7 +29,7 @@ extern "C" {
>
>   /* Define __USE_GNU to declare GNU extensions that violate the
>      POSIX name space rules.  */
> diff --git a/devel/libgnuregex/files/patch-regex__internal.h
> b/devel/libgnuregex/files/patch-regex__internal.h
> deleted file mode 100644
> index ebe4102924ee..000000000000
> --- a/devel/libgnuregex/files/patch-regex__internal.h
> +++ /dev/null
> @@ -1,11 +0,0 @@
> ---- regex_internal.h.orig      2020-12-28 19:25:52 UTC
> -+++ regex_internal.h
> -@@ -481,7 +481,7 @@ static unsigned int re_string_context_at (const re_str
> - #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
> - #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
> -
> --#if defined _LIBC || HAVE_ALLOCA
> -+#if defined _LIBC || (HAVE_ALLOCA && HAVE_ALLOCA_H)
> - # include <alloca.h>
> - #endif
> -
>
>

-- 
Nuno Teixeira
FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org

[-- Attachment #2 --]
<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>This change broken editors/zile:<br><br>===<br>checking for gcc... cc<br>checking whether the C compiler works... no<br>configure: error: in &#39;/wrkdirs/usr/ports/editors/zile/work/zile-2.6.4&#39;:<br>configure: error: C compiler cannot create executables<br><br>See &#39;config.log&#39; for more details<br></div>&lt;snip&gt;<br><br>ld: error: undefined reference: gl_dynarray_resize<br>&gt;&gt;&gt; referenced by /usr/local/lib/libgnuregex.so (disallowed by --no-allow-shlib-undefined)<br>cc: error: linker command failed with exit code 1 (use -v to see invocation)<br>===<br><a href="https://pkg-status.freebsd.org/beefy23/data/150amd64-default/ab94ba4b9a3f/logs/zile-2.6.4.log">https://pkg-status.freebsd.org/beefy23/data/150amd64-default/ab94ba4b9a3f/logs/zile-2.6.4.log</a></div><div><br></div>Fixing zile with:<br><br></div>```diff<br>--- a/editors/zile/Makefile<br>+++ b/editors/zile/Makefile<br>@@ -1,5 +1,6 @@<br> PORTNAME=      zile<br> DISTVERSION=   2.6.4<br>+PORTREVISION=  1<br> CATEGORIES=    editors<br> MASTER_SITES=  GNU<br><br>@@ -10,8 +11,7 @@ WWW=          <a href="https://www.gnu.org/software/zile/" target="_blank">https://www.gnu.org/software/zile/</a><br> LICENSE=       GPLv3<br><br> BUILD_DEPENDS= ${LOCALBASE}/bin/help2man:misc/help2man<br>-LIB_DEPENDS=   libgee-0.8.so:devel/libgee \<br>-               libgnuregex.so:devel/libgnuregex<br>+LIB_DEPENDS=   libgee-0.8.so:devel/libgee<br><br> USES=          compiler:c++11-lang gmake gnome localbase:ldflags ncurses perl5 \<br>                pkgconfig vala:build<br>@@ -20,8 +20,6 @@ USE_PERL5=    build<br><br> GNU_CONFIGURE= yes<br><br>-LDFLAGS+=      -lgnuregex<br>-<br> PLIST_FILES=   bin/${PORTNAME} \<br>                share/man/man1/${PORTNAME}.1.gz<br> PORTDOCS=      AUTHORS FAQ NEWS dotzile.sample<br>```<br><br></div>Q/A check doesn&#39;t complain and run-test is OK.<br></div>Maybe other ports are affected too, didn&#39;t do a exp-run...<br><br></div>Cheers,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Gleb Popov &lt;<a href="mailto:arrowd@freebsd.org" target="_blank">arrowd@freebsd.org</a>&gt; escreveu (quarta, 15/04/2026 à(s) 14:25):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The branch main has been updated by arrowd:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/ports/commit/?id=852c6720aa0ddf896adc7d4f8e713c4b5834a2e9" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/ports/commit/?id=852c6720aa0ddf896adc7d4f8e713c4b5834a2e9</a><br>;
<br>
commit 852c6720aa0ddf896adc7d4f8e713c4b5834a2e9<br>
Author:     Gleb Popov &lt;arrowd@FreeBSD.org&gt;<br>
AuthorDate: 2026-04-14 09:10:55 +0000<br>
Commit:     Gleb Popov &lt;arrowd@FreeBSD.org&gt;<br>
CommitDate: 2026-04-15 13:24:58 +0000<br>
<br>
    devel/libgnuregex: Fix building after gnulib update<br>
<br>
    Approved by: kevans (maintainer)<br>
    Differential Revision: <a href="https://reviews.freebsd.org/D56386" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D56386</a><br>;
---<br>
 devel/libgnuregex/Makefile                      | 18 +++++++++++++++---<br>
 devel/libgnuregex/files/config.h                |  2 ++<br>
 devel/libgnuregex/files/patch-regex.c           | 20 +++++---------------<br>
 devel/libgnuregex/files/patch-regex.h           |  4 ++--<br>
 devel/libgnuregex/files/patch-regex__internal.h | 11 -----------<br>
 5 files changed, 24 insertions(+), 31 deletions(-)<br>
<br>
diff --git a/devel/libgnuregex/Makefile b/devel/libgnuregex/Makefile<br>
index 3bf76386fbb8..97b562041893 100644<br>
--- a/devel/libgnuregex/Makefile<br>
+++ b/devel/libgnuregex/Makefile<br>
@@ -15,18 +15,30 @@ EXTRACT_DEPENDS=    gnulib&gt;0:devel/gnulib<br>
 USES=          uidfix<br>
 USE_LDCONFIG=  yes<br>
<br>
+CFLAGS=                -I${WRKSRC}<br>
 MAKE_ENV+=     INCLUDEDIR=&quot;${PREFIX}/include&quot; LIBDIR=&quot;${PREFIX}/lib&quot;<br>
<br>
-REGEX_FILES=   lib/regex.c \<br>
+REGEX_FILES=   lib/attribute.h \<br>
+               lib/cdefs.h \<br>
+               lib/dynarray.h \<br>
+               lib/gettext.h \<br>
+               lib/intprops.h \<br>
+               lib/intprops-internal.h \<br>
+               lib/libc-config.h \<br>
+               lib/regex.c \<br>
                lib/regex.h \<br>
                lib/regex_internal.c \<br>
                lib/regex_internal.h \<br>
                lib/regexec.c \<br>
-               lib/regcomp.c<br>
+               lib/regcomp.c \<br>
+               lib/verify.h<br>
+REGEX_MALLOC_FILES=    lib/malloc/dynarray.h \<br>
+                       lib/malloc/dynarray-skeleton.c<br>
<br>
 do-extract:<br>
-       ${MKDIR} ${WRKSRC}<br>
+       ${MKDIR} -p ${WRKSRC}/malloc<br>
        ${CP} -a ${REGEX_FILES:C,^,${LOCALBASE}/share/gnulib/,} ${WRKSRC}<br>
+       ${CP} -a ${REGEX_MALLOC_FILES:C,^,${LOCALBASE}/share/gnulib/,} ${WRKSRC}/malloc<br>
        ${CP} -a ${FILESDIR}/config.h ${FILESDIR}/gnuregex.h \<br>
                ${FILESDIR}/Makefile ${WRKSRC}<br>
<br>
diff --git a/devel/libgnuregex/files/config.h b/devel/libgnuregex/files/config.h<br>
index b117619d0b02..f196bad93147 100644<br>
--- a/devel/libgnuregex/files/config.h<br>
+++ b/devel/libgnuregex/files/config.h<br>
@@ -11,3 +11,5 @@<br>
 #define        HAVE_ALLOCA     1<br>
 #define        HAVE_STDBOOL_H  1<br>
 #define        HAVE_STDINT_H   1<br>
+#define _GL_CONFIG_H_INCLUDED 1<br>
+#define _GL_ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough));<br>
diff --git a/devel/libgnuregex/files/patch-regex.c b/devel/libgnuregex/files/patch-regex.c<br>
index 8f7c831cb18c..68a84ef0d3b3 100644<br>
--- a/devel/libgnuregex/files/patch-regex.c<br>
+++ b/devel/libgnuregex/files/patch-regex.c<br>
@@ -1,20 +1,10 @@<br>
---- regex.c.orig       2014-02-03 00:48:46 UTC<br>
+--- regex.c.orig       2026-01-27 18:52:19 UTC<br>
 +++ regex.c<br>
-@@ -18,7 +18,7 @@<br>
-    &lt;<a href="http://www.gnu.org/licenses/" rel="noreferrer" target="_blank">http://www.gnu.org/licenses/</a>&gt;.  */<br>
- <br>
- #ifndef _LIBC<br>
--# include &lt;config.h&gt;<br>
-+# include &quot;config.h&quot;<br>
- <br>
- # if (__GNUC__ == 4 &amp;&amp; 6 &lt;= __GNUC_MINOR__) || 4 &lt; __GNUC__<br>
- #  pragma GCC diagnostic ignored &quot;-Wsuggest-attribute=pure&quot;<br>
-@@ -64,7 +64,7 @@<br>
+@@ -63,6 +63,7 @@<br>
+    GNU regex allows.  Include it before &lt;regex.h&gt;, which correctly<br>
     #undefs RE_DUP_MAX and sets it to the right value.  */<br>
  #include &lt;limits.h&gt;<br>
++#include &lt;stdbool.h&gt;<br>
<br>
--#include &lt;regex.h&gt;<br>
-+#include &quot;regex.h&quot;<br>
+ #include &lt;regex.h&gt;<br>
  #include &quot;regex_internal.h&quot;<br>
- <br>
- #include &quot;regex_internal.c&quot;<br>
diff --git a/devel/libgnuregex/files/patch-regex.h b/devel/libgnuregex/files/patch-regex.h<br>
index f76971296606..148444cb380d 100644<br>
--- a/devel/libgnuregex/files/patch-regex.h<br>
+++ b/devel/libgnuregex/files/patch-regex.h<br>
@@ -1,6 +1,6 @@<br>
---- regex.h.orig       2020-12-28 19:24:49 UTC<br>
+--- regex.h.orig       2026-01-27 18:52:19 UTC<br>
 +++ regex.h<br>
-@@ -30,7 +30,7 @@ extern &quot;C&quot; {<br>
+@@ -29,7 +29,7 @@ extern &quot;C&quot; {<br>
<br>
  /* Define __USE_GNU to declare GNU extensions that violate the<br>
     POSIX name space rules.  */<br>
diff --git a/devel/libgnuregex/files/patch-regex__internal.h b/devel/libgnuregex/files/patch-regex__internal.h<br>
deleted file mode 100644<br>
index ebe4102924ee..000000000000<br>
--- a/devel/libgnuregex/files/patch-regex__internal.h<br>
+++ /dev/null<br>
@@ -1,11 +0,0 @@<br>
---- regex_internal.h.orig      2020-12-28 19:25:52 UTC<br>
-+++ regex_internal.h<br>
-@@ -481,7 +481,7 @@ static unsigned int re_string_context_at (const re_str<br>
- #define re_string_skip_bytes(pstr,idx) ((pstr)-&gt;cur_idx += (idx))<br>
- #define re_string_set_index(pstr,idx) ((pstr)-&gt;cur_idx = (idx))<br>
- <br>
--#if defined _LIBC || HAVE_ALLOCA<br>
-+#if defined _LIBC || (HAVE_ALLOCA &amp;&amp; HAVE_ALLOCA_H)<br>
- # include &lt;alloca.h&gt;<br>
- #endif<br>
- <br>
<br>
</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><font color="#888888">Nuno Teixeira</font></div><div><div><font color="#888888">
FreeBSD UNIX:  &lt;eduardo@FreeBSD.org&gt;   Web:  <a href="https://FreeBSD.org" rel="noreferrer" target="_blank">https://FreeBSD.org</a><br></font></div></div></div></div>;
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UKUJV%2BXM0jBaSJCbYCShLc52nicRSwm6syGEgyyY_ngaQ>