-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INSTA-16822: Build on ubuntu+clang17, fix cross-build, QA #9
base: main
Are you sure you want to change the base?
Conversation
Migrate the build from DockerHub debian:testing to ubuntu:22.04. Attention: Clang version on this image is 17, not 16. Isolate docker files in directory docker-image. Introduce an entrypoint for the docker image, to better deal with the GO environment. Dockerfile: install GolangCi deps in the docker image, copy the binaries in the container's workdir in /agent/go/bin. Makefile: fix the clean target. Makefiles: substitute clang-16 with clang. Makefile: remove the installation of GolangCi deps during linting. Makefile: add targets for GO deps management Makefile: pin GO deps versions Makefile: pin porto version to "v0.6.0" (instead of latest). The latest version of porto requires GO 1.23, while the current toolchain is based on Go 1.22. Makefile: improve target linter-version, print all GolangCi deps versions. GO: touch go/bin/.gitkeep, the directory bin contains the GO deps print_instruction_count: fix OBJDUMP_CMD from llvm-objdump-16 to llvm-objdump. Makefile: Fix cross-compilation Always use NATIVE_ARCH as GOARCH for go:generate. The previous approach may fail on systems that can not execute cross-compiled binaries on the build host (e.g. if an appropriate qemu binary is not installed).
Quality Gate passedIssues Measures |
In our huddle with @Bhavna-Jindal we reviewed the method of patching and arrived to this conclusion together:
|
@@ -27,7 +27,7 @@ endif | |||
COMPILER_TARGET ?= $(COMPILER_TARGET_ARCH)-redhat-linux | |||
SYSROOT_PATH ?= / | |||
|
|||
export CC = clang-16 | |||
export CC = clang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be clang-17?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing the package clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz
, the clang
command is already at version 17.
I thought this was enough for us and we wouldn't actually need an alias as clang-17=clang
.
In a way, keeping CC=clang-17 and creating the above alias in the docker image, would make it clear to developers what is the toolchain we are using, just reading the Makefile. But we can also drop this info in the README.
let me know what you prefer and I will change accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just dropping this info in README should be enough.
Reference
Jira ticket
WHAT
debian:testing
todelivery.instana.io/int-docker-private-virtual/ubuntu:22.04
Attention: Clang version on this image is 17, not 16.
docker-image
The docker image entrypoint moves to /agent/go/bin all the binaries needed by GO for the generation and linting
Attention: pin porto version to "v0.6.0" (instead of latest). The latest version of porto requires GO 1.23.
WHY
2-8: Fixes