I’m trying to get a Java web app running on a large Tomcat 7 (JBossEWS 2.0) gear on OpenShift. The app makes use of the OpenCV computer vision library, accessed via wrappers provided by the JavaCV project.
I’ve managed to build OpenCV on our gear (following this tutorial) but am now running into a couple of problems:
When trying to load the OpenCV library, I get the following error:
libopencv_core.so.2.4.10: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
After some googling, it looks like I’ve built a 64-bit version of the OpenCV library, but that OpenShift gears run 32-bit Java.
I then tried building a 32-bit version of OpenCV, but ran into another issue when compiling:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
After some more googling, it looks like OpenShift gears might be missing a file that the compiler needs to run in 32-bit mode.
So, a couple of questions:
- Am I interpreting these error messages correctly?
- Assuming I’m understanding the underlying issue correctly, is there a way build the OpenCV library in 32-bit mode on our gear, or does this mean it won’t be possible to launch our app on OpenShift?
I’m pretty new to Java web development and OpenShift, so apologies if I’m missing something straightforward here. Thanks in advance.