-
Notifications
You must be signed in to change notification settings - Fork 26
Use system dependencies #14
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
base: main
Are you sure you want to change the base?
Conversation
I had to delete some JSON tests because: - they use tmpnam - tmpnam causes the linker to emit a warning, since it's unsafe - Bazel linking rules treat warnings as errors I tried adding the linkopt -Wl,--no-fatal-warnings but it had no effect.
I guess this goes hand in hand with #15 |
Yes, probably. The devcontainer could supply these dependencies for "development host builds", of course. |
By the way, my system GCC is version 13. I've been trying to build with 14 and 15 too, and they pick up a lot of new errors with baselibs, such missing #includes. So this PR will only build with GCC 13 and lower. |
common --//score/json:base_library=nlohmann | ||
common --extra_toolchains=@gcc_toolchain//:host_gcc_12 | ||
build --incompatible_strict_action_env | ||
build --cxxopt=-std=c++17 --cxxopt=-Wno-error=deprecated-declarations --cxxopt=-Wno-error=self-move --cxxopt=-Wno-error=pessimizing-move |
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.
This isn't a good solution for compiler flags, since this .bazelrc
is not applied when building this project as a dependenciy via another Bazel project.
A better approach would be to define a toolchain in Bazel which just wraps the system compiler and exposes flags as features.
This is a showcase of baselibs building with all system dependencies for all libraries and tools, for demonstration and discussion.
The S-CORE infrastructure team has been discussing how S-CORE can be integrated into a wider system. It is usually requirements for integrators that:
Currently, S-CORE components do not meet either of these requirements, because:
This PR modifies baselibs to address these points. All dependencies now must be installed in the system in order to build. For me on Ubuntu, that means installing these packages:
g++ libacl1-dev libcap-dev libseccomp-dev valgrind libboost-container1.83-dev nlohmann-json3-dev