Re: [PATCH dwarves] Add missing lib/include/bpf -> ../bpf/src symlink

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

 



On Fri, Jun 11, 2021 at 4:03 PM Luca Boccassi <bluca@xxxxxxxxxx> wrote:
>
> The original "libbpf: allow to use packaged version" had a symlink
> as suggested during review:
>
> https://www.spinics.net/lists/dwarves/msg00738.html
>
> git show 82749180b23d3c9c060108bc290ae26507fc324e -- lib/include
> commit 82749180b23d3c9c060108bc290ae26507fc324e
> Author: Luca Boccassi <bluca@xxxxxxxxxx>
> Date:   Mon Jan 4 22:16:22 2021 +0000
>
>     libbpf: allow to use packaged version
>
>     Add a new CMake option, LIBBPF_EMBEDDED, to switch between the
>     embedded version and the system version (searched via pkg-config)
>     of libbpf. Set the embedded version as the default.
>
>     Signed-off-by: Luca Boccassi <bluca@xxxxxxxxxx>
>     Cc: dwarves@xxxxxxxxxxxxxxx
>     Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> diff --git a/lib/include/bpf b/lib/include/bpf
> new file mode 120000
> index 0000000..4c41b71
> --- /dev/null
> +++ b/lib/include/bpf
> @@ -0,0 +1 @@
> +../bpf/src
> \ No newline at end of file
>
> This patch was reverted, and then re-added manually.
> But the re-add dropped the symlink, which causes the system bpf/btf.h
> to be picked up instead of the local one. Re-add it.
>
> Signed-off-by: Luca Boccassi <bluca@xxxxxxxxxx>
> ---

This fixes the issue for me in my local setup:

Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>


Arnaldo,

Locally I have still another issue, which I don't believe is related
to Luca's changes. I get this error:

$ make -j60
[ 25%] Built target bpf
[ 26%] Building C object CMakeFiles/dwarves.dir/btf_encoder.c.o
In file included from /usr/include/sys/stat.h:106:0,
                 from /home/andriin/local/pahole/btf_encoder.c:24:
/usr/include/bits/stat.h:106:31: error: expected identifier or ‘(’
before ‘[’ token
     __syscall_slong_t __unused[3];
                               ^
/usr/include/bits/stat.h:164:31: error: expected identifier or ‘(’
before ‘[’ token
     __syscall_slong_t __unused[3];
                               ^
make[2]: *** [CMakeFiles/dwarves.dir/btf_encoder.c.o] Error 1
make[1]: *** [CMakeFiles/dwarves.dir/all] Error 2
make: *** [all] Error 2


I think it's some new interplay with dutil.h header defining its own

#define __unused __attribute__ ((unused))

Given __unused is used in vmlinux.h and /usr/include/bits/stat.h as
field names, I think it would be better to rename __unused macro
within pahole source code to avoid such confusing problems.


>  lib/include/bpf | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 120000 lib/include/bpf
>
> diff --git a/lib/include/bpf b/lib/include/bpf
> new file mode 120000
> index 0000000..4c41b71
> --- /dev/null
> +++ b/lib/include/bpf
> @@ -0,0 +1 @@
> +../bpf/src
> \ No newline at end of file
> --
> 2.30.2
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux