Cross-Building Strategies in the Age of C++ Package Managers
summary
Claims that modern Cpp package managers like Conan and vcpkg can orchestrate cross-builds by supplying compiler toolchains, profiles and sysroots and by distinguishing build vs host contexts. Demonstrates cross-building zlib and protobuf, verifies resulting binaries’ architectures, and shows splitting protobuf into protobuf-compiler and protobuf-lib or packaging a toolchain with sysroot to avoid patching downstream build scripts. Targets ARM Linux and macOS Intel/ARM, highlights CI-friendly reproducible binaries and the tricky case of executables tightly coupled to host libraries.
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:19ARM ubiquity
- 3:19Why cross build?
- 7:38Getting started
- 8:10Cross-building terminology
- 11:54Building dependencies: the compiler (cont'd)
- 12:53Strategy: Leverage the package manager to specify the compiler
- 14:42Building ZLIB, macOS example
- 15:57Strategy 2: Package your compiler toolchain up
- 18:06Executable dependencies
- 18:54Strategy: requirements for build-time executables
- 20:14Library and executable combos
- 21:18Strategy: same requirement in both contexts
- 22:20Strategy: split packages for executable and library
- 28:36"Sysroot" and system libraries on Linux
- 29:56"Sysroot" on embedded Linux - caveats
- 30:44Strategy: package the root filesystem
- 31:48Ready to build our own code!
- 33:37Closing remarks
related talks
28mUtilizing Bazel for Cross-Platform and Cross-Architecture Compilation an...
46mBuilding and Packaging Modern C++
01h 01mGit, CMake, Conan - How to ship and reuse our C++ projects
57mUsing Conan in a real-world complex project
58mHow Can Package Managers Handle ABI (In)compatibility in C++?
01h 12mA Common Package Specification: Getting Build Tools to Talk to Each Other: Lessons Learned From Making Thousands of Binaries Consumable by Any Build System
50mModern DevOps in C and C++
42mUsing vcpkg in anger
