Linux JNI Headers when developing on Mac

Taking a look at the WPILIB Release 2.1 I am noticing that the jdk headers only exist for darwin.

~/frc2019  -> tree jdk/include/
jdk/include/
├── classfile_constants.h
├── darwin
│   ├── jawt_md.h
│   └── jni_md.h
├── jawt.h
├── jdwpTransport.h
├── jni.h
├── jvmti.h
└── jvmticmlr.h

When compiling for the RoboRIO (athena), the typical header search path used is jdk/include/linux. My general questions are:

  1. Is possible to compile native C/C++ libraries (specifically for JNI) on Mac targetting the RoboRIO?
  2. How do you that? Specifically, how do you point to the proper toolchain and JNI header path?

/______________________________________________________________________________________________/

ADDITIONAL INFO (Mostly directed @Jaci but feel free to chime in) :
The motivation for this is to try to build Pathfinder v2 (I know it is alpha. You can save yourself the trouble of telling me). When I clone the repo and run JAVA_HOME=/Users/bkerfeld/frc2019/jdk ./gradle build I am seeing the following:

> Task :Pathfinder-Java:compilePathfinderjniLinuxathenaDebugStaticLibraryPathfinderjniCpp FAILED
In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jnihandle.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jnihandle.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_Arc2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_HermiteCubic.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/hermite.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_ArcParameterizer.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc_parameterizer.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractCurve2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_curve.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jniutil.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jniutil.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_TrapezoidalProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/trapezoidal_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractSpline2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_spline.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_coupled_CoupledCausalTrajGen.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/coupled/coupled_causaltrajgen.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_coupled_CoupledChassis.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/coupled/coupled_chassis.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

...output for 6 more failed operation(s) continued in file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaDebugStaticLibraryPathfinderjniCpp/output.txt.

> Task :Pathfinder-Java:compilePathfinderjniLinuxathenaDebugSharedLibraryPathfinderjniCpp FAILED
In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_Arc2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractCurve2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_curve.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jnihandle.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jnihandle.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractSpline2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_spline.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jniutil.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jniutil.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_AbstractNativeProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/abstract_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_TrapezoidalProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/trapezoidal_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_coupled_CoupledCausalTrajGen.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/coupled/coupled_causaltrajgen.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_coupled_CoupledChassis.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/coupled/coupled_chassis.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_transmission_AbstractDcTransmission.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/transmission/abstract_dc_transmission.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

...output for 6 more failed operation(s) continued in file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaDebugSharedLibraryPathfinderjniCpp/output.txt.

> Task :Pathfinder-Java:compilePathfinderjniLinuxathenaReleaseSharedLibraryPathfinderjniCpp FAILED
In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jnihandle.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jnihandle.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_Arc2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractCurve2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_curve.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_ArcParameterizer.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc_parameterizer.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_AbstractNativeProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/abstract_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_TrapezoidalProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/trapezoidal_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jniutil.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jniutil.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractSpline2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_spline.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_coupled_CoupledChassis.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/coupled/coupled_chassis.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jnieigen.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/profile/jniprofile.h:4,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/jniprofile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

...output for 6 more failed operation(s) continued in file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaReleaseSharedLibraryPathfinderjniCpp/output.txt.

> Task :Pathfinder-Java:compilePathfinderjniLinuxathenaReleaseStaticLibraryPathfinderjniCpp FAILED
In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jnihandle.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jnihandle.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_Arc2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractCurve2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_curve.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_HermiteCubic.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/hermite.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_ArcParameterizer.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/arc_parameterizer.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_path_AbstractSpline2d.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/path/abstract_spline.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_AbstractNativeProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/abstract_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include/jniutil.h:3:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/jniutil.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_profile_TrapezoidalProfile.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/profile/trapezoidal_profile.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

In file included from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava/grpl_pathfinder_coupled_CoupledCausalTrajGen.h:2:0,
                 from /Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/cpp/coupled/coupled_causaltrajgen.cpp:1:
/Users/bkerfeld/frc2019/jdk/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
 #include "jni_md.h"
                    ^
compilation terminated.

...output for 6 more failed operation(s) continued in file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaReleaseStaticLibraryPathfinderjniCpp/output.txt.

FAILURE: Build completed with 4 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':Pathfinder-Java:compilePathfinderjniLinuxathenaDebugStaticLibraryPathfinderjniCpp'.
> Multiple build operations failed.
      C++ compiler failed while compiling jnihandle.cpp.
      C++ compiler failed while compiling arc.cpp.
      C++ compiler failed while compiling hermite.cpp.
      C++ compiler failed while compiling arc_parameterizer.cpp.
      C++ compiler failed while compiling abstract_curve.cpp.
      C++ compiler failed while compiling jniutil.cpp.
      C++ compiler failed while compiling trapezoidal_profile.cpp.
      C++ compiler failed while compiling abstract_spline.cpp.
      C++ compiler failed while compiling coupled_causaltrajgen.cpp.
      C++ compiler failed while compiling coupled_chassis.cpp.
      ...and 6 more failures.
  See the complete log at: file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaDebugStaticLibraryPathfinderjniCpp/output.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':Pathfinder-Java:compilePathfinderjniLinuxathenaDebugSharedLibraryPathfinderjniCpp'.
