Skip to content
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

Raspberry Pi 2: Failed to execute JavaCPP Builder: Could not parse opencv2/core/types_c.h #37

Closed
martinstuder opened this issue Feb 15, 2015 · 21 comments

Comments

@martinstuder
Copy link

Trying to build on a Raspberry Pi 2 yields the following error:

[ERROR] Failed to execute goal org.bytedeco:javacpp:0.10:build (generate-sources) on project opencv: Failed to execute JavaCPP Builder: Could not parse "opencv2/core/types_c.h": File does not exist -> [Help 1]
@saudet
Copy link
Member

saudet commented Feb 15, 2015

We need to run the build script for the native libraries first. Are you having any troubles doing that with bash cppbuild.sh install?

@martinstuder
Copy link
Author

The build script does not support linux-arm at the moment. Running ccmake, make, etc manually seems to work fine though.

@saudet
Copy link
Member

saudet commented Feb 18, 2015

Right, we have to add a case for that in the scripts. Would you be able to modify them in such a way that they run fine for linux-arm?

@martinstuder
Copy link
Author

I get it compiling if I run ccmake but I have been unable so far to extract a single cmake call that does the job ...

@saudet
Copy link
Member

saudet commented Feb 23, 2015

The one for linux-x86 without CC and CXX doesn't work? What happens?

@kriche
Copy link

kriche commented Apr 15, 2015

Hi Samuel,

Probably this is kind of a duplicated post but I am trying to get javacpp-presets installed on a raspberry pi.
I have some experience with maven (not much with compiling opencv) so perhaps if you point me in the right direction I could help.
Any help or information you can provide will be very appreciated!

Many thanks!
Kriche

Machine details:

uname -a
    Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux

pi@raspberrypi ~/javacpp-presets $ mvn -version
    Apache Maven 3.0.4
    Maven home: /usr/share/maven
    Java version: 1.7.0_40, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/jdk-7-oracle-armhf/jre
    Default locale: en_GB, platform encoding: UTF-8
    OS name: "linux", version: "3.18.7+", arch: "arm", family: "unix"

Trying to install javacpp-presets I got the error:

pi@raspberrypi ~/javacpp-presets $ mvn clean install
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:opencv:jar:2.4.11-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:opencv:2.4.11-${project.parent.version}, /home/pi/javacpp-presets/opencv/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:ffmpeg:jar:2.6.1-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:ffmpeg:2.6.1-${project.parent.version}, /home/pi/javacpp-presets/ffmpeg/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:flycapture:jar:2.7.3.19-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:flycapture:2.7.3.19-${project.parent.version}, /home/pi/javacpp-presets/flycapture/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:libdc1394:jar:2.2.3-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:libdc1394:2.2.3-${project.parent.version}, /home/pi/javacpp-presets/libdc1394/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:libfreenect:jar:0.5.2-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:libfreenect:0.5.2-${project.parent.version}, /home/pi/javacpp-presets/libfreenect/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:videoinput:jar:0.200-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:videoinput:0.200-${project.parent.version}, /home/pi/javacpp-presets/videoinput/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:artoolkitplus:jar:2.3.1-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:artoolkitplus:2.3.1-${project.parent.version}, /home/pi/javacpp-presets/artoolkitplus/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:flandmark:jar:1.07-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:flandmark:1.07-${project.parent.version}, /home/pi/javacpp-presets/flandmark/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:fftw:jar:3.3.4-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:fftw:3.3.4-${project.parent.version}, /home/pi/javacpp-presets/fftw/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:gsl:jar:1.16-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:gsl:1.16-${project.parent.version}, /home/pi/javacpp-presets/gsl/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:llvm:jar:3.6.0-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:llvm:3.6.0-${project.parent.version}, /home/pi/javacpp-presets/llvm/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:leptonica:jar:1.71-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:leptonica:1.71-${project.parent.version}, /home/pi/javacpp-presets/leptonica/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:tesseract:jar:3.03-rc1-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:tesseract:3.03-rc1-${project.parent.version}, /home/pi/javacpp-presets/tesseract/pom.xml, line 14, column 12
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.bytedeco.javacpp-presets:caffe:jar:master-0.11
[WARNING] 'version' contains an expression but should be a constant. @ org.bytedeco.javacpp-presets:caffe:master-${project.parent.version}, /home/pi/javacpp-presets/caffe/pom.xml, line 14, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] Inspecting build with total of 15 modules...
[INFO] Not installing Nexus Staging features:
[INFO]  * Preexisting staging related goal bindings found in 15 modules.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] JavaCPP Presets
[INFO] JavaCPP Presets for OpenCV
[INFO] JavaCPP Presets for FFmpeg
[INFO] JavaCPP Presets for FlyCapture
[INFO] JavaCPP Presets for libdc1394
[INFO] JavaCPP Presets for libfreenect
[INFO] JavaCPP Presets for videoInput
[INFO] JavaCPP Presets for ARToolKitPlus
[INFO] JavaCPP Presets for flandmark
[INFO] JavaCPP Presets for FFTW
[INFO] JavaCPP Presets for GSL
[INFO] JavaCPP Presets for LLVM
[INFO] JavaCPP Presets for Leptonica
[INFO] JavaCPP Presets for Tesseract
[INFO] JavaCPP Presets for Caffe
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaCPP Presets 0.11
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ javacpp-presets ---
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ javacpp-presets ---
[INFO] Installing /home/pi/javacpp-presets/pom.xml to /home/pi/.m2/repository/org/bytedeco/javacpp-presets/0.11/javacpp-presets-0.11.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaCPP Presets for OpenCV 2.4.11-0.11
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ opencv ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4:resources (generate-sources) @ opencv ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:compile (generate-sources) @ opencv ---
[INFO] Compiling 16 source files to /home/pi/javacpp-presets/opencv/target/classes
[INFO] 
[INFO] --- javacpp:0.11:build (generate-sources) @ opencv ---
[INFO] Executing JavaCPP Builder
[INFO] Targeting /home/pi/javacpp-presets/opencv/src/main/java/org/bytedeco/javacpp/opencv_calib3d.java
[ERROR] Failed to execute JavaCPP Builder: Could not parse "opencv2/core/types_c.h": File does not exist
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] JavaCPP Presets ................................... SUCCESS [4.844s]
[INFO] JavaCPP Presets for OpenCV ........................ FAILURE [25.519s]
[INFO] JavaCPP Presets for FFmpeg ........................ SKIPPED
[INFO] JavaCPP Presets for FlyCapture .................... SKIPPED
[INFO] JavaCPP Presets for libdc1394 ..................... SKIPPED
[INFO] JavaCPP Presets for libfreenect ................... SKIPPED
[INFO] JavaCPP Presets for videoInput .................... SKIPPED
[INFO] JavaCPP Presets for ARToolKitPlus ................. SKIPPED
[INFO] JavaCPP Presets for flandmark ..................... SKIPPED
[INFO] JavaCPP Presets for FFTW .......................... SKIPPED
[INFO] JavaCPP Presets for GSL ........................... SKIPPED
[INFO] JavaCPP Presets for LLVM .......................... SKIPPED
[INFO] JavaCPP Presets for Leptonica ..................... SKIPPED
[INFO] JavaCPP Presets for Tesseract ..................... SKIPPED
[INFO] JavaCPP Presets for Caffe ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.522s
[INFO] Finished at: Wed Apr 15 09:20:11 UTC 2015
[INFO] Final Memory: 9M/34M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.bytedeco:javacpp:0.11:build (generate-sources) on project opencv: Failed to execute JavaCPP Builder: Could not parse "opencv2/core/types_c.h": File does not exist -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :opencv

