View Single Post
  #1   Spotlight this post!  
Unread 14-01-2014, 23:22
gizmo720 gizmo720 is offline
Registered User
FRC #1719
 
Join Date: Jan 2011
Rookie Year: 2010
Location: USA
Posts: 4
gizmo720 is an unknown quantity at this point
WPICameraExtension difficulties

My team is trying to use the WPICameraExtension as a base to do our vision processing. However, we are having difficulty getting it to work. Specifically, we are getting "java.lang.UnsatisfiedLinkError:" exceptions:
Code:
Exception in thread "Thread-4" java.lang.UnsatisfiedLinkError: no jniavcodec in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1874)
	at java.lang.Runtime.loadLibrary0(Runtime.java:849)
	at java.lang.System.loadLibrary(System.java:1087)
	at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:711)
	at com.googlecode.javacpp.Loader.load(Loader.java:586)
	at com.googlecode.javacpp.Loader.load(Loader.java:540)
	at com.googlecode.javacv.cpp.avcodec.<clinit>(avcodec.java:39)
	at com.googlecode.javacv.FFmpegFrameGrabber.<clinit>(FFmpegFrameGrabber.java:103)
	at edu.wpi.first.wpijavacv.WPIFFmpegVideo$1.run(WPIFFmpegVideo.java:25)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/javacpp131673991977045/libjniavcodec.so: libavutil.so.52: cannot open shared object file: No such file or directory
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1953)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1878)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1839)
	at java.lang.Runtime.load0(Runtime.java:795)
	at java.lang.System.load(System.java:1061)
	at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:700)
	... 5 more
We have tried this on 2 Windows, a Mac, and a Linux computer. On the Linux computer, we have been able to manually compile the correct version of the shared object, and and extend LD_LIBRARY_PATH to point to them. After doing this, the extension works fine.

I assume that this is a simple mismatch between the version that WPICameraExtension was compile against, and the binary version of the dependency that is being distributed. Has anyone versions of these that are already binary compatible. If not, what would it take to set the build environment in Windows to compile the dependencies ourselves?
Reply With Quote