> Multiple build operations failed.
      C++ compiler failed while compiling arc.cpp.
      C++ compiler failed while compiling abstract_curve.cpp.
      C++ compiler failed while compiling jnihandle.cpp.
      C++ compiler failed while compiling abstract_spline.cpp.
      C++ compiler failed while compiling jniutil.cpp.
      C++ compiler failed while compiling abstract_profile.cpp.
      C++ compiler failed while compiling trapezoidal_profile.cpp.
      C++ compiler failed while compiling coupled_causaltrajgen.cpp.
      C++ compiler failed while compiling coupled_chassis.cpp.
      C++ compiler failed while compiling abstract_dc_transmission.cpp.
      ...and 6 more failures.
  See the complete log at: file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaDebugSharedLibraryPathfinderjniCpp/output.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':Pathfinder-Java:compilePathfinderjniLinuxathenaReleaseSharedLibraryPathfinderjniCpp'.
> Multiple build operations failed.
      C++ compiler failed while compiling jnihandle.cpp.
      C++ compiler failed while compiling arc.cpp.
      C++ compiler failed while compiling abstract_curve.cpp.
      C++ compiler failed while compiling arc_parameterizer.cpp.
      C++ compiler failed while compiling abstract_profile.cpp.
      C++ compiler failed while compiling trapezoidal_profile.cpp.
      C++ compiler failed while compiling jniutil.cpp.
      C++ compiler failed while compiling abstract_spline.cpp.
      C++ compiler failed while compiling coupled_chassis.cpp.
      C++ compiler failed while compiling jniprofile.cpp.
      ...and 6 more failures.
  See the complete log at: file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaReleaseSharedLibraryPathfinderjniCpp/output.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':Pathfinder-Java:compilePathfinderjniLinuxathenaReleaseStaticLibraryPathfinderjniCpp'.
> Multiple build operations failed.
      C++ compiler failed while compiling jnihandle.cpp.
      C++ compiler failed while compiling arc.cpp.
      C++ compiler failed while compiling abstract_curve.cpp.
      C++ compiler failed while compiling hermite.cpp.
      C++ compiler failed while compiling arc_parameterizer.cpp.
      C++ compiler failed while compiling abstract_spline.cpp.
      C++ compiler failed while compiling abstract_profile.cpp.
      C++ compiler failed while compiling jniutil.cpp.
      C++ compiler failed while compiling trapezoidal_profile.cpp.
      C++ compiler failed while compiling coupled_causaltrajgen.cpp.
      ...and 6 more failures.
  See the complete log at: file:///Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaReleaseStaticLibraryPathfinderjniCpp/output.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s
94 actionable tasks: 6 executed, 88 up-to-date

Looking at Pathfinder-Java/build/tmp/compilePathfinderjniLinuxathenaReleaseSharedLibraryPathfinderjniCpp/options.txt, we can see this is due to it pointing towards an invalid header search path (linux vs darwin):

-x
c++
-c
-fPIC
-std=c++14
-O2
-Werror
-I
/Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/src/native/include
-I
/Users/bkerfeld/frc2019/jdk/include
-I
/Users/bkerfeld/frc2019/jdk/include/linux
-I
/Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder-Java/build/jniinclude/compileJava
-I
/Users/bkerfeld/workspace/frc/Pathfinder/Pathfinder/src/include
-I
/Users/bkerfeld/workspace/frc/Pathfinder/libs/eigen
-isystem
/Users/bkerfeld/frc2019/roborio/bin/../arm-frc2019-linux-gnueabi/usr/lib/gcc/arm-frc2019-linux-gnueabi/6.3.0/include
-isystem
/Users/bkerfeld/frc2019/roborio/bin/../arm-frc2019-linux-gnueabi/usr/lib/gcc/arm-frc2019-linux-gnueabi/6.3.0/include-fixed
-isystem
/Users/bkerfeld/frc2019/roborio/bin/../arm-frc2019-linux-gnueabi/usr/include/c++/6.3.0
-isystem
/Users/bkerfeld/frc2019/roborio/bin/../arm-frc2019-linux-gnueabi/usr/include/c++/6.3.0/arm-frc2019-linux-gnueabi
-isystem
/Users/bkerfeld/frc2019/roborio/bin/../arm-frc2019-linux-gnueabi/usr/include/c++/6.3.0/backward
-isystem
/Users/bkerfeld/frc2019/roborio/bin/../arm-frc2019-linux-gnueabi/usr/include

The JDK included in the installer only includes the headers for the native system. For headers for arm, you have to get them manually. You can find the ones we use here.

We actually use that gradle plugin for our JNI builds, but I don’t know if the pathfinder build is setup for that.

1 Like