[PATCH virtme-docker 2/3] upgrade to ubuntu 23.10

Geliang Tang posted 3 patches 2 months, 2 weeks ago
[PATCH virtme-docker 2/3] upgrade to ubuntu 23.10
Posted by Geliang Tang 2 months, 2 weeks ago
There will be many build errors when comliling bpf selftests under
Ubuntu 22.04. Upgrade to 23.10 to use the new versions of gcc, clang
and LLVM.

Fix sparse build errors for llvm-16. This part alse be sent to sparse
upstream. It can be dropped from this patch when accepted.

Signed-off-by: Geliang Tang <geliang@kernel.org>
---
 Dockerfile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index cf8c692..cbc11f7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:22.04
+FROM ubuntu:23.10
 
 LABEL name=mptcp-upstream-virtme-docker
 
@@ -71,6 +71,10 @@ ARG SPARSE_GIT_SHA="ce1a6720f69e6233ec9abd4e9aae5945e05fda41" # include a fix fo
 RUN cd /opt && \
 	git clone "${SPARSE_GIT_URL}" sparse && \
 	cd "sparse" && \
+		sed -i 's/LLVMConstGEP(/LLVMConstGEP2(type, /g' sparse-llvm.c && \
+		sed -i 's/LLVMBuildInBoundsGEP(builder/LLVMBuildInBoundsGEP2(builder, type/g' sparse-llvm.c && \
+		sed -i 's/LLVMBuildLoad(fn->builder/LLVMBuildLoad2(fn->builder, insn_symbol_type(insn)/g' sparse-llvm.c && \
+		sed -i 's/LLVMBuildCall(fn->builder/LLVMBuildCall2(fn->builder, insn_symbol_type(insn)/g' sparse-llvm.c && \
 		make -j"$(nproc)" -l"$(nproc)" && \
 		make PREFIX=/usr install && \
 		cd .. && \
-- 
2.40.1
Re: [PATCH virtme-docker 2/3] upgrade to ubuntu 23.10
Posted by Geliang Tang 2 months, 2 weeks ago
On Sun, Jan 28, 2024 at 02:16:02PM +0800, Geliang Tang wrote:
> There will be many build errors when comliling bpf selftests under
> Ubuntu 22.04. Upgrade to 23.10 to use the new versions of gcc, clang
> and LLVM.
> 
> Fix sparse build errors for llvm-16. This part alse be sent to sparse
> upstream. It can be dropped from this patch when accepted.

This part has been upstreamed, we can drop it now from this patch.

> 
> Signed-off-by: Geliang Tang <geliang@kernel.org>
> ---
>  Dockerfile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Dockerfile b/Dockerfile
> index cf8c692..cbc11f7 100644
> --- a/Dockerfile
> +++ b/Dockerfile
> @@ -1,4 +1,4 @@
> -FROM ubuntu:22.04
> +FROM ubuntu:23.10
>  
>  LABEL name=mptcp-upstream-virtme-docker
>  
> @@ -71,6 +71,10 @@ ARG SPARSE_GIT_SHA="ce1a6720f69e6233ec9abd4e9aae5945e05fda41" # include a fix fo
>  RUN cd /opt && \
>  	git clone "${SPARSE_GIT_URL}" sparse && \
>  	cd "sparse" && \
> +		sed -i 's/LLVMConstGEP(/LLVMConstGEP2(type, /g' sparse-llvm.c && \
> +		sed -i 's/LLVMBuildInBoundsGEP(builder/LLVMBuildInBoundsGEP2(builder, type/g' sparse-llvm.c && \
> +		sed -i 's/LLVMBuildLoad(fn->builder/LLVMBuildLoad2(fn->builder, insn_symbol_type(insn)/g' sparse-llvm.c && \
> +		sed -i 's/LLVMBuildCall(fn->builder/LLVMBuildCall2(fn->builder, insn_symbol_type(insn)/g' sparse-llvm.c && \
>  		make -j"$(nproc)" -l"$(nproc)" && \
>  		make PREFIX=/usr install && \
>  		cd .. && \
> -- 
> 2.40.1
Re: [PATCH virtme-docker 2/3] upgrade to ubuntu 23.10
Posted by Matthieu Baerts 2 months, 2 weeks ago
Hi Geliang,

On 30/01/2024 01:50, Geliang Tang wrote:
> On Sun, Jan 28, 2024 at 02:16:02PM +0800, Geliang Tang wrote:
>> There will be many build errors when comliling bpf selftests under
>> Ubuntu 22.04. Upgrade to 23.10 to use the new versions of gcc, clang
>> and LLVM.
>>
>> Fix sparse build errors for llvm-16. This part alse be sent to sparse
>> upstream. It can be dropped from this patch when accepted.
> 
> This part has been upstreamed, we can drop it now from this patch.

Thank you for the patches and this note, I didn't see it has been fixed
upstream.

I didn't know you needed to upgrade to Ubuntu 23.10. I did something
similar for your two first patches last week when looking at the issue
471 [1] to switch to a more recent version of QEmu, but I didn't push my
changes. I hope you don't mind if I apply my modifications (with your
co-dev tag) where I use new versions of the dependences instead of
patching them.

I will look at the patch 3/3 (v2). I will need to modify it slightly I
think not to have the current CI failing. I can also look at modifying
the current CI job to validate this BPF test. I will probably need more
conditions to be able to run on older kernels as well. I will push that
after having done some tests, not to have regressions for the tests we
are currently validating.

[1] https://github.com/multipath-tcp/mptcp_net-next/issues/471

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH virtme-docker 2/3] upgrade to ubuntu 23.10
Posted by Geliang Tang 2 months, 2 weeks ago
On Tue, Jan 30, 2024 at 04:50:46PM +0100, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 30/01/2024 01:50, Geliang Tang wrote:
> > On Sun, Jan 28, 2024 at 02:16:02PM +0800, Geliang Tang wrote:
> >> There will be many build errors when comliling bpf selftests under
> >> Ubuntu 22.04. Upgrade to 23.10 to use the new versions of gcc, clang
> >> and LLVM.
> >>
> >> Fix sparse build errors for llvm-16. This part alse be sent to sparse
> >> upstream. It can be dropped from this patch when accepted.
> > 
> > This part has been upstreamed, we can drop it now from this patch.
> 
> Thank you for the patches and this note, I didn't see it has been fixed
> upstream.

It fixed in the commit 0544c547 ("llvm: fix LLVM 15 deprecation
warnings").

> 
> I didn't know you needed to upgrade to Ubuntu 23.10. I did something
> similar for your two first patches last week when looking at the issue
> 471 [1] to switch to a more recent version of QEmu, but I didn't push my
> changes. I hope you don't mind if I apply my modifications (with your
> co-dev tag) where I use new versions of the dependences instead of
> patching them.

Sure, thanks.

-Geliang

> 
> I will look at the patch 3/3 (v2). I will need to modify it slightly I
> think not to have the current CI failing. I can also look at modifying
> the current CI job to validate this BPF test. I will probably need more
> conditions to be able to run on older kernels as well. I will push that
> after having done some tests, not to have regressions for the tests we
> are currently validating.
> 
> [1] https://github.com/multipath-tcp/mptcp_net-next/issues/471
> 
> Cheers,
> Matt
> -- 
> Sponsored by the NGI0 Core fund.