help! BUILD FAILED building javacv using Netbeans 7.2.1 and/or ant on Mac OS

224 views
Skip to first unread message

John Fehr

unread,
Aug 2, 2013, 12:15:18 AM8/2/13
to jav...@googlegroups.com
I finally almost have javacv building properly, but it fails after creating the dist/javacv-macosx-x86_64.jar

Up until the last error message, all I had in the build were warnings, no errors.
Here's the last couple of output lines on netbeans:

Creating JAR file: dist/javacv-macosx-x86_64.jar
compile:
Copying 1 file to /Volumes/Backup/Users/fehrjo1/NetBeansProjects/javacv/build
/Volumes/Backup/Users/fehrjo1/NetBeansProjects/javacv/nbproject/build-impl.xml:1011: Unknown attribute [manifest]
BUILD FAILED (total time: 58 seconds)

If I build with ant, using 'ant clean jar', I get the same result, with a couple of extra lines:

     [java] Creating JAR file: dist/javacv-macosx-x86_64.jar

compile:

-pre-jar:

-pre-pre-jar:

-do-jar-with-manifest:

-do-jar-without-manifest:

-do-jar-with-mainclass:

-do-jar-with-libraries-create-manifest:

-do-jar-with-libraries-copy-manifest:
     [copy] Copying 1 file to /Volumes/Backup/Users/fehrjo1/NetBeansProjects/javacv/build

-do-jar-with-libraries-set-main:

-do-jar-with-libraries-set-splashscreen:

-init-macrodef-copylibs:

-do-jar-with-libraries-pack:

BUILD FAILED
/Volumes/Backup/Users/fehrjo1/NetBeansProjects/javacv/nbproject/build-impl.xml:1011: Unknown attribute [manifest]

Total time: 1 minute 3 seconds

If anyone has any ideas on how to fix this, please let me know, I'm getting really frustrated. (And if anyone is curious, yes, I do have to build the library, not use pre-compiled jars.)

Thanks!

  John

Samuel Audet

unread,
Aug 3, 2013, 8:24:56 PM8/3/13
to jav...@googlegroups.com
Hello,

On 08/02/2013 01:15 PM, John Fehr wrote:
> I finally almost have javacv building properly, but it fails after creating the dist/javacv-macosx-x86_64.jar
>
> Up until the last error message, all I had in the build were warnings, no errors.
> Here's the last couple of output lines on netbeans:
>
> Creating JAR file: dist/javacv-macosx-x86_64.jar
> compile:
> Copying 1 file to
> /Volumes/Backup/Users/fehrjo1/NetBeansProjects/javacv/build
> /Volumes/Backup/Users/fehrjo1/NetBeansProjects/javacv/nbproject/build-impl.xml:1011: Unknown attribute [manifest]
> BUILD FAILED (total time: 58 seconds)

Ah yes, please remove the `nbproject` subdirectory before trying to open
the source in NetBeans. This is old, and will eventually be removed. The
Maven config is more portable and more reliable anyway

Samuel

John Fehr

unread,
Aug 10, 2013, 11:55:45 PM8/10/13
to jav...@googlegroups.com
Thanks Samuel!

Just for posterity, I did what you suggested, and did a 'mvn install' in the javacv folder.  I got an error similar to:

COMPILATION ERROR :
-------------------------------------------------------------
com/googlecode/javacv/cpp/opencv_contrib.java:[91,12] cannot find symbol
symbol  : method inherit()
location: @interface com.googlecode.javacpp.annotation.Properties

It took me a while but eventually I figured out that it was using a Properties file from a download somehow, so I removed me ~/.m2 folder,
and ran 'mvn install' in the javacpp folder, which ran without errors, and then ran 'mvn install' again in the javacv folder. This time it worked without errors.

I could also now right click on the JavaCV project in Netbeans and build. (Some java files still have red !'s on them, so I'm not sure what's going on there, but it built without errors. The errors all seem to be with finding the com.jogamp.opencl.* stuff, but I can't find where I can specify the location of that.)

I think I'm good to go now.

Thanks!

  John

Samuel Audet

unread,
Aug 14, 2013, 8:59:07 PM8/14/13
to jav...@googlegroups.com
On 08/11/2013 12:55 PM, John Fehr wrote:
> It took me a while but eventually I figured out that it was using a
> Properties file from a download somehow, so I removed me ~/.m2 folder,
> and ran 'mvn install' in the javacpp folder, which ran without errors,
> and then ran 'mvn install' again in the javacv folder. This time it
> worked without errors.

Yes, JavaCPP and JavaCV need to be in sync. I make changes that break
compatibility with previous versions sometimes, but the repositories
should be in sync. I'm not sure how to make this work nicely with Maven
version numbers, but I think anyway I'll be moving at some point the
native stuff in JavaCV to some new subproject of JavaCPP.

> I could also now right click on the JavaCV project in Netbeans and
> build. (Some java files still have red !'s on them, so I'm not sure
> what's going on there, but it built without errors. The errors all seem
> to be with finding the com.jogamp.opencl.* stuff, but I can't find where
> I can specify the location of that.)

Yes, you can ignore those if you don't plan on using JogAmp. We need to
install JogAmp in the CLASSPATH somehow, because they don't provide
Maven artifacts.

Samuel

Reply all
Reply to author
Forward
0 new messages