lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Dec 2019 19:33:49 +0000
From:   Yonghong Song <yhs@...com>
To:     Andrii Nakryiko <andriin@...com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        "daniel@...earbox.net" <daniel@...earbox.net>
CC:     "andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>,
        Kernel Team <Kernel-team@...com>,
        Luca Boccassi <bluca@...ian.org>
Subject: Re: [PATCH bpf-next] libbpf: add zlib as a dependency in pkg-config
 template



On 12/16/19 10:38 AM, Andrii Nakryiko wrote:
> List zlib as another dependency of libbpf in pkg-config template.
> Verified it is correctly resolved to proper -lz flag:
> 
> $ make DESTDIR=/tmp/libbpf-install install
> $ pkg-config --libs /tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc
> -L/usr/local/lib64 -lbpf
> $ pkg-config --libs --static /tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc
> -L/usr/local/lib64 -lbpf -lelf -lz

Even without this patch, I already got -lz for static link libraries:

-bash-4.4$ cat libbpf.pc.template
...
Requires.private: libelf
...
-bash-4.4$ pkg-config --libs --static 
/tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc
-L/usr/local/lib64 -lbpf -lelf -lz

libelf depending on zlib. Maybe -lz is introduced due to libelf.

But in any case, add explicit dependency to zlib from libbpf probably
a good thing since libbpf directly uses its API functions.

Acked-by: Yonghong Song <yhs@...com>


[...]
> diff --git a/tools/lib/bpf/libbpf.pc.template b/tools/lib/bpf/libbpf.pc.template
> index ac17fcef2108..b45ed534bdfb 100644
> --- a/tools/lib/bpf/libbpf.pc.template
> +++ b/tools/lib/bpf/libbpf.pc.template
> @@ -8,5 +8,5 @@ Name: libbpf
>   Description: BPF library
>   Version: @VERSION@
>   Libs: -L${libdir} -lbpf
> -Requires.private: libelf
> +Requires.private: libelf zlib
>   Cflags: -I${includedir}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