[lxc-devel] [PATCH] Link against pthread when not on bionic.

Natanael Copa ncopa at alpinelinux.org
Tue Feb 19 09:08:51 UTC 2013


On Mon, 18 Feb 2013 12:23:24 -0500
Stéphane Graber <stgraber at ubuntu.com> wrote:

> dpkg spotted that we're not explicitly linking against pthread even though
> we use some of its symbols (sem_*).
> 
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
>  src/lxc/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
> index 8974ca9..a0077aa 100644
> --- a/src/lxc/Makefile.am
> +++ b/src/lxc/Makefile.am
> @@ -115,7 +115,7 @@ liblxc_so_LDFLAGS = \
>  liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS)
>  
>  if !IS_BIONIC
> -liblxc_so_LDADD += -lutil -lrt
> +liblxc_so_LDADD += -lutil -lrt -lpthread
>  endif
>  
>  bin_SCRIPTS = \

I don't like conditions based on system. It is normally better let the
configure script test different common variants and pick what works, eg
use AC_SEARCH_LIBS.

-nc




More information about the lxc-devel mailing list