new(ci): use zig compiler instead of relying on centos7.#3307
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/milestone TBD |
|
So, we need to disable the build with shared libelf, because Anyway, even trying with BUNDLED_LIBELF, gives a build error... /hold |
| cmake -B build -S . \ | ||
| -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ | ||
| -DUSE_BUNDLED_DEPS=On \ | ||
| -DUSE_BUNDLED_LIBELF=On \ |
There was a problem hiding this comment.
Enabled bundled libelf to build with zig. Of course this is not desiderable.
e6e593c to
8925c1f
Compare
|
Now failing the build on
That's probably because c-ares does some magic to detect that symbol: https://github.com/c-ares/c-ares/blob/main/CMakeLists.txt#L456; that symbol was added in glibc2.36; most probably it is detecting the symbol even if |
|
I tried to build |
|
Update: i saw that updating c-ares to 1.33.1 (latest release) fixed the issue. I am going to bump it in libs (if possible, ie: if grpc does not complain :/ ) Bump PR in libs: falcosecurity/libs#2034 I now bumped this one to use head of the libs PR with the updated c-ares. 🤞 |
|
So, i now bumped this branch to use libs
On that branch, i was able to build a full BUNDLED_DEPS version of sinsp-example! Moreover, i found out that CMAKE_{C,CXX}_COMPILER truncates |
70e175a to
73b8ed5
Compare
|
To be able to build Falco, for now, i had to disable I opened an upstream issue to track the problem: ziglang/zig#21252 and a PR: ziglang/zig#21253 |
903ec35 to
1bf6742
Compare
5851b6a to
e27cab7
Compare
e27cab7 to
affc009
Compare
|
TODO:
|
|
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
False positive |
|
Yep, tomorrow will rebase on latest libs master that fixes arm64 test-dev-packages and unhold this one :) |
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
98d8dfa to
be9c09d
Compare
|
/unhold |
|
📢 it might happen that master build fails because the cached key (ie: zig version) is no more available and |
|
/hold |
|
I'll keep this on hold until we release Falco 0.39.1 to avoid issues with the new CI. |
|
/unhold |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area CI
What this PR does / why we need it:
This PR drops centos7 from our CI by instead relying on zig compiler to provide glibc 2.17 compatible builds for us.
Which issue(s) this PR fixes:
Fixes #3270
Special notes for your reviewer:
Linked libs PRs:
__gnu_cxx::stdio_filebuflibs#2037 -> title says it allundefined symbol: google::protobuf::internal::InternalMetadata::~InternalMetadata()Trace/breakpoint trapissue for threadinfo and k8saudit plugin opening (source_plugin.c UB)backorfrontwithout checking string emptiness libs#2088 -> more UBs fixes for libsLinked upstream PR:
strl{cat,cpy}against glibc version when _FORTIFY_SOURCE is enabled ziglang/zig#21253TODO:
zigfor sanitizer builds, ie: only use it for to-be-shipped artifacts.-march=armv8-a+crypto, butarmv8is unsupported by zig. Workaround: patch https://github.com/abseil/abseil-cpp/blob/1031858eb2b87a5d47f236d8eac11d8b05c535d5/absl/copts/GENERATED_AbseilCopts.cmake#L225 to use a supported arch name.test-dev-packages-arm64-> it seems like aTrace/breakpoint trapis caught duringsinsp::open...methods calls:test-dev-packages-arm64-> it seems like aTrace/breakpoint trapis caught related to stats_writer line:output_fields["falco.host_boot_ts"] = machine_info->boot_ts_epoch;-> bca6f31test-dev-packages-arm64-> it seems like aTrace/breakpoint trapis caught related to k8saudit openingDoes this PR introduce a user-facing change?: