Compiling GRIP for the Jetson TK1

Our team wants to use the TK1 to do image processing and to exeriment
with GRIP tools on it.

Here’s what I did to compile and run GRIP on the Jetson TK1.

  1. flash and install the NVidia distribution ]

  2. Mark the special NVidia package so that updates won’t overwrite them.

sudo apt-mark hold xserver-xorg-core
  1. install oracle java jdk8

from:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
jdk-8u65-linux-arm32-vfp-hflt.tar.gz

I installed it in /usr/lib/jvm/

$ export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_65
$ PATH=$PATH:$JAVA_HOME/bin

  1. build ntcore
git clone --depth=1 https://github.com/PeterJohnson/ntcore.git

./gradlew :arm:build -PcompilerPrefix=

# ./gradlew publish -PmakeDesktop  ??
$ ./gradlew -PcompilerPrefix= -PmakeDesktop :arm:build 

  1. build openjfx

from:
https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX

install deps
sudo apt-get install bison flex gperf libasound2-dev libgl1-mesa-dev \
    libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libjpeg-dev \
    libpng-dev libx11-dev libxml2-dev libxslt1-dev libxt-dev \
    libxxf86vm-dev pkg-config x11proto-core-dev \
    x11proto-xf86vidmode-dev  libgtk2.0-dev \
    libxtst-dev libudev-dev 

edit /etc/apt/sources.list
    and uncomment universe sources

sudo apt-get update

sudo apt-get install mercurial libavcodec-dev libavformat-dev

install gradle
    wget https://services.gradle.org/distributions/gradle-1.8-bin.zip


Apply Diffs


diff --git a/build.gradle b/build.gradle
index c1d2486..843d99a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -704,7 +704,7 @@ if (IS_WINDOWS && OS_ARCH != "x86" && OS_ARCH != "amd64") {
     throw new Exception("Unknown and unsupported build architecture: $OS_ARCH")
 } else if (IS_MAC && OS_ARCH != "x86_64") {
     throw new Exception("Unknown and unsupported build architecture: $OS_ARCH")
-} else if (IS_LINUX && OS_ARCH != "i386" && OS_ARCH != "amd64") {
+} else if (IS_LINUX && OS_ARCH != "i386" && OS_ARCH != "amd64" && OS_ARCH != "arm") {
     throw new Exception("Unknown and unsupported build architecture: $OS_ARCH")
 }

@@ -2554,8 +2554,8 @@ project(":web") {
                     } else {
                         environment(
                             "QMAKESPEC"      : "linux-g++-32",
-                            "QMAKE_CFLAGS"   : "-m32",
-                            "QMAKE_LFLAGS"   : "-m32",
+                            // "QMAKE_CFLAGS"   : "-m32",
+                            // "QMAKE_LFLAGS"   : "-m32",
                         ])
                     }
                 } else if (t.name.startsWith("arm")) {
@@ -3260,8 +3260,8 @@ project(":apps") {
               }
               ant.properties'jfxbuild.jfxrt.jar'] = jfxrtJar
               ant.properties'platforms.JDK_1.8.home'] = "${rootProject.ext.JDK_HOME}"
-              ant.project.executeTarget("sampleAppsJar")
-              ant.project.executeTarget("scenebuilderSampleAppsJar")
+              // ant.project.executeTarget("sampleAppsJar")
+              // ant.project.executeTarget("scenebuilderSampleAppsJar")
               if (!t.name.startsWith("arm")) {
                 ant.project.executeTarget("scenebuilderAppJar")
               }


diff --git a/buildSrc/linux.gradle b/buildSrc/linux.gradle
index 753d79c..34a313f 100644
--- a/buildSrc/linux.gradle
+++ b/buildSrc/linux.gradle
@@ -45,7 +45,7 @@ def commonFlags = 
         "-fno-strict-aliasing"
    "-fPIC", "-fno-omit-frame-pointer", // optimization flags
         "-W"
    "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning f

-if (!IS_64) {
+if (false && !IS_64) {
     commonFlags += "-m32"
 }

@@ -173,7 +173,7 @@ LINUX.launcher.compiler = compiler
 LINUX.launcher.ccFlags = "-DJAVAARCH=\"$OS_ARCH\""
    "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c"]
 LINUX.launcher.linker = linker
 LINUX.launcher.linkFlags = "-ldl"]
-if (!IS_64) {
+if (false && !IS_64) {
     LINUX.launcher.ccFlags += "-m32"
     LINUX.launcher.linkFlags += "-m32"
 }
@@ -183,7 +183,7 @@ LINUX.launcherlibrary.compiler = compiler
 LINUX.launcherlibrary.ccFlags = "-DJAVAARCH=\"$OS_ARCH\""
    "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux",
 LINUX.launcherlibrary.linker = linker
 LINUX.launcherlibrary.linkFlags = "-ldl"
    "-lpthread", "-shared"]
-if (!IS_64) {
+if (false && !IS_64) {
     LINUX.launcherlibrary.ccFlags += "-m32"
     LINUX.launcherlibrary.linkFlags += "-m32"
 }



Build javafx

gradle

Test javafx

gradle test

Package

gradle zips

Extract jar over the existing jdk
build/bundles/javafx-sdk-overlay.zip contains data to overlay existing JAVA_HOME


cd /usr/lib/jvm/jdk1.8.0_65
jar -xvf ...]/build/bundles/javafx-sdk-overlay.zip

  1. install NVIDIA opencv

    These packages are from the NVidia TK1 download page.

    sudo dpkg -i cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb 
    sudo dpkg -i libopencv4tegra-repo_2.4.12.3_armhf_l4t-r23.deb
    sudo apt-get update
    sudo apt-get install cuda-toolkit-7-0 libopencv4tegra libopencv4tegra-dev 

  1. install maven

    install pseudo packages java8 dev packages ]
    create file java8-jre


### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: java
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: java8-jre
Version: 1.8
# Maintainer: Your Name <[email protected]>
# Pre-Depends: <comma-separated list of packages>
Depends: java8-jre-headless
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
Provides: java-runtime, java2-runtime, java5-runtime, java6-runtime, java7-runtime
# Replaces: <comma-separated list of packages>
# Architecture: all
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
#  <more pairs, if there's more than one file to include. Notice the starting space>
Description: java 8
 oracle java 8
 .
 From Java Oracle

create file java8-jre-headless


### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: java
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: java8-jre
Version: 1.8
# Maintainer: Your Name <[email protected]>
# Pre-Depends: <comma-separated list of packages>
Depends: java8-jre-headless
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, openjdk-7-jre-zero
# Replaces: <comma-separated list of packages>
# Architecture: all
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
#  <more pairs, if there's more than one file to include. Notice the starting space>
Description: java 8 headless
 oracle java 8 headless
 .
 From Java Oracle support

create and install java deb files


sudo apt-get install equivs
equivs-build java8-jre
equivs-build java8-jre-headless
sudo dpkg -i java8-jre*.deb
sudo apt-get update
sudo apt-get install maven

  1. install and build org.bytedeco.javacpp
git clone --depth=1 https://github.com/bytedeco/javacpp.git
edit src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties


diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties b/src/main/resources/org/by
index 6580495..fcd0c1c 100644
--- a/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties
+++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties
@@ -5,8 +5,8 @@ platform.includepath.prefix=-I
 platform.includepath=
 platform.compiler=g++
 platform.compiler.cpp11=-std=c++11
-platform.compiler.default=-march=armv5te
-platform.compiler.fastfpu=-march=armv7-a -mfpu=neon -ffast-math
+platform.compiler.default=-march=native
+platform.compiler.fastfpu=-march=armv7-a -mfpu=neon-vfpv4 -ffast-math
 platform.compiler.nodeprecated=-Wno-deprecated-declarations
 platform.compiler.output=-Wl,-rpath,$ORIGIN/ -Wall -O3 -fPIC -shared -s -o\u0020
 platform.linkpath.prefix=-L


Build


mvn install

  1. install and build org.bytedeco.javacpp-presets

git clone --depth=1 https://github.com/bytedeco/javacpp-presets.git

install deps curl cmake


sudo apt-get install curl cmake

apply patches


diff --git a/opencv/cppbuild.sh b/opencv/cppbuild.sh
index 25a9b50..363a171 100755
--- a/opencv/cppbuild.sh
+++ b/opencv/cppbuild.sh
@@ -47,7 +47,7 @@ case $PLATFORM in
         make install/strip
         ;;
     linux-arm)
-        CC=arm-linux-gnueabi-"$OLDCC" CXX=arm-linux-gnueabi-"$OLDCXX" CMAKE_C_COMPILER=$CC CMAKE_CXX_COMPILER=$
+        CC="$OLDCC" CXX="$OLDCXX" CMAKE_C_COMPILER=$CC CMAKE_CXX_COMPILER=$CXX $CMAKE -DCMAKE_INSTALL_PREFIX=..
         make -j4
         make install
         ;;

diff --git a/artoolkitplus/cppbuild.sh b/artoolkitplus/cppbuild.sh
index a487aae..a0be80f 100755
--- a/artoolkitplus/cppbuild.sh
+++ b/artoolkitplus/cppbuild.sh
@@ -27,6 +27,11 @@ case $PLATFORM in
         make -j4
         make install
         ;;
+    linux-arm)
+        CC="$OLDCC" CXX="$OLDCXX" $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=..
+        make -j4
+        make install
+        ;;
     linux-x86)
         CC="$OLDCC -m32" CXX="$OLDCXX -m32" $CMAKE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=..
         make -j4

diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh
index b8ebb10..8c8e617 100644
--- a/ffmpeg/cppbuild.sh
+++ b/ffmpeg/cppbuild.sh
@@ -28,7 +28,7 @@ else
     LAME=lame-3.99.5
     SPEEX=speex-1.2rc2
     OPENCORE_AMR=opencore-amr-0.1.3
-    OPENSSL=openssl-1.0.2e
+    OPENSSL=openssl-1.0.2f
     OPENH264_VERSION=1.5.0
     X265=x265_1.8
     VPX_VERSION=v1.5.0
@@ -166,6 +166,44 @@ case $PLATFORM in
         make install
         ;;
 
+    linux-arm)         ## host native build
+        cd $LAME
+        ./configure --prefix=$INSTALL_PATH --disable-shared --with-pic CFLAGS=""
+        make -j $MAKEJ
+        make install
+        cd ../$SPEEX
+        ./configure --prefix=$INSTALL_PATH --disable-shared --with-pic CFLAGS=""
+        make -j $MAKEJ
+        make install
+        cd ../$OPENCORE_AMR
+        ./configure --prefix=$INSTALL_PATH --disable-shared --with-pic CFLAGS="" CXXFLAGS=""
+        make -j $MAKEJ
+        make install
+        cd ../$OPENSSL
+        ./Configure linux-armv4 -march=armv7-a -D__ARM_MAX_ARCH__=8 -fPIC no-shared --prefix=$INSTALL_PATH
+        make # fails with -j > 1
+        make install
+        cd ../openh264-$OPENH264_VERSION
+        make -j $MAKEJ DESTDIR=./ PREFIX=.. AR=ar ARCH=arm libraries install-static
+        cd ../$X264
+        ./configure --prefix=$INSTALL_PATH --enable-static --enable-pic --disable-opencl 
+        make -j $MAKEJ
+        make install
+        cd ../$X265
+        CC="gcc" CXX="g++" $CMAKE -DENABLE_SHARED=OFF -DENABLE_PIC=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTAL
+        make -j $MAKEJ
+        make install
+        ;;
+
     linux-x86)
         cd $LAME
         ./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux CFLAGS="-m32 -msse2"

diff --git a/flandmark/cppbuild.sh b/flandmark/cppbuild.sh
index 3f32ef7..d0fd1cd 100755
--- a/flandmark/cppbuild.sh
+++ b/flandmark/cppbuild.sh
@@ -32,6 +32,12 @@ case $PLATFORM in
         cp libflandmark/*.h ../include
         cp libflandmark/*.a ../lib
         ;;
+    linux-arm)
+        CC="$OLDCC" CXX="$OLDCXX" $CMAKE -DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$OPENCV_PATH/share/OpenCV/
+        make -j4 flandmark_static
+        cp libflandmark/*.h ../include
+        cp libflandmark/*.a ../lib
+        ;;
     linux-x86)
         CC="$OLDCC -m32" CXX="$OLDCXX -m32" $CMAKE -DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$OPENCV_PATH/share/O
         make -j4 flandmark_static

diff --git a/libdc1394/cppbuild.sh b/libdc1394/cppbuild.sh
index c63118d..2e39444 100755
--- a/libdc1394/cppbuild.sh
+++ b/libdc1394/cppbuild.sh
@@ -17,6 +17,11 @@ tar -xzvf ../libdc1394-$LIBDC1394_VERSION.tar.gz
 cd libdc1394-$LIBDC1394_VERSION
 
 case $PLATFORM in
+    linux-arm)
+        CC="$OLDCC" ./configure --prefix=$INSTALL_PATH
+        make -j4
+        make install-strip
+        ;;
     linux-x86)
         CC="$OLDCC -m32" ./configure --prefix=$INSTALL_PATH
         make -j4

diff --git a/libfreenect/cppbuild.sh b/libfreenect/cppbuild.sh
index 57bbf90..2aeb7aa 100755
--- a/libfreenect/cppbuild.sh
+++ b/libfreenect/cppbuild.sh
@@ -27,6 +27,11 @@ fi
 cd libfreenect-$LIBFREENECT_VERSION
 
 case $PLATFORM in
+    linux-arm)
+        CC="$OLDCC" CXX="$OLDCXX" $CMAKE -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_FAKENECT=OFF -
+        make -j4
+        make install
+        ;;
     linux-x86)
         CC="$OLDCC -m32" CXX="$OLDCXX -m32" $CMAKE -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_FAKE
         make -j4


# -march=native??  -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv4
mvn -Dplatform.compiler.default="" install --projects .,opencv,videoinput,ffmpeg,flycapture,libdc1394,libfreenect,artoolkitplus,flandmark

ln ~/.m2/repository/org/bytedeco/javacpp-presets/opencv/3.1.0-1.2-SNAPSHOT/opencv-3.1.0-1.2-SNAPSHOT-linux-arm.jar ~/.m2/repository/org/bytedeco/javacpp-presets/opencv/3.1.0-1.2-SNAPSHOT/opencv-3.1.0-1.2-SNAPSHOT-linux-arm_32.jar
ln ~/.m2/repository/org/bytedeco/javacpp-presets/videoinput/0.200-1.2-SNAPSHOT/videoinput-0.200-1.2-SNAPSHOT-linux-arm.jar ~/.m2/repository/org/bytedeco/javacpp-presets/videoinput/0.200-1.2-SNAPSHOT/videoinput-0.200-1.2-SNAPSHOT-linux-arm_32.jar

  1. install and build jogl

from: 
http://jogamp.org/jogl/doc/HowToBuild.html

This next step is important.
from:
http://forum.jogamp.org/env-TARGET-PLATFORM-ROOT-usr-lib-does-not-exist-td4033904.html


export TARGET_PLATFORM_ROOT=/

mkdir jogamp
cd jogamp
git clone --recursive --depth=1 https://github.com/sgothel/gluegen.git
git clone --recursive --depth=1 https://github.com/sgothel/jogl.git

build gluegen


cd gluegen

The default jogamp build is built from a cross compiler which has a different library layout than the native filesystem. We need to remove nonstdlib option from gcc compiles.
for: https://jogamp.org/bugzilla/show_bug.cgi?id=1190

Apply patch


diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 01d6146..766022c 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -1239,7 +1239,6 @@
          for official JogAmp builds! -->
     <linker id="linker.cfg.linux.armv6" name="${gcc.compat.compiler}">
       <linkerarg value="-fpic" /> 
-      <linkerarg value="-nostdlib" />
       <linkerarg value="-Bdynamic" />
       <linkerarg value="-static-libgcc" if="isGCC"/>
       <linkerarg value="-static-libstdc++" if="isGCC"/>

diff --git a/make/build.xml b/make/build.xml
index d7abcd8..c69b578 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -1221,7 +1221,7 @@
             <param name="description" value="GlueGen - JNI Glue Code Generator"/>
         </antcall>
         <antcall target="maven.${mvn.task}.artifact" inheritall="true">
-            <param name="artifactId" value="gluegen-rt"/>
+            <param name="artifactId" value="gluegen-rt-main"/>
             <param name="description" value="GlueGen runtime"/>
         </antcall>
         <antcall target="maven.${mvn.task}.native.artifact" inheritall="true">



cd make
ant
ant maven.install

build jogl


cd ../../jogl/make
ant

> from:
> https://gist.github.com/tysonmalchow/1624599

mvn install:install-file -Dversion=$VERSION -DlocalRepositoryPath="$MVN_REPO" -DgroupId=com.jogamp.jogl -DartifactId=jogl-all -Dpackaging=jar -Dfile="$TEMPFILE/jogl.all.jar" -DgeneratePom=true

mvn install:install-file -DlocalRepositoryPath="$MVN_REPO" -Dclassifier="$platform" -Dversion=$VERSION -DgroupId=com.jogamp.jogl -DartifactId=jogl-natives -Dpackaging=jar -Dfile="$TEMPFILE/jogl-all-natives-$platform.jar" -DgeneratePom=true


cd ../build
mvn install:install-file -Dversion=2.4 -DlocalRepository=~/.m2/repository -DgroupId=org.jogamp.jogl -DartifactId=jogl-all-main -Dpackaging=jar -Dfile="$PWD/jar/*" -DgeneratePom=true

mvn install:install-file -DlocalRepositoryPath=~/.m2/repository -Dclassifier="arm" -Dversion=2.4 -DgroupId=org.jogamp.jogl -DartifactId=jogl-natives -Dpackaging=jar -Dfile="$PWD/lib/*" -DgeneratePom=true

cp gluegen-rt.jar /home/ubuntu/.m2/repository/org/jogamp/gluegen/gluegen-rt-main/2.4/gluegen-rt-main-2.4.jar
cp jocl.jar /home/ubuntu/.m2/repository/org/jogamp/jocl/jocl-main/2.4/jocl-main-2.4.jar
cp jogl-all.jar /home/ubuntu/.m2/repository/org/jogamp/jogl/jogl-all-main/2.4/jogl-all-main-2.4.jar

build jocl


cd ../../jocl

Need to apply the following patch because of this error:
/home/ubuntu/src/jogamp/jocl/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java:44:
error: CLDynamicLibraryBundleInfo is not abstract and does not override abstract method
searchToolLibSystemPathFirst() in DynamicLibraryBundleInfo

apply patch


diff --git a/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java b/src/com/jogamp/opencl/llb/impl/CLD
index 4f3e682..9ac026b 100644
--- a/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java
+++ b/src/com/jogamp/opencl/llb/impl/CLDynamicLibraryBundleInfo.java
@@ -157,6 +157,16 @@ public final class CLDynamicLibraryBundleInfo implements DynamicLibraryBundleInf
     public final RunnableExecutor getLibLoaderExecutor() {
         return DynamicLibraryBundle.getDefaultRunnableExecutor();
     }
+
+    @Override
+    public final boolean searchToolLibInSystemPath() {
+       return true;
+    }
+
+    @Override
+    public final boolean searchToolLibSystemPathFirst() {
+       return true;
+    }
 }




cd ../build
mvn install:install-file -Dversion=2.4 -DlocalRepository=~/.m2/repository -DgroupId=org.jogamp.jocl -DartifactId=jocl-main -Dpackaging=jar -Dfile="$PWD/jar/*" -DgeneratePom=true

  1. install and build org.bytedeco.javacv

git clone --depth=1 https://github.com/bytedeco/javacv.git

apply patch


diff --git a/pom.xml b/pom.xml
index 00e10f0..792e503 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,7 +92,7 @@
     <dependency>
       <groupId>org.bytedeco.javacpp-presets</groupId>
       <artifactId>ffmpeg</artifactId>
-      <version>2.8.4-${javacpp.version}</version>
+      <version>2.8.5-${javacpp.version}</version>
     </dependency>
     <dependency>
       <groupId>org.bytedeco.javacpp-presets</groupId>
@@ -141,19 +141,19 @@
     <dependency>
       <groupId>org.jogamp.gluegen</groupId>
       <artifactId>gluegen-rt-main</artifactId>
-      <version>2.3.1</version>
+      <version>2.4</version>
       <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>org.jogamp.jogl</groupId>
       <artifactId>jogl-all-main</artifactId>
-      <version>2.3.1</version>
+      <version>2.4</version>
       <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>org.jogamp.jocl</groupId>
       <artifactId>jocl-main</artifactId>
-      <version>2.3.1</version>
+      <version>2.4</version>
       <optional>true</optional>
     </dependency>


mvn -Pmarkers,ffmpeg,dc1394,flycapture,openkinect,videoinput,jogamp install

  1. build GRIP
    apply patch

diff --git a/build.gradle b/build.gradle
index 01b152a..f485f7d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -115,6 +115,9 @@ project(":core") {
     repositories {
         flatDir {
             dirs 'libs'
+            maven  {
+               url="file:///home/ubuntu/.m2/repository"
+           }
             maven {
                 url = "http://first.wpi.edu/FRC/roborio/maven/development"
             }
@@ -122,11 +125,11 @@ project(":core") {
     }

     dependencies {
-        compile group: 'org.bytedeco', name: 'javacv', version: '1.1'
-        compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.1'
-        compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.0.0-1.1', classifier: os
+        compile group: 'org.bytedeco', name: 'javacv', version: '1.2-SNAPSHOT'
+        compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.1.0-1.2-SNAPSHOT'
+        compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.1.0-1.2-SNAPSHOT', classifie
         compile group: 'org.bytedeco.javacpp-presets', name: 'opencv-3.0.0-1.1', classifier: 'linux-frc'
-        compile group: 'org.bytedeco.javacpp-presets', name: 'videoinput', version: '0.200-1.1', classifier: os
+        compile group: 'org.bytedeco.javacpp-presets', name: 'videoinput', version: '0.200-1.2-SNAPSHOT', class
         compile group: 'org.python', name: 'jython', version: '2.7.0'
         compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.8'
         compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'



./gradlew jar

find jar in
build/libs/GRIP-1.1.1-37-g39f1158.jar

Whille step 11 builds all the classes, the jar created is empty.
I’m working on a solution.
It looks like ‘./gradlew shadowJar’ should build a distributed product, but it is generating an error.
There isn’t any documentation from the programmer how they package this. :- )

To run grip, create a common location for the install.
I chose ~/lib.
Run the following commands (once).


ln /home/ubuntu/.gradle/caches/modules-2/files-2.1/org.controlsfx/controlsfx/8.40.10/fe12544570095b334d45c61e8c9a26f30ffc1675/controlsfx-8.40.10.jar controlsfx-8.40.10.jar
ln /home/ubuntu/src/ntcore/arm/build/binaries/ntcoreSharedLibrary/libntcore.so libntcore.so
ln /home/ubuntu/src/ntcore/arm/build/libs/ntcore-arm.jar ntcore-arm.jar
curl -o net.schmizz.sshj-0.8.1.jar http://search.maven.org/remotecontent?filepath=org/apache/stratos/net.schmizz.sshj/0.8.1/net.schmizz.sshj-0.8.1.jar

Then create a shell script, run-grip


CP="-cp $HOME/lib/core-1.1.1-37-g39f1158-all.jar"
CP="$CP:$HOME/lib/ui-1.1.1.jar"
CP="$CP:$HOME/lib/controlsfx-8.40.10.jar"
CP="$CP:$HOME/lib/net.schmizz.sshj-0.8.1.jar"

java -XX:-OmitStackTraceInFastThrow -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea \
        $CP -Djava.library.path=$HOME/lib  edu.wpi.grip.ui.Main

Make it executable


chmod +x run-grip

Then call run-grip to do your testing.