Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on Raspberry PI (ArchLinux@ARM) #27

Closed
t-oster opened this issue Jan 28, 2013 · 8 comments
Closed

Does not work on Raspberry PI (ArchLinux@ARM) #27

t-oster opened this issue Jan 28, 2013 · 8 comments
Assignees
Labels
Milestone

Comments

@t-oster
Copy link

t-oster commented Jan 28, 2013

I get the following stack-trace (order may be chaotic) on this device:

/proc/cpuinfo:
Processor   : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS    : 464.48
Features    : swp half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xb76
CPU revision    : 7

Hardware    : BCM2708
Revision    : 0002
Serial      : 0000000045873531

uname -a
Linux alarmpi 3.6.11-3-ARCH+ #1 PREEMPT Thu Jan 10 03:05:04 UTC 2013 armv6l GNU/

Stacktrace:
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
# BridJ: dlopen error when loading /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so : /tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so: undefined symbol: v4lconvert_enum_frameintervals
java.lang.RuntimeException: Library 'OpenIMAJGrabber' was not loaded successfully from file '/tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so'
    at org.bridj.BridJ.getNativeLibrary(BridJ.java:922)
    at org.bridj.BridJ.getNativeLibrary(BridJ.java:901)
    at org.bridj.BridJ.getNativeLibrary(BridJ.java:513)
    at org.bridj.cpp.CPPRuntime.newCPPInstance(CPPRuntime.java:627)
    at org.bridj.cpp.CPPRuntime$CPPTypeInfo.initialize(CPPRuntime.java:828)
    at org.bridj.cpp.CPPRuntime$CPPTypeInfo.initialize(CPPRuntime.java:755)
    at org.bridj.CRuntime$CTypeInfo.initialize(CRuntime.java:209)
    at org.bridj.BridJ.initialize(BridJ.java:970)
    at org.bridj.NativeObject.<init>(NativeObject.java:23)
    at org.bridj.StructObject.<init>(StructObject.java:14)
    at org.bridj.cpp.CPPObject.<init>(CPPObject.java:27)
    at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.<init>(OpenIMAJGrabber.java:64)
    at com.github.sarxos.webcam.ds.buildin.WebcamGrabberProcessor$NewGrabberTask.handle(WebcamGrabberProcessor.java:81)
    at com.github.sarxos.webcam.ds.buildin.WebcamGrabberProcessor$StaticProcessor.run(WebcamGrabberProcessor.java:52)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
Exception in thread "ProcessorThreadFactory" java.lang.RuntimeException: Failed to allocate new instance of type class com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber
    at org.bridj.cpp.CPPRuntime.newCPPInstance(CPPRuntime.java:674)
    at org.bridj.cpp.CPPRuntime$CPPTypeInfo.initialize(CPPRuntime.java:828)
    at org.bridj.cpp.CPPRuntime$CPPTypeInfo.initialize(CPPRuntime.java:755)
    at org.bridj.CRuntime$CTypeInfo.initialize(CRuntime.java:209)
    at org.bridj.BridJ.initialize(BridJ.java:970)
    at org.bridj.NativeObject.<init>(NativeObject.java:23)
    at org.bridj.StructObject.<init>(StructObject.java:14)
    at org.bridj.cpp.CPPObject.<init>(CPPObject.java:27)
    at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.<init>(OpenIMAJGrabber.java:64)
    at com.github.sarxos.webcam.ds.buildin.WebcamGrabberProcessor$NewGrabberTask.handle(WebcamGrabberProcessor.java:81)
    at com.github.sarxos.webcam.ds.buildin.WebcamGrabberProcessor$StaticProcessor.run(WebcamGrabberProcessor.java:52)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.RuntimeException: Library 'OpenIMAJGrabber' was not loaded successfully from file '/tmp/BridJExtractedLibraries3429022544279638110/OpenIMAJGrabber.so'
    at org.bridj.BridJ.getNativeLibrary(BridJ.java:922)
    at org.bridj.BridJ.getNativeLibrary(BridJ.java:901)
    at org.bridj.BridJ.getNativeLibrary(BridJ.java:513)
    at org.bridj.cpp.CPPRuntime.newCPPInstance(CPPRuntime.java:627)
    ... 13 more
@sarxos
Copy link
Owner

sarxos commented Jan 28, 2013

Hi @t-oster,

Can you verify if you have libv4l / libv4lconvert and all its related dependencies installed?

From the error I see in the stack trace, I conclude the problem is caused by missing dependency:

# BridJ: dlopen error when loading /tmp/[directory]/OpenIMAJGrabber.so : /tmp/[directory]/OpenIMAJGrabber.so: 
undefined symbol: v4lconvert_enum_frameintervals

The v4lconvert_enum_frameintervals function is part of libv4lconvert, so if it's missing, I guess you have either not installed it yet or installed version is pretty outdated.

I will close this ticket for now, but feel free to reopen it, if dependencies issue is not the root cause of this error.

Cheers!

@sarxos sarxos closed this as completed Jan 28, 2013
@t-oster
Copy link
Author

t-oster commented Jan 30, 2013

Hi,
I'm running ArchLinux on the Pi as already said. Libv4l and Libv4l-convert are both present (package v4l-utils provides libv4l=0.8.9). So missing library is not the problem. I can not figure out, why it is not working. I have the same configuration on my Notebook (also ArchLinux) and there it works....

@sarxos sarxos reopened this Jan 30, 2013
@sarxos
Copy link
Owner

sarxos commented Jan 30, 2013

I will provide you small program to be run on your Raspberry Pi so we can diagnose where the problem is located :)

@sarxos
Copy link
Owner

sarxos commented Jan 30, 2013

Hi,

I performed a little research and it seams like the *.so object is broken. The previous one was declaring the following:

$ nm -Ca OpenIMAJGrabber.so | grep -i frameintervals
0000ba0c T v4lconvert_enum_frameintervals

And the current one:

$ nm -Ca OpenIMAJGrabber.so | grep -i frameintervals
         U v4lconvert_enum_frameintervals

Also the file size is much smaller - 78 kB vs 196 kB.

I will rewert OpenIMAJGrabber.so for ARM 32 to the previous version with hope it will work for you, however you can notice possible side effects in form of the problem described in #9.

@t-oster
Copy link
Author

t-oster commented Jan 30, 2013

Hi,
thanks for the quick repies and the work. I will test it as soon as I have time (probably tomorrow...)..

@sarxos
Copy link
Owner

sarxos commented Jan 30, 2013

Fixed in 3474a01

You can use the new version in two ways:

  1. Download source code and build it locally, or
  2. Use precompiled JARs located here.

Since this is critical issue for all Raspberry Pi users who are willing to use Webcam Capture (vide @hepin1989), I will upload it to Maven Central ASAP, but first I want to confirm it fix the issue you reported.

If this was the root cause I will also report it in OpenIMAJ project so they will be aware of incorrect *.so in their repo.

Thank you!

@t-oster
Copy link
Author

t-oster commented Jan 31, 2013

I can confirm that it works now on the raspberry pi

@sarxos
Copy link
Owner

sarxos commented Jan 31, 2013

Thank you @t-oster !!

Reported in OpenIMAJ as OP-48.

I will release 0.3.8 including commit 3474a01 ASAP, so Raspberry Pi users will not be affected by this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants