Closed bobbbay closed 2 years ago
I was able to reproduce it on my Arch machine.
./gradlew halBaseLinuxathenaReleaseSharedLibrary
> Task :hal:compileHalBaseLinuxathenaReleaseSharedLibraryHalBaseCpp FAILED
/home/tav/frc/wpilib/allwpilib/hal/src/main/native/cpp/ErrorHandling.cpp:5:10: fatal error: fmt/format.h: No such file or directory
#include <fmt/format.h>
^~~~~~~~~~~~~~
compilation terminated.
/home/tav/frc/wpilib/allwpilib/hal/src/main/native/cpp/Main.cpp:7:10: fatal error: wpi/condition_variable.h: No such file or directory
#include <wpi/condition_variable.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/tav/frc/wpilib/allwpilib/hal/src/main/native/cpp/handles/HandlesInternal.cpp:5:0:
/home/tav/frc/wpilib/allwpilib/hal/src/main/native/include/hal/handles/HandlesInternal.h:9:10: fatal error: wpi/Synchronization.h: No such file or directory
#include <wpi/Synchronization.h>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/tav/frc/wpilib/allwpilib/hal/src/main/native/cpp/cpp/fpga_clock.cpp:10:10: fatal error: fmt/format.h: No such file or directory
#include <fmt/format.h>
^~~~~~~~~~~~~~
compilation terminated.
Seems like that rule is just broken.
@ThadHouse?
The halBase tasks can not build a shared library. This is expected. To get the shared library you build halLinuxathenaReleaseSharedLibrary
To add on to this, the *base tasks are there so shared and static binaries can link to the same set of object files (its a gradle hack). The static binary builds of the base task are what are used.
https://github.com/wpilibsuite/allwpilib/blob/main/shared/jni/setupBuild.gradle#L60
The above disables the shared build from running when build
is ran, and then because of the return none of the dependencies are even added. All the buildable flag does is stop it from being a part of the build task. If the task is explicitly ran, as you're doing, it will force it to build, but because we never added any of the dependencies in shared library mode it fails.
Thanks, that did it!
Describe the question you have. I'm trying to build WPILib on my NixOS (Linux) machine. On
./gradlew halBaseLinuxathenaReleaseSharedLibrary --build-cache
, I get:Additional context The toolchain is installed (
arm-...-gcc
works), but in a special location. I use./gradlew ... -PtoolChainPath=/nix/store/qichdxfayyrzbir2hbpzjqxv08yig97w-devshell-dir/bin
but to no avail.I'm running off of tag
v2022.4.1
.