* [PATCH] libbpf: Remove arch-specific include path in Makefile
@ 2020-09-02 8:42 Naveen N. Rao
2020-09-02 20:58 ` Andrii Nakryiko
0 siblings, 1 reply; 5+ messages in thread
From: Naveen N. Rao @ 2020-09-02 8:42 UTC (permalink / raw)
To: bpf, netdev, Alexei Starovoitov, Daniel Borkmann
Cc: Jiri Olsa, Vaidyanathan Srinivasan
Ubuntu mainline builds for ppc64le are failing with the below error (*):
CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
DESCEND bpf/resolve_btfids
Auto-detecting system features:
... libelf: [ [32mon[m ]
... zlib: [ [32mon[m ]
... bpf: [ [31mOFF[m ]
BPF API too old
make[6]: *** [Makefile:295: bpfdep] Error 1
make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
make[1]: *** [Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/home/kernel/COD/linux'
resolve_btfids needs to be build as a host binary and it needs libbpf.
However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
This results in mixing of cross-architecture headers resulting in a
build failure.
The specific header include path doesn't seem necessary for a libbpf
build. Hence, remove the same.
(*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log
Reported-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
This is a simpler fix that seems to work and I saw the proper headers
from within tools/ being included in both cross-architecture builds as
well as a native ppc64le build. I am not sure if there is a better way
to ask kbuild to build resolve_btfids/libbpf for the host architecture,
and if that will set $(ARCH) appropriately.
- Naveen
tools/lib/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index adbe994610f2..fccc4dcda4b6 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -62,7 +62,7 @@ FEATURE_USER = .libbpf
FEATURE_TESTS = libelf zlib bpf
FEATURE_DISPLAY = libelf zlib bpf
-INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
+INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
check_feat := 1
base-commit: 0697fecf7ecd8abf70d0f46e6a352818e984cc9f
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] libbpf: Remove arch-specific include path in Makefile
2020-09-02 8:42 [PATCH] libbpf: Remove arch-specific include path in Makefile Naveen N. Rao
@ 2020-09-02 20:58 ` Andrii Nakryiko
2020-09-02 21:51 ` Daniel Borkmann
0 siblings, 1 reply; 5+ messages in thread
From: Andrii Nakryiko @ 2020-09-02 20:58 UTC (permalink / raw)
To: Naveen N. Rao
Cc: bpf, Networking, Alexei Starovoitov, Daniel Borkmann, Jiri Olsa,
Vaidyanathan Srinivasan
On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao
<naveen.n.rao@linux.vnet.ibm.com> wrote:
>
> Ubuntu mainline builds for ppc64le are failing with the below error (*):
> CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
> DESCEND bpf/resolve_btfids
>
> Auto-detecting system features:
> ... libelf: [ [32mon[m ]
> ... zlib: [ [32mon[m ]
> ... bpf: [ [31mOFF[m ]
>
> BPF API too old
> make[6]: *** [Makefile:295: bpfdep] Error 1
> make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
> make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
> make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
> make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
> make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
> make[1]: *** [Makefile:185: __sub-make] Error 2
> make[1]: Leaving directory '/home/kernel/COD/linux'
>
> resolve_btfids needs to be build as a host binary and it needs libbpf.
> However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
> This results in mixing of cross-architecture headers resulting in a
> build failure.
>
> The specific header include path doesn't seem necessary for a libbpf
> build. Hence, remove the same.
>
> (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log
>
> Reported-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
This seems to still build fine for me, so I seems fine. Not sure why
that $(ARCH)/include/uapi path is there.
Acked-by: Andrii Nakryiko <andriin@fb.com>
> This is a simpler fix that seems to work and I saw the proper headers
> from within tools/ being included in both cross-architecture builds as
> well as a native ppc64le build. I am not sure if there is a better way
> to ask kbuild to build resolve_btfids/libbpf for the host architecture,
> and if that will set $(ARCH) appropriately.
>
> - Naveen
>
>
> tools/lib/bpf/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
> index adbe994610f2..fccc4dcda4b6 100644
> --- a/tools/lib/bpf/Makefile
> +++ b/tools/lib/bpf/Makefile
> @@ -62,7 +62,7 @@ FEATURE_USER = .libbpf
> FEATURE_TESTS = libelf zlib bpf
> FEATURE_DISPLAY = libelf zlib bpf
>
> -INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
> +INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/include/uapi
> FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
>
> check_feat := 1
>
> base-commit: 0697fecf7ecd8abf70d0f46e6a352818e984cc9f
> --
> 2.25.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libbpf: Remove arch-specific include path in Makefile
2020-09-02 20:58 ` Andrii Nakryiko
@ 2020-09-02 21:51 ` Daniel Borkmann
2020-09-03 5:46 ` Naveen N. Rao
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2020-09-02 21:51 UTC (permalink / raw)
To: Andrii Nakryiko, Naveen N. Rao
Cc: bpf, Networking, Alexei Starovoitov, Jiri Olsa, Vaidyanathan Srinivasan
On 9/2/20 10:58 PM, Andrii Nakryiko wrote:
> On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao
> <naveen.n.rao@linux.vnet.ibm.com> wrote:
>>
>> Ubuntu mainline builds for ppc64le are failing with the below error (*):
>> CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
>> DESCEND bpf/resolve_btfids
>>
>> Auto-detecting system features:
>> ... libelf: [ [32mon[m ]
>> ... zlib: [ [32mon[m ]
>> ... bpf: [ [31mOFF[m ]
>>
>> BPF API too old
>> make[6]: *** [Makefile:295: bpfdep] Error 1
>> make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
>> make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
>> make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
>> make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
>> make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
>> make[1]: *** [Makefile:185: __sub-make] Error 2
>> make[1]: Leaving directory '/home/kernel/COD/linux'
>>
>> resolve_btfids needs to be build as a host binary and it needs libbpf.
>> However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
>> This results in mixing of cross-architecture headers resulting in a
>> build failure.
>>
>> The specific header include path doesn't seem necessary for a libbpf
>> build. Hence, remove the same.
>>
>> (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log
>>
>> Reported-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com>
>> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>> ---
>
> This seems to still build fine for me, so I seems fine. Not sure why
> that $(ARCH)/include/uapi path is there.
>
> Acked-by: Andrii Nakryiko <andriin@fb.com>
Same here, builds fine from my side too. Looks like this was from the very early days,
added in commit 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature
check"). Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libbpf: Remove arch-specific include path in Makefile
2020-09-02 21:51 ` Daniel Borkmann
@ 2020-09-03 5:46 ` Naveen N. Rao
2020-09-03 13:51 ` Daniel Borkmann
0 siblings, 1 reply; 5+ messages in thread
From: Naveen N. Rao @ 2020-09-03 5:46 UTC (permalink / raw)
To: Andrii Nakryiko, Daniel Borkmann
Cc: Alexei Starovoitov, bpf, Jiri Olsa, Networking, Vaidyanathan Srinivasan
Daniel Borkmann wrote:
> On 9/2/20 10:58 PM, Andrii Nakryiko wrote:
>> On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao
>> <naveen.n.rao@linux.vnet.ibm.com> wrote:
>>>
>>> Ubuntu mainline builds for ppc64le are failing with the below error (*):
>>> CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
>>> DESCEND bpf/resolve_btfids
>>>
>>> Auto-detecting system features:
>>> ... libelf: [ [32mon[m ]
>>> ... zlib: [ [32mon[m ]
>>> ... bpf: [ [31mOFF[m ]
>>>
>>> BPF API too old
>>> make[6]: *** [Makefile:295: bpfdep] Error 1
>>> make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
>>> make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
>>> make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
>>> make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
>>> make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
>>> make[1]: *** [Makefile:185: __sub-make] Error 2
>>> make[1]: Leaving directory '/home/kernel/COD/linux'
>>>
>>> resolve_btfids needs to be build as a host binary and it needs libbpf.
>>> However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
>>> This results in mixing of cross-architecture headers resulting in a
>>> build failure.
>>>
>>> The specific header include path doesn't seem necessary for a libbpf
>>> build. Hence, remove the same.
>>>
>>> (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log
>>>
>>> Reported-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com>
>>> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>>> ---
>>
>> This seems to still build fine for me, so I seems fine. Not sure why
>> that $(ARCH)/include/uapi path is there.
>>
>> Acked-by: Andrii Nakryiko <andriin@fb.com>
>
> Same here, builds fine from my side too. Looks like this was from the very early days,
> added in commit 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature
> check"). Applied, thanks!
Thanks!
Daniel, I see that this has been applied to bpf-next. Can you please
consider sending this in for v5.9-rc series so as to resolve the build
failures?
- Naveen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libbpf: Remove arch-specific include path in Makefile
2020-09-03 5:46 ` Naveen N. Rao
@ 2020-09-03 13:51 ` Daniel Borkmann
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2020-09-03 13:51 UTC (permalink / raw)
To: Naveen N. Rao, Andrii Nakryiko
Cc: Alexei Starovoitov, bpf, Jiri Olsa, Networking, Vaidyanathan Srinivasan
On 9/3/20 7:46 AM, Naveen N. Rao wrote:
> Daniel Borkmann wrote:
>> On 9/2/20 10:58 PM, Andrii Nakryiko wrote:
>>> On Wed, Sep 2, 2020 at 1:43 AM Naveen N. Rao
>>> <naveen.n.rao@linux.vnet.ibm.com> wrote:
>>>>
>>>> Ubuntu mainline builds for ppc64le are failing with the below error (*):
>>>> CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
>>>> DESCEND bpf/resolve_btfids
>>>>
>>>> Auto-detecting system features:
>>>> ... libelf: [ [32mon[m ]
>>>> ... zlib: [ [32mon[m ]
>>>> ... bpf: [ [31mOFF[m ]
>>>>
>>>> BPF API too old
>>>> make[6]: *** [Makefile:295: bpfdep] Error 1
>>>> make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
>>>> make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
>>>> make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
>>>> make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
>>>> make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
>>>> make[1]: *** [Makefile:185: __sub-make] Error 2
>>>> make[1]: Leaving directory '/home/kernel/COD/linux'
>>>>
>>>> resolve_btfids needs to be build as a host binary and it needs libbpf.
>>>> However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
>>>> This results in mixing of cross-architecture headers resulting in a
>>>> build failure.
>>>>
>>>> The specific header include path doesn't seem necessary for a libbpf
>>>> build. Hence, remove the same.
>>>>
>>>> (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log
>>>>
>>>> Reported-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com>
>>>> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>>>> ---
>>>
>>> This seems to still build fine for me, so I seems fine. Not sure why
>>> that $(ARCH)/include/uapi path is there.
>>>
>>> Acked-by: Andrii Nakryiko <andriin@fb.com>
>>
>> Same here, builds fine from my side too. Looks like this was from the very early days,
>> added in commit 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature
>> check"). Applied, thanks!
>
> Thanks!
>
> Daniel, I see that this has been applied to bpf-next. Can you please consider sending this in for v5.9-rc series so as to resolve the build failures?
Ok, done, I've moved it to bpf tree so its on track for 5.9.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-03 14:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 8:42 [PATCH] libbpf: Remove arch-specific include path in Makefile Naveen N. Rao
2020-09-02 20:58 ` Andrii Nakryiko
2020-09-02 21:51 ` Daniel Borkmann
2020-09-03 5:46 ` Naveen N. Rao
2020-09-03 13:51 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).