Tom Pollard <[email protected]> writes:

> Hi,
>
> The freedesktop-sdk project is looking to freeze on the newly released
> glibc 2.44 release for its own upcoming yearly release in August.
>
> Things are fine with m4 1.4.21 and glibc 2.43, but after changing to
> glibc source to 2.44 (& keeping everything else pinned) in our
> buildsystem we're seeing errors when compiling m4 (not architecture
> specific):
>
> ```
>         In file included from ../../lib/execute.c:25:
>         ./spawn.h:1493:1: error: conflicting types for
> 'posix_spawn_file_actions_addchdir'; have
> 'int(rpl_posix_spawn_file_actions_t * restrict,  const char * restrict)'
>          1493 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_addchdir, int,
>               | ^~~~~~~~~~~~~~~~
>         In file included from /usr/include/features.h:540,
>                          from /usr/include/errno.h:25,
>                          from ../../lib/execute.c:24:
>         /usr/include/spawn.h:208:12: note: previous declaration of
> 'posix_spawn_file_actions_addchdir' with type
> 'int(posix_spawn_file_actions_t * restrict,  const char * restrict)'
>           208 | extern int __REDIRECT_NTH
> (posix_spawn_file_actions_addchdir,
>               |            ^~~~~~~~~~~~~~
>         make[3]: *** [Makefile:4778: libm4_a-execute.o] Error 1
> ```
>
> Reference merge request:
>
> https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/33462
>
> Happy to help in anyway I can, if there's any patches already in git but
> as of yet are not propagated to a release tarball I can also try
> applying those.

Thanks for the report.

I haven't seen that issue specifically, but there is some discussion on
libc-alpha and bug-gnulib [1], about a similar issue. I.e., whether or
not it is a glibc bug that the symbols aren't exported so that
AC_CHECK_FUNCS_ONCE sees them.

Until we get that sorted, I think you should be able to use the
following:

    $ ./configure ac_cv_func_posix_spawn_file_actions_addfchdir=yes \
         ac_cv_func_posix_spawn_file_actions_addchdir=yes

That should cause the conflicting function to be renamed with a macro.
The function just uses the *_np variant, so it will work fine.

Hopefully that helps. Let us know if you still run into issues with
that.

Collin

[1] 
https://inbox.sourceware.org/libc-alpha/[email protected]/T/#mf1b386da6723b16d2df5b99a8d3c40874c6979cf

Reply via email to