Re: [javacpp-project] Running JavaCPP with maven clean install

759 views
Skip to first unread message

Samuel Audet

unread,
Jul 21, 2012, 2:35:07 AM7/21/12
to javacpp...@googlegroups.com
I've just updated the pom.xml file so that no dependencies other than
OpenCV and a C++ compiler for JavaCPP are required by default.
http://code.google.com/p/javacv/source/detail?r=3e09f18d3bf3f164cfde55cb120d8f90264cbf37
Please try again with that! thanks

Samuel

On 2012-07-20 19:16, Max Sii wrote:
> Hi Samuel,
> Thank you very much for your hard work.
> I have checkout a local copy of javaCV from
> https://code.google.com/p/javacv/
> and I have run into a problem when I run the maven command "mvn clean
> install" on the project root, I am getting the following error:
> =============================================
> [INFO] --- exec-maven-plugin:1.2:exec (javacpp) @ javacv ---
> Generating source file:
> P:\javacv\javacv\target\classes\com\googlecode\javacv\cpp\jniARToolKitPlus.cpp
> Building library file:
> P:\javacv\javacv\target\classes\com\googlecode\javacv\cpp\windows-x86\jniARToolKitPlus.dll
> cl "/IC:\Program Files (x86)\Java\jdk1.7.0_05\include" "/IC:\Program
> Files (x86)\Java\jdk1.7.0_05\include\win32"
> P:\javacv\javacv\target\classes\com\googlecode\
> javacv\cpp\jniARToolKitPlus.cpp /arch:SSE2 /fp:fast /W3 /Oi /O2 /EHsc
> /Gy /GL /MD /LD /link
> /OUT:P:\javacv\javacv\target\classes\com\googlecode\javacv\cpp\windo
> ws-x86\jniARToolKitPlus.dll
> Exception in thread "main" java.io.IOException: Cannot run program "cl":
> CreateProcess error=2, The system cannot find the file specified
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
> at com.googlecode.javacpp.Builder.compile(Builder.java:244)
> at com.googlecode.javacpp.Builder.generateAndCompile(Builder.java:284)
> at com.googlecode.javacpp.Builder.build(Builder.java:585)
> at com.googlecode.javacpp.Builder.main(Builder.java:663)
> Caused by: java.io.IOException: CreateProcess error=2, The system cannot
> find the file specified
> at java.lang.ProcessImpl.create(Native Method)
> at java.lang.ProcessImpl.<init>(ProcessImpl.java:189)
> at java.lang.ProcessImpl.start(ProcessImpl.java:133)
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
> ... 4 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 5.243s
> [INFO] Finished at: Fri Jul 20 21:53:20 NZST 2012
> [INFO] Final Memory: 16M/93M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.codehaus.mojo:exec-maven-plugin:1.2:exec (javacpp) on project
> javacv: Command execution failed. Process exited with an error:
> 1(Exit value: 1) -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> ==============================================================
> The following is my machine specs.
> Windows 7 64 bit
> Oracle Java SE SDK 32 bit
> Open CV 2.4.2 (there is no option of choosing between 32 bit and 64, so
> I assume it is 32 bit)
> Any help will be greatly appreciated.
> Many thanks,
> Max.
>
> --
>
>

Max Sii

unread,
Jul 23, 2012, 6:59:51 PM7/23/12
to javacpp...@googlegroups.com
Hi Samuel,
 
I have just try a mvn clean install with the latest code (JavaCV 0.2).  It is now giving me an error message regarding the jnicvkernels.dll file.
 
[INFO] --- exec-maven-plugin:1.2:exec (javacpp) @ javacv ---
Generating source file: P:\javacv\javacv\target\classes\com\googlecode\javacv\cpp\jnicvkernels.cpp
Building library file: P:\javacv\javacv\target\classes\com\googlecode\javacv\cpp\windows-x86\jnicvkernels.dll
cl "/IC:\Program Files (x86)\Java\jdk1.7.0_05\include" "/IC:\Program Files (x86)\Java\jdk1.7.0_05\include\win32" /IC:/opencv/build/include/ P:\javacv\javacv\tar
get\classes\com\googlecode\javacv\cpp\jnicvkernels.cpp /arch:SSE2 /fp:fast /W3 /Oi /O2 /EHsc /Gy /GL /MD /LD /link /OUT:P:\javacv\javacv\target\classes\com\goog
lecode\javacv\cpp\windows-x86\jnicvkernels.dll

Exception in thread "main" java.io.IOException: Cannot run program "cl": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        at com.googlecode.javacpp.Builder.compile(Builder.java:244)
        at com.googlecode.javacpp.Builder.generateAndCompile(Builder.java:284)
        at com.googlecode.javacpp.Builder.build(Builder.java:585)
        at com.googlecode.javacpp.Builder.main(Builder.java:663)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:189)
        at java.lang.ProcessImpl.start(ProcessImpl.java:133)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
        ... 4 more
[INFO] ------------------------------------------------------------------------
 
 
I could have exclude those dependecies in the pom file, but I am not sure what effect it will be on the project...
 
Many thanks,
Max.

Samuel Audet

unread,
Jul 24, 2012, 12:19:59 AM7/24/12
to javacpp...@googlegroups.com
Like I said, we also need a C++ compiler. For whatever reason, one
doesn't come preinstalled with Windows, but we can download it from
Microsoft. Please read the README.txt file

On 07/24/2012 07:59 AM, Max Sii wrote:
> Hi Samuel,

Max Sii

unread,
Jul 24, 2012, 11:50:11 PM7/24/12
to javacpp...@googlegroups.com
Hi Samuel,
 
It is working now.
 
Thanks.
Max.
Reply all
Reply to author
Forward
0 new messages