bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] coreutils: fix build with uClibc


From: Baruch Siach
Subject: Re: [PATCH] coreutils: fix build with uClibc
Date: Tue, 14 Jan 2014 20:53:02 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Pádraig,

On Tue, Jan 14, 2014 at 05:46:50PM +0000, Pádraig Brady wrote:
> I noticed this issue from:
> http://permalink.gmane.org/gmane.comp.lib.uclibc.buildroot/73294
> 
> I've not tested the following on uclibc, but does the attached patch fix it?
> (you just need to patch the m4/spawn_h.m4 file in coreutils to test this)

I guess it should fix the problem, but it would be better to fix uClibc. The 
posix_spawn feature is not present yet in any released version of uClibc, only 
in the development tree. My proposed uClibc patch 
(http://article.gmane.org/gmane.comp.lib.uclibc.general/23700) moves 
posix_spawn to libc for compatibility with glibc.

The direct cause of build failure at 
http://autobuild.buildroot.net/results/ab1/ab1250c3d402ec3fbaf22eeffd07de218ffafb22/build-end.log
 
though, is not the mis-detection of posix_spawn, but that for some reason the 
alternative gnulib implementation doesn't see the members of the 
posix_spawn_file_actions_t struct. I have not figured out how this happens.

baruch

> From 71cf16e435bf5db64abcf81a9dc6dc36ce37d58d Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Tue, 14 Jan 2014 16:59:07 +0000
> Subject: [PATCH] spawn: fix link error on uclibc
> 
> * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
> to incorporate -lrt if needed (on uclibc for example).
> * modules/posix_spawn: Reference the substituted LIB.
> ---
>  ChangeLog           |    8 +++++++-
>  m4/spawn_h.m4       |   10 +++++++++-
>  modules/posix_spawn |    3 +++
>  3 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 448f882..9836c82 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2014-01-14  P??draig Brady <address@hidden>
> +
> +     spawn: fix link error on uclibc
> +     * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
> +     to incorporate -lrt if needed (on uclibc for example).
> +     * modules/posix_spawn: Reference the substituted LIB.
> +
>  2014-01-03  Jim Meyering  <address@hidden>
>  
>       maint.mk: adapt openat.h-include-without-use test
> @@ -59,7 +66,6 @@
>       directory now passes for me.
>  
>  2014-01-03  Paul Eggert  <address@hidden>
> -
>       doc: use ASCII in .texi files where UTF-8 isn't needed
>       * doc/posix-functions/crypt.texi, doc/posix-functions/encrypt.texi:
>       * doc/posix-functions/setkey.texi, doc/regex.texi:
> diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4
> index 87fe122..3eb835c 100644
> --- a/m4/spawn_h.m4
> +++ b/m4/spawn_h.m4
> @@ -64,7 +64,15 @@ AC_DEFUN([gl_HAVE_POSIX_SPAWN],
>    dnl once only, before all statements that occur in other macros.
>    AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
>  
> -  AC_CHECK_FUNCS_ONCE([posix_spawn])
> +  LIB_POSIX_SPAWN=
> +  AC_SUBST([LIB_POSIX_SPAWN])
> +  gl_saved_libs=$LIBS
> +    AC_SEARCH_LIBS([posix_spawn], [rt],
> +                   [test "$ac_cv_search_posix_spawn" = "none required" ||
> +                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn])
> +    AC_CHECK_FUNCS([posix_spawn])
> +  LIBS=$gl_saved_libs
> +
>    if test $ac_cv_func_posix_spawn != yes; then
>      HAVE_POSIX_SPAWN=0
>    fi
> diff --git a/modules/posix_spawn b/modules/posix_spawn
> index ec8eac1..62b0956 100644
> --- a/modules/posix_spawn
> +++ b/modules/posix_spawn
> @@ -23,6 +23,9 @@ Makefile.am:
>  Include:
>  <spawn.h>
>  
> +Link:
> +$(LIB_POSIX_SPAWN)
> +
>  License:
>  LGPLv2+
>  
> -- 
> 1.7.7.6
> 


-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - address@hidden - tel: +972.2.679.5364, http://www.tkos.co.il -



reply via email to

[Prev in Thread] Current Thread [Next in Thread]