Compiling JavaCV

94 views
Skip to first unread message

Wei-Ning Huang

unread,
Jul 18, 2011, 5:31:56 AM7/18/11
to jav...@googlegroups.com
Hi,

I'm trying to compile javacv myself but without luck.
I'm using netbeans 6.9.1 and it shows a lot of reference error.
When I try to build it, it shows error mesasges:

init:
Deleting: /home/aitjcize/Downloads/javacv/build/built-jar.properties
deps-jar:
Updating property file: /home/aitjcize/Downloads/javacv/build/built-jar.properties
/home/aitjcize/Downloads/javacv/nbproject/build-impl.xml:504: The following error occurred while executing this line:
/home/aitjcize/Downloads/javacv/nbproject/build-impl.xml:898: The following error occurred while executing this line:
java.io.FileNotFoundException: /home/aitjcize/Downloads/javacpp/build.xml (no such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:268)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:177)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:393)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:281)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
BUILD FAILED (total time: 0 seconds)

can any one help me with this?

Best regards,
Wei-Ning Huag

Samuel Audet

unread,
Jul 18, 2011, 6:40:48 AM7/18/11
to jav...@googlegroups.com

It's looking for the source code of JavaCPP, please check the README.txt file...

Samuel

2011/07/18 19:37 "Wei-Ning Huang" <aitj...@gmail.com>:

Wei-Ning Huang

unread,
Jul 18, 2011, 6:48:22 AM7/18/11
to jav...@googlegroups.com
Thanks, I didn't notice that it's from another project :P

BTW, I want to compile javacv from source because I can't find a way to make it work with android.

Here is my Android.mk

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
javacv:../lib/javacv.jar \
javacpp:../lib/javacpp.jar \
javacv-linux-x86:../lib/javacv-linux-x86.jar
include $(BUILD_MULTI_PREBUILT)
include $(CLEAR_VARS)

# Build Owl
LOCAL_MODULE := owl
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, org/zeroxlab/owl)
LOCAL_JAR_MANIFEST := ../etc/owl/manifest.txt
LOCAL_STATIC_JAVA_LIBRARIES := \
javacv \
javacpp \
javacv-linux-x86
include $(BUILD_HOST_JAVA_LIBRARY)
include $(CLEAR_VARS)

The compile messages:
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=3.1.4.1.5.9.2.6.5
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
make: Entering directory `/home/xxxxx/Work/android/aosp'
make: *** No rule to make target `/home/xxxxx/Work/xxxx/src/../lib/javacv.jar', needed by `out/target/product/generic/obj/JAVA_LIBRARIES/javacv_intermediates/javalib.jar'.  Stop.
make: Leaving directory `/home/xxxxx/Work/android/aosp'

I know this is not really related to javacv project, but I would be very glad if someone can answer this question for me :P

Best regards,
Wei-Ning Huang


2011/7/18 Samuel Audet <samuel...@gmail.com>

Samuel Audet

unread,
Jul 18, 2011, 6:59:56 AM7/18/11
to jav...@googlegroups.com

How do the instructions for Android in the README.txt file do not work?

Samuel

2011/07/18 19:48 "Wei-Ning Huang" <aitj...@gmail.com>:

Wei-Ning Huang

unread,
Jul 18, 2011, 7:29:06 AM7/18/11
to jav...@googlegroups.com
Hi Samuel,

Thanks for the reply, but since I'm developing a host side application for Android, so the instructions do not work for me.
Besides, I don't use eclipse or netbeans. So I'm curious how it could be done by writing Android.mk.

Thanks,

Samuel Audet

unread,
Jul 18, 2011, 7:39:20 AM7/18/11
to jav...@googlegroups.com

Just use the Ant build script that comes with the SDK...

2011/07/18 20:29 "Wei-Ning Huang" <aitj...@gmail.com>:

Wei-Ning Huang

unread,
Jul 20, 2011, 2:15:51 AM7/20/11
to jav...@googlegroups.com
Hi Samuel,

I tried using ant to build it, but the resulting jar files doesn't
contains libjni*.so, so it always
results to InitError. Is my build environment wrong or something?
I did check the build dir, the libjni*.so is built, but it's just
doesn't get pack into the jar, I only
see javacv.jar in my dist directory.

Thanks,
Wei-Ning Huang

2011/7/18 Samuel Audet <samuel...@gmail.com>:

Samuel Audet

unread,
Jul 20, 2011, 7:53:03 AM7/20/11
to jav...@googlegroups.com

The build dir should be empty when the build succeeds, so it is not succeeding. Please read the error message

2011/07/20 15:15 "Wei-Ning Huang" <aitj...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages