Closed theVerySharpFlat closed 1 year ago
The symbols aren't "missing" in 2023.4.3, They were added in https://github.com/wpilibsuite/allwpilib/pull/5392 a few days ago and thus shouldn't exist. The problem appears to be mixing of development and release builds.
You need to call ./gradlew build -PreleaseMode
, so that it builds with the 2023 release, rather then current main, which has the change.
When I build your code on Windows, I don't get linker errors, but do get compile errors related to some of your SparkMax code.
The symbols aren't "missing" in 2023.4.3, They were added in #5392 a few days ago and thus shouldn't exist. The problem appears to be mixing of development and release builds.
Wow. I didn't even consider that. If only I had thought a little bit more about the differing version numbers!
You need to call
./gradlew build -PreleaseMode
, so that it builds with the 2023 release, rather then current main, which has the change.
Is that a GradleRIO flag? This fixed everything!
When I build your code on Windows, I don't get linker errors, but do get compile errors related to some of your SparkMax code.
I'll be sure to check this out on my windows machine. Thanks for all your help!!!
Ok -PreleaseMode
is part of the vendor template.
Describe the bug A clear and concise description of what the bug is.
In short, the symbols
frc2::Command::GetRequirements() const
andfrc2::Command::InitSendable(wpi::SendableBuilder&)
are missing from the linuxathena 2023.4.3 release version of the wpilibNewCommands library, causing a linker error in my code.This bug was detected in my vendor dependency https://github.com/rambunction4330/librmb/tree/linker-error-fix (on the branch linked).
To Reproduce Steps to reproduce the behavior:
Build the above project (on the above branch) as follows
./gradlew installRoboRioToolchain
./gradlew build
Build fails with error:
My project consists of a native library vendor dependency in the root directory and an executable in project
:testbench
that links to the root library usinglib project ":" library "LibRmb"
Building the library works without a hitch as
ld
is able to find the symbols just fine in the2023.4.3-122-g335e7dd
version of the .so. However, when building the executable the build system (gradle, ew) tries to link with the2023.4.3
stable release version of the .so which does not contain these symbols.To test my hypothesis that the symbols were missing, I ran the following:
However, the same with the stable release yields nothing:
It seems that this is only the case with linuxathena as I've tested desktop builds on both darwin-arm64/clang and linux-x86-64/gcc and they work.
:/testbench
Expected behavior I expected readelf to show that
libwpilibNewCommands-2023.4.3.so
contains the symbols mentioned above and that my build succeeds without linker errors.Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
RoboRIO toolchain, gcc 12
Library Dependencies:
Testbench Executable WPILib version 2023.4.3 (I think it pulls the latest stable off of the wpi maven repo)
Additional context Add any other context about the problem here.
I understand that the way I'm using GradleRIO is unorthodox. I hope my problem isn't self-created.