Compiling allwpilib #5751
Replies: 4 comments 28 replies
-
I'm not sure about the gradle error, but for packaging you might want to consider using the cmake build instead of the gradle build. We build/bundle a lot of third party dependencies into the gradle build (e.g. opencv), while the cmake build uses system dependencies. |
Beta Was this translation helpful? Give feedback.
-
Did you clone the repository? Or did you just download the source? |
Beta Was this translation helpful? Give feedback.
-
I managed to get allwpilib to compile successfully on the latest master branch. Hopefully the last hurdle. I have managed to solve the issues relating to the compiler and dependencies. However, I appear to be having an issue where one of the tests is failing. The test is apparently |
Beta Was this translation helpful? Give feedback.
-
any idea what could be happening with this in the cmake build. Tried turning on and off different parts of the build with no success. This is not the only issue I'm having on the cmake build but its the only one so far that I have no clue what to do about. |
Beta Was this translation helpful? Give feedback.
-
I am trying to compile allwpilib-2023.4.3 from source. The end goal of this is to package it as a Nix package for Nixos users. However, when compiling using the build instructions and the source from the release I ended up with this error:
* What went wrong: A problem occurred evaluating root project 'allwpilib-2023.4.3'. > Failed to calculate the value of extension 'wpilibVersioning' property 'version'. > org.eclipse.jgit.api.errors.RefNotFoundException: Ref HEAD cannot be resolvedI looked around and was unable to find another occurrence of this that's surfaced on the web.
I am not super familiar with gradle and don't want to touch any of the code
I also had separate issues compiling the current master branch. However, I am not worrying about this for the time being.
EDIT: I solved the about problem using @sciencewhiz solution. However, it is failing to compile with the error:
error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] 413 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ cc1plus: all warnings being treated as errors
do I just need to change the optimization level somehow?Is this the right place to ask when I have compilation issues?
What other tips would you give for compiling future versions of wpilib.
Thanks in advance
EDIT: The same error mentioned appears to be happening on both 2023.4.2 and 2023.4.3.
Beta Was this translation helpful? Give feedback.
All reactions