1

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:

  1. Am I interpreting these error messages correctly?
  2. 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.

Community
  • 1
  • 1
goldbear
  • 11
  • 2
  • It seems you are interpreting it correctly. You can vote for the 32-bit compiler on OpenShift here (https://openshift.uservoice.com/forums/258655-ideas/suggestions/6291494-ability-to-compile-32bit-binaries-via-gcc-g). – Jiri Fiala Nov 26 '15 at 10:05
  • @JiriFiala Thanks for the reply. I wasn't aware you could vote for new features, so I'll definitely do that. Do you happen to know if using a custom configuration (instead of the JBoss cartridge) is something worth pursuing, or is the lack of 32-bit compiler support present throughout OpenShift? – goldbear Nov 30 '15 at 18:19
  • The situation would be the same with any other application created on OpenShift Online, the stubs-32.h (i.e. glibc-devel.i686) would be missing, so it's not worth pursuing that idea at the moment. But I have also some good news for you; things are already in motion, it's likely the 32bit compiler support will be added this moth. – Jiri Fiala Dec 02 '15 at 09:07
  • Ah, that is good news! Thanks again for your help @JiriFiala. – goldbear Dec 07 '15 at 19:15

0 Answers0