Jon Turney via Cygwin wrote:
On 09/11/2025 16:02, Andrew Schulman via Cygwin wrote:
A message box shown when running an affected program directly from
cmd.exe reveals the problem: Entrypoint "argp_parse" is missing.
$ objdump -p /bin/cygargp-0.dll | grep argp_parse
[ 56] +base[ 57] 0038 rpl_argp_parse
Previous version:
$ objdump -p /bin/cygargp-0.dll | grep argp_parse
[ 24] +base[ 25] 0018 argp_parse
Current <argp.h> actually maps 'argp_parse' to 'rpl_argp_parse':
$ printf '#include <argp.h>\nargp_parse' | gcc -E -xc - | tail -1
rpl_argp_parse
$ grep -B1 rpl_argp_parse /usr/include/argp-config.h
/* Define to the name of argp_parse outside libc. */
#define argp_parse rpl_argp_parse
Good grief. Thanks Christian. So I see a few possible solutions to this:
(1) Recompile all of the Cygwin programs that use argp, so they call
the new
entry point rpl_argp_parse, aliased from argp_parse. (I don't really
want to
do this)
(2) Patch the gnulib source to make argp_parse a function that points to
rpl_argp_parse, instead of just a #define.
(3) File a bug report with the gnulib project and see if they'll fix it.
There are a few other possibilities, such as:
(4) If upstream really intends this to be an ABI break, bump the
soversion to 1 in a new package libargp1 (and we'll keep the existing
libargp (effectively libargp0) around until stuff linking with it is
rebuilt).
(5) If upstream thinks there isn't a stable ABI, stop providing a
shared library, only a static one in libargp-devel.
(6) Patch the gnulib source to drop the #define.
According to this comment+link in argp.m4, the define exists due to a
conflict with same function from glibc:
dnl Rename argp_parse to another symbol, so that clang's ASAN does not
dnl intercept it.
dnl See
<https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00035.html>.
AC_DEFINE([argp_parse], [rpl_argp_parse],
[Define to the name of argp_parse outside libc.])
Under the assumption that there are no plans to add argp_parse() to
cygwin1.dll, it would IMO make more sense to keep the original name.
(Smoke-)tested patch attached.
--
Regards,
Christian
diff -u origsrc/gnulib/argp/glm4/argp.m4 src/gnulib/argp/glm4/argp.m4
--- a/argp/glm4/argp.m4 2025-11-08 01:38:35.000000000 +0100
+++ b/argp/glm4/argp.m4 2025-11-10 12:25:48.909066600 +0100
@@ -15,8 +15,8 @@
dnl Rename argp_parse to another symbol, so that clang's ASAN does not
dnl intercept it.
dnl See
<https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00035.html>.
- AC_DEFINE([argp_parse], [rpl_argp_parse],
- [Define to the name of argp_parse outside libc.])
+ dnl AC_DEFINE([argp_parse], [rpl_argp_parse],
+ dnl [Define to the name of argp_parse outside libc.])
AC_CHECK_DECLS([program_invocation_name],
[],
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple