help-guix
[Top][All Lists]
Advanced

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

Re: BPF in linux-libre


From: Mathieu Othacehe
Subject: Re: BPF in linux-libre
Date: Fri, 26 Jun 2020 12:50:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello John,

> ld: 
> /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libbfd.a(compress.o):
>  undefined reference to symbol 'inflateEnd'
> ld: 
> /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libz.so.1:
>  error adding symbols: DSO missing from command line
>
> I added zlib to the inputs of bpftrace but still the same error.  Are
> there any CMake experts out there that can tell if there is a flag or
> option to use here? Is this an upstream issue?

By default, a dynamic version of bpftrace is built. However, as we do
not provide a libbpf.so, it falls back on libbpf.a.

There's a comment in FindLibBfd.cmake which says:

--8<---------------cut here---------------start------------->8---
# libbfd.a is not statically linked with libiberty.a or libz.a so we must 
manually
# do it. Furthermore, libbfd uses some libc symbols that we must manually
# link against if we're not using static libc (which includes such symbols).
--8<---------------cut here---------------end--------------->8---

So when STATIC_LINKING is ON, they add "libz" to the required
libraries. It would be preferable to avoid building a static bpftrace,
so I tried to provide a dynamic version of libbpf.

There's still a failure at validate-runpath phase that need to be
fixed, not sure why.

Thanks,

Mathieu

Attachment: diff
Description: Binary data


reply via email to

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