On currnet glibc, current musl and older uclibc, posix_spawn() is prototyped in <spawn.h> and the symbol is defined in libc.so. In contrast, in the newer versions of uclibc and uclibc-ng, the symbol is defined in librt.so. Both of these choices are in keeping with C99 standards which states that -lrt "shall make available all interfaces referenced in ... <spawn.h>" [1]. The problem in m4-1.4.16 and the lastest usptream 1.4.17 is that its using an older version of spawn_h.m4 to check for posix_spawn(). This is corrected in gnulib with commit [2]. A backport of hunk 2 of that commit fixes things for m4. [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html under "Extended Description Standard Libraries". [2] http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d6eab2e70fc5ccc82a73e5c988b76a229e4cd3d5
@base-system, I went ahead and back ported the patch for m4-1.4.17 which is ~arch across the board. See https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2fb79b419c1da51746a75a5f55e8b10a7993673 Please review and close this bug afterwards.
I forgot to autoreconf. That is now added https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47fa8d902034cc4c84229830affc623f98e85fdf This works on glibc and uclibc.
Because of bug #581086, I'm going to have to patch configure directly.
(In reply to Anthony Basile from comment #3) > Because of bug #581086, I'm going to have to patch configure directly. okay patch updated, no more dependency on autotools.eclass and the patch against configure isn't crazy big. please audit and close this bug if everything is okay.
seems fine enough