-
Notifications
You must be signed in to change notification settings - Fork 741
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
Caffe preset build error: sun.reflect.annotation.TypeNotPresentExceptionProxy #97
Comments
Run "mvn clean" before install :)
|
Already tried that, does not work:
Does it build on your box? Here is a full log (Ubuntu 14.04 x86_64): https://dpaste.de/qRj8 The script caffe/cppbuild.sh uses the master branch of caffe git, maybe the caffe sources have changed over time? |
I tried to debug the issue to get more insight. The error is thrown in class org.bytedeco.javacpp.tools.Builder within the while condition
This causes the exception: (Breakpoint at line 132)
When I look at the variables while debugging it happens when the org.bytedeco.javacpp.tools.Builder class is called with org.bytedeco.javacpp.preset.caffe class. The exception itself is thrown in sun.reflect.annotation.AnnotationParser.parseAnnotations(...) but I have no JDK source so I cannot debug it more deeper
I can imaginge multiple reasons for the behavior I get:(1.) An Annotation in org.bytedeco.javacpp.preset.caffe is not compatible/wrong with actual javacpp-1.1_snapshot (the preset if buggy) As my first post shows I can build the opencv preset in the same project, and it does not throw an error like this. So I guess the javacpp-presets project classpath seems to be ok and javacpp presets are found by opencv module. Can anyone confirm if the caffe preset builds in the current state on linux-x86_64? Or is this some kind of known problem that it does not compile? |
Yes, I've just tried updating Caffe, and it still builds fine here. I'm pretty sure it's just your system picking up old classes from somewhere. Make sure to clean everything up, repull, and rebuild from scratch. |
ok. I will do the following steps and report the result here. The only difference is that I build it on linux-x86_64 with export CPU_ONLY = 1 added.
|
Thanks for your help, got a different behavior now: (mvn install --projects .,opencv,caffe -U)
It obviously is missing cuda. Caffe itself builds and runs well with CPU_ONLY on a headless machine. I'll try to find a box with linux-x86_64 and cuda installed, but I really need a build that can be used in headless environments. Is cuda a mandatory dependency for the caffe preset despite the CPU_ONLY flag in cppbuild.sh? |
No, the build system just isn't very user-friendly. It looks like we need to set some define macro manually. I'll look into that a bit later, unless you figure out something before ;) |
There, should be fixed in latest commit. Thanks for reporting! |
Thanks for the fix, I'll try it and report here. btw: |
Confirm that the bug is fixed. Thanks a lot :) |
I try to build caffe presets on Ubuntu 14.04 x86_64 but encounter errors with the java presets code. As far as I can understand it failes to find a annotation type.
create javacpp-1.1_snapshot
install build environment for natice caffe / opencv
Build and install opencv
Because I want a CPU only build I added CPU_ONLY to caffe/cppbuild.sh for platform linux-x86_64
Build and install caffe
Then the following error happens:
What should I do now? Wait until the presets are fixed? Or find a way to debug the Annotation that causes the problem?
Or do only I have that problem and it builds well for you?
Thanks
Sebastian
The text was updated successfully, but these errors were encountered: