Make cross-compilation more consistent across devices
Please fill out the following before requesting review on this PR
Description
Our cross-compilation is inconsistent across Ubuntu 20, 22 and 24 platforms and there are certain bugs that come from it. For example, Ubuntu 24 on ARM machines aren't able to compile code for the Jetson Nanos as a result of the different in GLIBC versions.
I standardized the cross-compilers to target GLIBC 2.27 and upgraded it to use gcc 8.
More details to come here: https://www.notion.so/ubcthunderbots/Toolchains-1b01e25196bd802c82c5f570f7584fb2?pvs=4
Testing Done
Compiles on my Ubuntu 24 machine, Ubuntu 22 desktop and Ubuntu 24 ARM emulator. Also runs on robots.
Resolved Issues
Length Justification and Key Files to Review
- Most of these changes are linting changes due to the clang-format upgrade
- Relevant toolchain files:
environment_setup/setup_software.shenvironment_setup/util.shsrc/WORKSPACEsrc/cc_toolchain/BUILDsrc/cc_toolchain/wrapper
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
- [ ] Function & Class comments: All function definitions (usually in the
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class. - [ ] Remove all commented out code
- [ ] Remove extra print statements: for example, those just used for testing
- [ ] Resolve all TODO's: All
TODO(or similar) statements should either be completed or associated with a github issue
@itsarune Could you link the relevant changed files? Most of these are changes from the new clang-format right?
@itsarune Could you link the relevant changed files? Most of these are changes from the new
clang-formatright?
Yup most of these are linting changes. These are the toolchain specific ones:
environment_setup/setup_software.shenvironment_setup/util.shsrc/WORKSPACEsrc/cc_toolchain/BUILDsrc/cc_toolchain/wrapper
but the meat of the work here in the PR is the configurations for building the toolchains (which is in the notion link about how these compilers are generated: https://www.notion.so/ubcthunderbots/Toolchains-1b01e25196bd802c82c5f570f7584fb2?pvs=4)
Thanks @itsarune for the detailed toolchain docs -- very helpful documentation to have!