Has anyone seen this when compiling their robot project with PhotonVision?
error: ISO C++ forbids declaration of ‘half’ with no type [-fpermissive]
Full line: C:\Users\Developer.gradle\caches\transforms-3\e0afbf4dfe6d860237162244c636262c\transformed\wpimath-cpp-2023.1.1-headers/Eigen/src/Core/arch/Default/Half.h:739:39: error: ISO C++ forbids declaration of ‘half’ with no type [-fpermissive]
More details and reproduction case here:
We’re working on a fix for this now. It is thought to be because both WPILib and PhotonVision have EigenCore.h.
Excellent! Thank you very much.
We’re encountering this problem now on 2023.3.2, is there any known workaround?
What version of the PhotonVision libraries are you using? Any other vendor deps?
PhotonVision “version”: “v2023.3.0”.
There’s CTRE libraries. Not aware of others afaik.
Ok. Can you paste the entirety of the error message you are seeing?
I think we’ve solved it. The problem appears to have been a header file double importing - there were #includes in the cpp file and also in the .h file, once I moved all the includes into the .h with its #pragma once then the EIGEN error disappeared.
If anyone encounters this again - that’s one thing to check…
Least curst eigen bug
Was it a bug in your code, or in a vendor library?
Our code, at least 90%. Ideally the library might be robust to being imported twice, but we shouldn’t have done what we did.
Writing the same #include twice shouldn’t cause breakage, as long as you imported the exact same file. The second #include should be a no-op.
Fair point.
So, it’s a library bug; but one that can be worked around by not double-importing.
Getting a minimal reproduction may not happen until after our competition - I’ll file an issue when I have a repro.
That’s not what I’m saying. If the file has a #pragma once
at the top, then including it twice in a row should work fine. If it doesn’t, that’s a compiler bug because the compiler should completely ignore second include.
#include <header.h>
#include <header.h> // Will be ignored
I assume that’s not what you’re doing, because that would be very concerning if so.
The main legitimate failure case of #pragma once
is when the same header exists in two locations, and both get included in different places. This can happen if vendors include a second version of a header. As far as I know, PhotonVision consumes wpimath artifacts, so you’ll have to make sure the version PhotonVision used and the version you’re using are the same.
This hypothesis could be tested by downgrading to WPILib 2023.2.1, which is what PhotonLib v2023.3.0 is built against, and seeing if the compilation error goes away. If that’s the issue, PhotonVision will need to make a new release targeting WPILib 2023.3.2 for you to be able to upgrade to WPILib 2023.3.2.
Update: further confusing, and frustrating, problems with EIGEN.
Previously the problem appeared to resolve when I rearranged #include
s - did not see @calcmogul response at that time but in fact there was not a #pragma once
. The code in which EIGEN error appeared had many #include
s within the .cpp file and no #pragma
. When I moved all those includes into the .h under a pragma once then it compiled fine; so I thought that was the issue.
BUT apparently it wasn’t, as now the EIGEN compile bug has reappeared, even on the exact same code that previously compiled fine. Maybe it’s a race condition in the compile sequence?
Using WPIlib 2023.3.2 and also 2023.4.1, and photonlib 2023.4.2 as well as 2023.3.0.
Trying the wpilib downgrade as suggested, will update after I see whether it helps.
Meantime here is the full error message:
* Executing task: ./gradlew build generateVsCodeConfig -Dorg.gradle.java.home="/Users/sgreene/wpilib/2023/jdk"
> Task :compileFrcUserProgramDebugExecutableFrcUserProgramCpp
In file included from /Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/Core:176,
from /Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/frc/EigenCore.h:7,
from /Users/sgreene/.gradle/caches/transforms-3/b45813b2cf351f0d79665270ef500295/transformed/wpilibc-cpp-2023.3.2-headers/frc/simulation/LinearSystemSim.h:12,
from /Users/sgreene/.gradle/caches/transforms-3/b45813b2cf351f0d79665270ef500295/transformed/wpilibc-cpp-2023.3.2-headers/frc/simulation/ElevatorSim.h:13,
from /Users/sgreene/src/frc2023/src/main/include/subsystems/Elevator.h:21,
from /Users/sgreene/src/frc2023/src/main/include/commands/base/ElevatorRaiseToCommand.h:8,
from /Users/sgreene/src/frc2023/src/main/include/commands/GroundIntakeCommand.h:9,
from /Users/sgreene/src/frc2023/src/main/cpp/commands/GroundIntakeCommand.cpp:1:
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/Half.h:739:39: error: ISO C++ forbids declaration of 'half' with no type [-fpermissive]
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^~~~
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/Half.h:739:78: error: 'half' declared as function returning a function
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^
In file included from /Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/Core:177:
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:39: error: ISO C++ forbids declaration of 'bfloat16' with no type [-fpermissive]
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^~~~~~~~
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:90: error: 'bfloat16' declared as function returning a function
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^
> Task :compileFrcUserProgramReleaseExecutableFrcUserProgramCpp
In file included from /Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/Core:176,
from /Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/frc/EigenCore.h:7,
from /Users/sgreene/.gradle/caches/transforms-3/b45813b2cf351f0d79665270ef500295/transformed/wpilibc-cpp-2023.3.2-headers/frc/simulation/LinearSystemSim.h:12,
from /Users/sgreene/.gradle/caches/transforms-3/b45813b2cf351f0d79665270ef500295/transformed/wpilibc-cpp-2023.3.2-headers/frc/simulation/ElevatorSim.h:13,
from /Users/sgreene/src/frc2023/src/main/include/subsystems/Elevator.h:21,
from /Users/sgreene/src/frc2023/src/main/include/commands/base/ElevatorRaiseToCommand.h:8,
from /Users/sgreene/src/frc2023/src/main/include/commands/GroundIntakeCommand.h:9,
from /Users/sgreene/src/frc2023/src/main/cpp/commands/GroundIntakeCommand.cpp:1:
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/Half.h:739:39: error: ISO C++ forbids declaration of 'half' with no type [-fpermissive]
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^~~~
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/Half.h:739:78: error: 'half' declared as function returning a function
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^
In file included from /Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/Core:177:
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:39: error: ISO C++ forbids declaration of 'bfloat16' with no type [-fpermissive]
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^~~~~~~~
/Users/sgreene/.gradle/caches/transforms-3/6c8720ab86f8d20d9b407ee77f228978/transformed/wpimath-cpp-2023.3.2-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:90: error: 'bfloat16' declared as function returning a function
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^
> Task :compileFrcUserProgramDebugExecutableFrcUserProgramCpp FAILED
> Task :compileFrcUserProgramReleaseExecutableFrcUserProgramCpp FAILED
Compilation Error!
GradleRIO detected this build failed due to a Compile Error (compileFrcUserProgramDebugExecutableFrcUserProgramCpp).
Check that all your files are saved, then scroll up in this log for more information.
Compilation Error!
GradleRIO detected this build failed due to a Compile Error (compileFrcUserProgramReleaseExecutableFrcUserProgramCpp).
Check that all your files are saved, then scroll up in this log for more information.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':compileFrcUserProgramDebugExecutableFrcUserProgramCpp'.
> A build operation failed.
C++ compiler failed while compiling GroundIntakeCommand.cpp.
See the complete log at: file:///Users/sgreene/src/frc2023/build/tmp/compileFrcUserProgramDebugExecutableFrcUserProgramCpp/output.txt
> C++ compiler failed while compiling GroundIntakeCommand.cpp.
This is a very bizarre error. The headers are all protected with ifdef’s, so it can’t be due to pragma once. Can you provide the contents of /Users/sgreene/src/frc2023/build/tmp/compileFrcUserProgramDebugExecutableFrcUserProgramCpp/output.txt
? (there may be a sister text file in the same location with the compiler command line)
What GCC version are you compiling with for desktop?
Update: downgrading to 2023.2.1 did not help unfortunately - same error.
Also I’m not 100% sure it’s related to photonvision - it might be, but it appears to me that photonvision libraries are not included in any of the same files where this issue appears. Might it be something else?
Here is error report on 2023.2.1:
> Task :compileFrcUserProgramDebugExecutableFrcUserProgramCpp
In file included from /Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/Eigen/Core:176,
from /Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/frc/EigenCore.h:7,
from /Users/sgreene/.gradle/caches/transforms-3/4b385576028e222c7238d1b47447aba5/transformed/wpilibc-cpp-2023.2.1-headers/frc/simulation/LinearSystemSim.h:12,
from /Users/sgreene/.gradle/caches/transforms-3/4b385576028e222c7238d1b47447aba5/transformed/wpilibc-cpp-2023.2.1-headers/frc/simulation/ElevatorSim.h:13,
from /Users/sgreene/src/frc2023/src/main/include/subsystems/Elevator.h:20,
from /Users/sgreene/src/frc2023/src/main/include/commands/StowCommand.h:5,
from /Users/sgreene/src/frc2023/src/main/include/commands/GroundIntakeCommand.h:7,
from /Users/sgreene/src/frc2023/src/main/cpp/commands/GroundIntakeCommand.cpp:1:
/Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/Eigen/src/Core/arch/Default/Half.h:739:39: error: ISO C++ forbids declaration of 'half' with no type [-fpermissive]
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^~~~
/Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/Eigen/src/Core/arch/Default/Half.h:739:78: error: 'half' declared as function returning a function
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^
In file included from /Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/Eigen/Core:177:
/Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:39: error: ISO C++ forbids declaration of 'bfloat16' with no type [-fpermissive]
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^~~~~~~~
/Users/sgreene/.gradle/caches/transforms-3/c9274492799be75f14683f0ea0a38a5a/transformed/wpimath-cpp-2023.2.1-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:90: error: 'bfloat16' declared as function returning a function
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
Here is the output file, not much more there that I can see unfortunately.
See file:///Users/sgreene/src/frc2023/build/tmp/compileFrcUserProgramDebugExecutableFrcUserProgramCpp/output.txt for all output for compileFrcUserProgramDebugExecutableFrcUserProgramCpp.
compiling InputUtils.cpp successful.
compiling ControlboardViz.cpp successful.
In file included from /Users/sgreene/src/frc2023/src/main/cpp/utils/ControlboardViz.cpp:3:
/Users/sgreene/src/frc2023/src/main/include/utils/ControlboardViz.h: In constructor 'ControlboardViz::ControlboardViz(frc::Field2d&, bool, bool, bool)':
/Users/sgreene/src/frc2023/src/main/include/utils/ControlboardViz.h:43:19: warning: 'ControlboardViz::_field' will be initialized after [-Wreorder]
43 | frc::Field2d& _field;
| ^~~~~~
/Users/sgreene/src/frc2023/src/main/include/utils/ControlboardViz.h:40:10: warning: 'bool ControlboardViz::_vizNumbers' [-Wreorder]
40 | bool _vizNumbers;
| ^~~~~~~~~~~
/Users/sgreene/src/frc2023/src/main/cpp/utils/ControlboardViz.cpp:6:1: warning: when initialized here [-Wreorder]
6 | ControlboardViz::ControlboardViz(frc::Field2d& field, bool vizNumbers, bool vizGlass, bool vizField)
| ^~~~~~~~~~~~~~~
compiling Controlboard.cpp successful.
compiling LedController.cpp successful.
compiling Claw.cpp successful.
compiling VisionController.cpp successful.
compiling LedCommands.cpp successful.
compiling ClawIntakeCommand.cpp successful.
compiling GroundIntakeCommand.cpp failed.
In file included from /Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/Eigen/Core:176,
from /Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/frc/EigenCore.h:7,
from /Users/sgreene/.gradle/caches/transforms-3/5b4095df911ee4c9ada7d955f2d0cf18/transformed/wpilibc-cpp-2023.4.1-headers/frc/simulation/LinearSystemSim.h:12,
from /Users/sgreene/.gradle/caches/transforms-3/5b4095df911ee4c9ada7d955f2d0cf18/transformed/wpilibc-cpp-2023.4.1-headers/frc/simulation/ElevatorSim.h:13,
from /Users/sgreene/src/frc2023/src/main/include/subsystems/Elevator.h:21,
from /Users/sgreene/src/frc2023/src/main/include/commands/base/ElevatorRaiseToCommand.h:8,
from /Users/sgreene/src/frc2023/src/main/include/commands/GroundIntakeCommand.h:9,
from /Users/sgreene/src/frc2023/src/main/cpp/commands/GroundIntakeCommand.cpp:1:
/Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/Eigen/src/Core/arch/Default/Half.h:739:39: error: ISO C++ forbids declaration of 'half' with no type [-fpermissive]
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^~~~
/Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/Eigen/src/Core/arch/Default/Half.h:739:78: error: 'half' declared as function returning a function
739 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) {
| ^
In file included from /Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/Eigen/Core:177:
/Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:39: error: ISO C++ forbids declaration of 'bfloat16' with no type [-fpermissive]
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^~~~~~~~
/Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers/Eigen/src/Core/arch/Default/BFloat16.h:571:90: error: 'bfloat16' declared as function returning a function
571 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 (min)(const bfloat16& a, const bfloat16& b) {
| ^
compiling AutoStowCommand.cpp successful.
compiling InclinedElevatorSim.cpp successful.
compiling StowCommand.cpp successful.
compiling TeleopAutoScoreCommand.cpp successful.
compiling SwerveModule.cpp successful.
compiling AutoIntakeCommand.cpp successful.
compiling TeleopLEDCommand.cpp successful.
compiling TeleopSwerveCommand.cpp successful.
compiling AutonomousScoreCommand.cpp successful.
compiling LedChargingCommand.cpp successful.
compiling PlatformIntakeCommand.cpp successful.
compiling Robot.cpp successful.
compiling ClawOpenToCommand.cpp successful.
compiling RobotContainer.cpp successful.
compiling AlignToScoreCommand.cpp successful.
compiling Drivetrain.cpp successful.
In file included from /Users/sgreene/src/frc2023/src/main/cpp/subsystems/Drivetrain.cpp:1:
/Users/sgreene/src/frc2023/src/main/include/subsystems/Drivetrain.h: In constructor 'Drivetrain::Drivetrain(frc::Field2d&, std::string)':
/Users/sgreene/src/frc2023/src/main/include/subsystems/Drivetrain.h:205:19: warning: 'Drivetrain::_field' will be initialized after [-Wreorder]
205 | frc::Field2d& _field;
| ^~~~~~
/Users/sgreene/src/frc2023/src/main/include/subsystems/Drivetrain.h:152:23: warning: 'const std::string Drivetrain::_moduleCanBus' [-Wreorder]
152 | std::string const _moduleCanBus;
| ^~~~~~~~~~~~~
/Users/sgreene/src/frc2023/src/main/cpp/subsystems/Drivetrain.cpp:15:1: warning: when initialized here [-Wreorder]
15 | Drivetrain::Drivetrain(frc::Field2d& field, std::string moduleCanBus)
| ^~~~~~~~~~
compiling DynamicGoToIntakeLocationCommand.cpp successful.
compiling IntakeRollersOnCommand.cpp successful.
compiling PrepForPlatformIntakeCommand.cpp successful.
compiling ClawRollersOffCommand.cpp successful.
compiling DynamicGoToScoringLocationCommand.cpp successful.
compiling SwerveAutoPathCommands.cpp successful.
compiling ElevatorRaiseToCommand.cpp successful.
compiling IntakeRollersOffCommand.cpp successful.
compiling ClawOuttakeCommand.cpp successful.
compiling ClawRollersOnCommand.cpp successful.
compiling PrepToScoreCommand.cpp successful.
compiling IntakeRaiseToPositionCommand.cpp successful.
compiling GoToPoseCommand.cpp successful.
compiling ElevatorRaiseToWithIntake.cpp successful.
compiling ElevatorZeroCommand.cpp successful.
compiling ResetAllCommand.cpp successful.
compiling Elevator.cpp successful.
compiling Intake.cpp successful.
Finished compileFrcUserProgramDebugExecutableFrcUserProgramCpp, see full log file:///Users/sgreene/src/frc2023/build/tmp/compileFrcUserProgramDebugExecutableFrcUserProgramCpp/output.txt.
and here is the compiler options file:
-x
c++
-c
-Wall
-Wextra
-std=c++20
-Wformat=2
-pedantic
-Wno-psabi
-Wno-unused-parameter
-Wno-error=deprecated-declarations
-fPIC
-pthread
-Wno-error=deprecated-enum-enum-conversion
-Og
-g
-nostdinc
-I
/Users/sgreene/src/frc2023/src/main/include
-I
/Users/sgreene/.gradle/caches/transforms-3/4b63b42328da75a0b0b1d6ae5e157a05/transformed/wpilibNewCommands-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/2ab505240af8cc7a8d43d9c79789e4a0/transformed/PathplannerLib-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/85861316de894eab41875e174384b851/transformed/wpiapi-cpp-5.30.4-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/91d0335f5c09430468280b65014a9335/transformed/api-cpp-5.30.4-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/89c1fe15453c1323ed9569e779a4a37b/transformed/cci-5.30.4-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/b0be7721fd3b248bb427d40cc11337cf/transformed/tools-23.0.7-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/e2bf6dba46ad40e3cac3f756715ece03/transformed/wpiapi-cpp-23.0.7-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/96a6a7bd57065a74e4399475eda2805d/transformed/PhotonLib-cpp-v2023.3.0-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/5b4095df911ee4c9ada7d955f2d0cf18/transformed/wpilibc-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/d71cf73533d9171a5406741fc4fc4e95/transformed/ntcore-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/2c9ad8d51999cf0bd38f4762cb3e5541/transformed/hal-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/30c2340e40b3207dd6c89a868ee48c1e/transformed/wpimath-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/6777fc5b0235ce1c85dbd6b3940dc0b9/transformed/wpinet-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/624678ec4834ccee846b7154390b6eff/transformed/wpiutil-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/272eb86d3eb218b31960f8a5f8fe8c02/transformed/netcomm-2023.3.0-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/632d3599f2a594fb4fe69c03c28bb954/transformed/chipobject-2023.3.0-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/4a1c8c1d3d9ec962c9ac7f13eb14ae8d/transformed/visa-2023.3.0-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/12d53bc90d9fd0997035580b8bbaaf3b/transformed/cameraserver-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/957f42bedd806e090af99f1a9942ed63/transformed/cscore-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/c524e9b696c6ec9358bb967744c586b3/transformed/apriltag-cpp-2023.4.1-headers
-I
/Users/sgreene/.gradle/caches/transforms-3/76c3bbb50c1bad699d8baeb8c85ac724/transformed/opencv-cpp-4.6.0-4-headers
-isystem
/Users/sgreene/wpilib/2023/roborio/arm-nilrt-linux-gnueabi/sysroot/usr/lib/gcc/arm-nilrt-linux-gnueabi/12/include
-isystem
/Users/sgreene/wpilib/2023/roborio/arm-nilrt-linux-gnueabi/sysroot/usr/lib/gcc/arm-nilrt-linux-gnueabi/12/include-fixed
-isystem
/Users/sgreene/wpilib/2023/roborio/arm-nilrt-linux-gnueabi/sysroot/usr/include/c++/12
-isystem
/Users/sgreene/wpilib/2023/roborio/arm-nilrt-linux-gnueabi/sysroot/usr/include/c++/12/arm-nilrt-linux-gnueabi
-isystem
/Users/sgreene/wpilib/2023/roborio/arm-nilrt-linux-gnueabi/sysroot/usr/include/c++/12/backward
-isystem
/Users/sgreene/wpilib/2023/roborio/arm-nilrt-linux-gnueabi/sysroot/usr/include
As to what gcc version - I’m not sure where to find what the build is actually using?
This is on MacOS 13.2 Arm.
My system gcc is:
sgm2:sgreene) /usr/bin/gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I originally thought it was PhotonVision, but we decided not to use it, and still ended up with this error. We were building an interface to access all the subsystems from within our command objects, and it cropped up again due to SwerveDriveKinematics.h (see this commit Implemented most subsystems · ParadigmShift1259/SwerveBot2023@e2cef46 · GitHub).
We fixed it by hiding the DriveSubsystem behind an interface, too (see commit Hide drive subsystem behind an interface Eigenbug · ParadigmShift1259/SwerveBot2023@990ce6e · GitHub).
Not sure if this is helpful, but we are stable for now.
Thanks, I’ll try a similar strategy.
Though - interestingly - when I try your e2cef46 it compiles cleanly, ie I’m not seeing the Eigenbug in your “before” case.
Bizarre.