@saudet
Copy link
Member

saudet commented Apr 15, 2015

We're going to need to provide a linux-arm case in the cppbuild.sh script file. Is this something you would have some time to tackle? It would be very much appreciated.

@kriche
Copy link

kriche commented Apr 16, 2015

Yes, I'll take a look at cppbuild.sh and see what can I do.
Cheers

@Alessandruino
Copy link

Hei guys...same problem here... @saudet any solution? @martinstuder can you explain how you did to build manually?

thanks a lot...Ale

@saudet
Copy link
Member

saudet commented May 29, 2015

@Alessandruino We just need to modify the scripts to support the linux-arm platform, that's all.

@Alessandruino
Copy link

@saudet thanks for the fast reply... martinstuder was talking about a workaround using ccmake but i don't get how to use it to compile the files cause there is not a cmakelist file...sorry for the newbie questions...

@Alessandruino
Copy link

@saudet nevermind... i'll wait for the script fix :) thanks again

@saudet
Copy link
Member

saudet commented May 29, 2015

@Alessandruino Well, first, somebody has to do it. Would you be interested in giving it a try?

@Alessandruino
Copy link

Ya... I would be interested in learning by doing in this case... But I don t know where to start... I m pretty new to this... I opened the CPPbuild.sh file and we miss the Linux-arm platform specification... Don t know what to add...

@saudet
Copy link
Member

saudet commented May 30, 2015

Copy the entry for linux-x86 and figure out what we need to modify to have it compile. That's about it!

@Alessandruino
Copy link

Thanks for the pointer.. I m figuring how the script works first... And what it does... I built opencv for Linux-arm so I m replacing with the cmake I used in that case... Hope to make it worky ;)

@saudet
Copy link
Member

saudet commented May 31, 2015

Good! Keep me updated 👍

@Alessandruino
Copy link

@saudet finally i got opencv/cppbuild.sh script to work for linux-arm ! yay ! I forked the project, modified it and created a pull request... up to you the merging... if you want i can send you the javacv,javacpp,javacpp-presets/opencv bin files for linux-arm armv6 instructions (raspi) for 0.10 . Right Now i'm compiling for raspi2(armv7 instructions) for 0.10 too...

@saudet
Copy link
Member

saudet commented Jun 6, 2015

@Alessandruino Great news! If you could send a pull request for that on the master branch, I'll merge it in!

As for the binaries, I was thinking you could deploy them to the Maven Central. If you don't have an account with them already, check it out:
http://central.sonatype.org/pages/ossrh-guide.html
Then I think we need to contact the admins over there to add you to the group, so let me know your JIRA account name once you're done, and we'll try to contact them. If that sounds too complicated, let me know, but it would help a lot if you could. Thanks!

@IanHudsonNetpremacy
Copy link

@Alessandruino has linux-arm v6 & v7 build configuration made it to the master branch.

Kind regards,
Ian.

@saudet saudet changed the title Failed to execute JavaCPP Builder: Could not parse opencv2/core/types_c.h Raspberry Pi 2: Failed to execute JavaCPP Builder: Could not parse opencv2/core/types_c.h Jul 4, 2015
@saudet
Copy link
Member

saudet commented Sep 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants