-
Notifications
You must be signed in to change notification settings - Fork 190
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
Cannot build with Fedora-provided dependencies #90
Comments
Could you provide more details about the error/missing targets? |
I was able to build with CMake on Fedora 35 using these dependencies: sudo dnf install git make automake patch glibc-static libstdc++-static \
cmake ninja-build python3 python3-pip clang-devel libcap-devel
pip3 install absl-py clang We'll update the documentation with instructions for Fedora eventually. But only after we have a CI build that runs Fedora. |
@cblichmann did you disable all of the various download options? |
Define "various download options"? The CMake build system will still download libffi, libunwind, gflags, glog and protobuf. |
Those can all be disabled with various CMake variables. When I do that (so I can use the system versions) the build fails. |
Alright, can you post the exact CMake command-line you used and the full output as well? Which version of Fedora are you on? |
I’m on Fedora 35. I will post the exact command I used later. |
We have a GibHub CI build that uses Fedora 35 now. |
Closing under the assumption that using OS-provided versions of libffi, libunwind, gflags, glob, and protobuf is not a supported configuration. |
Script used: #!/bin/bash --
set -eu
unset v u i do_configure
case $0 in (/*) cd "${0%/*}/";; (*/*) cd "./${0%/*}";; (*) :;; esac
do_configure=0
if [ "${1-}" = --configure ]; then
do_configure=1
shift
fi
if [ ! -f build/build.ninja ]; then
mkdir -p -m 0700 -- build
do_configure=1
fi
cd build
declare -a v u
v=(ABSL GOOGLETEST GFLAGS GLOG PROTOBUF LIBUNWIND LIBCAP LIBFFI ZLIB)
for i in "${v[@]}"; do
u+=("-DSAPI_DOWNLOAD_$i:BOOL=OFF")
done
if [ "$do_configure" = 1 ]; then
cmake -GNinja \
-DSAPI_ENABLE_TESTS:BOOL=ON \
-DSAPI_ENABLE_EXAMPLES:BOOL=ON \
-DSAPI_ENABLE_CONTRIB_TESTS:BOOL=ON \
-DCMAKE_C_COMPILER:PATH=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER:PATH=/usr/bin/g++ \
-DCMAKE_MAKE_PROGRAM:PATH=/usr/bin/ninja \
-DSAPI_ENABLE_GENERATOR:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF \
"${u[@]}" \
..
fi
exec ninja "$@" Error message:
|
Disabling the downloading of the third party dependencies is not really tested. For some, like GoogleTest (and Abseil LTS) as well as Protobuf, I suppose it can be made to work, but other (libunwind) need special build settings. And gflags will likely be problematic as well (it'll conflict with the version shipped with GoogleTest and enabled in system builds). |
From the perspective of Linux distribution maintainers, it would be great if:
Every distribution I know of has a strict “no network access during build” policy, and I would rather distributions not need to patch SAPI for this to work. |
That'd imply that we'd have more extensive coverage for multiple distributions and package versions.
That's actually what the
I believe that is what Abseil LTS does.
Another culture clash with Google internals: at Google, we build everything in what we call "mostly static" mode. That is, link everything statically, except libc, libm, libdl and libpthread (IIRC there may be others).
And that is the only sane way to do it, of course. What I meant by "it not really tested", is just that -- we don't have a CI setup for this (yet). |
Fedora doesn’t ship Bazel, and cmake complains about various missing targets.
The text was updated successfully, but these errors were encountered: