shaileshmulange / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Having trouble compiling the source in Netbeans. Almost there! #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
My motivation for this is to set the path for the opencv libraries used.  I 
currently have this working on my system with WebObjects, but need it to be 
portable, where these libraries are referenced using a relative path, rather 
than an absolute path.  This can be configured in opencv_core.java.

What steps will reproduce the problem?
1.  Downloaded NetBeans 7.1.1
2.  Downloaded and configured both javacpp and javacv (pictures included)
3.  Downloaded and linked the jocl and jogl binaries (jar files) to javacv
4.  REFACTORED PS3EyeFrameGrabber.java out of the project due to unresolved 
inport (and not needed by me)
5.  removed the list reference to PS3EyeFrameGrabber.java from 
FrameGrabber.java (pictured)
6.  Resulting javacv had several Annotation errors, build output is included.
7.  Removed Annotations from all effected files, and tried to build the project 
(which is now free of build errors).
8.  Build still fails: output included.

What is the expected output? What do you see instead?

See attached files.
I suspect I am close to actually getting this built, and producing the 
javacv.jar etc...

What version of the product are you using? On what operating system?

OSX Lion

Attachments:

Original issue reported on code.google.com by benny....@gmail.com on 16 Mar 2012 at 12:47

Attachments:

GoogleCodeExporter commented 9 years ago
I made an incompatible change in the newest version of JavaCPP. Could you retry 
with javacpp-src-20120218.zip ? thanks

Original comment by samuel.a...@gmail.com on 16 Mar 2012 at 2:39

GoogleCodeExporter commented 9 years ago
I was already using javacpp-src-20120218.zip.

I downgraded to javacpp-src-20120108.zip and had a very similar experience to 
20120218.  

I downgraded again to javacpp-src-20111001.zip and in this case there were no 
build errors in com.google.javacv, but I still needed to remove the annotations 
from several classes in com.google.javacv.cpp.  After removing the annotations 
and building I get the error output attached.

These errors seem to result from the missing annotations (not surprising).  Can 
you build it from scratch?  Do you have a clear set of instruction to build 
this project?  I love the work you've done, and I'm very interested in 
resolving this issue.  

Original comment by benny....@gmail.com on 16 Mar 2012 at 9:51

Attachments:

GoogleCodeExporter commented 9 years ago
Also, I'm unsure how ARToolkit fits into the build, it doesn't seem to be a 
java project (or netbeans project).

Like some of your potential clients, I am fine with stripping out some 
functionality to build, I'm interested in non-video functionality.  Thanks 
again for your prompt responses.

Original comment by benny....@gmail.com on 16 Mar 2012 at 9:57

GoogleCodeExporter commented 9 years ago
We should just need to unzip javacv-src-20120218.zip, javacpp-src-20120218.zip 
and ARToolKitPlus_2.1.1t.zip together in some directory, run "ant" in the 
created "javacv" subdirectory and it should just compile everything just fine. 
The only errors we should get would be caused by missing dependencies, which we 
can fix by deleting the offending files if desired.

Original comment by samuel.a...@gmail.com on 16 Mar 2012 at 11:42

GoogleCodeExporter commented 9 years ago
And you were not using javacpp-src-20120218.zip. It could not have generated 
this error:
http://code.google.com/p/javacv/issues/attachmentText?id=173&aid=1730000003&name
=AnnotationErrors.txt&token=leczehmSp9uNMwOYXnn0a--HfJs%3A1331898178977#37 
Please try again with javacpp-src-20120218.zip, thank you

Original comment by samuel.a...@gmail.com on 16 Mar 2012 at 11:45

GoogleCodeExporter commented 9 years ago
At this point I've used all three of the sources in NetBeans.  

I also tried using 20120218 with command line 'ant' with javacpp next to it, 
and removing files as they offend the compiler.  This experience was very 
similar to performing it in netbeans.  No real tangible difference (same 
errors, same files being removed....)

Question:  In a previous post, you said "I made an incompatible change in the 
newest version of JavaCPP. Could you retry with javacpp-src-20120218.zip ? 
thanks" 
but javacpp-src-20120218.zip IS the latest version.  Are you talking about the 
right version?  Is there one newer release that you are working with?

Also, your post begs the question... how to get rid of the annotation errors?  
I started to remove the "@Index" on the end of them, and that seemed to help.  
However, from your output:

/Users/benny/Documents/NBWorkspace/javacv/src/com/googlecode/javacv/cpp/opencv_f
lann.java:119: annotation type not applicable to this kind of declaration
    @com.googlecode.javacpp.annotation.Index

There seems to be two annotations, and there is no '@Index' to remove.... if 
that's even the right answer.

It seems you can reproduce the error.  How do you resolve these annotation 
errors? 

Original comment by benny....@gmail.com on 16 Mar 2012 at 6:54

GoogleCodeExporter commented 9 years ago
I just re-read... you meant CPP, and I was reading CV... let me test again.

Original comment by benny....@gmail.com on 16 Mar 2012 at 6:58

GoogleCodeExporter commented 9 years ago
Ok, using the matching 20120218, javacpp and javacv went much smoother, the 
only file that complained was the PS3 file, which I removed, as well as the 
list line in FrameGrabber.  I included glugen, jocl, jogl, and the project was 
ready to build.

It got through a couple of the libraries and then gave the error output 
attached:

Now it seems super close.  I'd like to have this version build, I'm going to go 
back to the next previous pair and try again.

Original comment by benny....@gmail.com on 16 Mar 2012 at 7:12

Attachments:

GoogleCodeExporter commented 9 years ago
I must be missing some resource.  

I used the matching javacv-src-20120108.zip and javacpp-src-20120108.zip, added 
glugen, jocl, jogl.
I Removed the PS3 class and reference in FrameGrabber.  Built again and got a 
similar output.  I anxiously await your reply.  :)

Original comment by benny....@gmail.com on 16 Mar 2012 at 7:27

Attachments:

GoogleCodeExporter commented 9 years ago
It's failing in the files for FFmpeg .. We need FFmpeg 0.6.x or 0.7.x as per 
the README.txt file. (I know it's an old version, but I'm waiting until the API 
stabilizes a bit before I redo all that.)

Original comment by samuel.a...@gmail.com on 17 Mar 2012 at 5:20

GoogleCodeExporter commented 9 years ago
I installed ffmpeg-0.7.1.1.tar.gz from source, attached console ouput.

To that end I used macports to install libidl -> yasm-1.2.0 -> ffmpeg

I didn't change the netbeans project, because I figure the ffmpeg files are now 
on the system path, yet I get the same build error output.  Forgive me, but am 
I missing some sort of linking step with the project?

Original comment by benny....@gmail.com on 17 Mar 2012 at 6:38

Attachments:

GoogleCodeExporter commented 9 years ago
Spoke to soon, output is different... need to figure out how to get opencv in 
there?

Original comment by benny....@gmail.com on 17 Mar 2012 at 6:43

Attachments:

GoogleCodeExporter commented 9 years ago
Well the system is obviously not finding the files FFmpeg installs there. You 
could try to modify avutil.java to specify manually that install directory, 
whatever it is 

According to your output.txt OpenCV compiles fine. Please do confirm there is a 
problem before trying to fix it

Original comment by samuel.a...@gmail.com on 17 Mar 2012 at 6:45

GoogleCodeExporter commented 9 years ago
Look, you broke OpenCV here. Undo what you did, and this will fix OpenCV, which 
compiled just fine. Then, try to fix FFmpeg without breaking OpenCV. If OpenCV 
breaks again, undo whatever you did, and try again! ok?

Original comment by samuel.a...@gmail.com on 17 Mar 2012 at 6:47

GoogleCodeExporter commented 9 years ago
Anyway, I'll merge this with issue 146. If someone wants to contribute builds, 
please let me know, I'll be sure to add them to the Downloads tab.

Original comment by samuel.a...@gmail.com on 17 Mar 2012 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by samuel.a...@gmail.com on 17 Mar 2012 at 6:51

GoogleCodeExporter commented 9 years ago
I think I reverted the issue, and I have new output... just inching my way 
there.  These are mostly warnings...

Original comment by benny....@gmail.com on 17 Mar 2012 at 7:06

Attachments: