Skip to content
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

chore: Fix Circle CI build failing #2755

Merged
merged 4 commits into from
Apr 28, 2024
Merged

Conversation

nurupo
Copy link
Member

@nurupo nurupo commented Apr 27, 2024

Circle CI's image got updated to use Ubuntu 24.04 (Noble Numbat), which:

  • Changed a bit how clang is packaged -- libclang_rt.ubsan_standalone-x86_64.a is no longer getting installed
  • Includes a newer clang with more enabled warnings in one the umbrella flags like -Weverything, -Wall, etc., like -Wswitch-default and -Wunsafe-buffer-usage:
    • We actually do not want a default in our switches, we want to explicitly handle every case and get warned when we don't, so -Wswitch-default should be disables

    • -Wunsafe-buffer-usage seems to be broken, it warns on things that are perfectly ok, like doing foo[1] = 0; where uint32_t foo[4];, e.g.

      warning:

      /root/work/toxcore/network.c:966:9: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
        966 |         ip6.uint32[1] = 0;
            |         ^~~~~~~~~~

      on:

      ip6.uint32[1] = 0;

      where uint32 is:

      uint32_t uint32[4];


This change is Reviewable

@nurupo nurupo added the chore Updating grunt tasks etc; no production code change label Apr 27, 2024
@nurupo nurupo added this to the v0.2.20 milestone Apr 27, 2024
@Green-Sky Green-Sky changed the title Fix Circle CI build failing chore: Fix Circle CI build failing Apr 27, 2024
@nurupo nurupo force-pushed the fix-circle-ci branch 3 times, most recently from 47f3c91 to 99a5bea Compare April 27, 2024 16:47
The ubsan build fails due to the missing
/usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.ubsan_standalone-x86_64.a
which is provided by the libclang-rt-18-dev package, which would be
installed if we didn't disallow recommends.

Installing it manually is not practical, as using libclang-rt-18-dev
once clang updates to version 19 would be wrong, and installing
libclang-rt-*-dev would attempt to install all of them, either failing
or installing all of the clang version available along with them. Thus
allowing apt to automatically install recommended packages seems like
best solution.
@nurupo nurupo marked this pull request as ready for review April 27, 2024 18:44
@nurupo nurupo requested a review from a team as a code owner April 27, 2024 18:44
Copy link

codecov bot commented Apr 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.08%. Comparing base (5344d7f) to head (102a1fa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2755      +/-   ##
==========================================
- Coverage   73.09%   73.08%   -0.02%     
==========================================
  Files         149      149              
  Lines       30531    30531              
==========================================
- Hits        22317    22313       -4     
- Misses       8214     8218       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@toktok-releaser toktok-releaser merged commit 102a1fa into TokTok:master Apr 28, 2024
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Updating grunt tasks etc; no production code change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants