Failing to compile OpenMW on ARM

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
bably
Posts: 9
Joined: 24 May 2019, 22:42

Failing to compile OpenMW on ARM

Post by bably »

Hi everyone :)

I've been trying to run openmw on my ARM laptop these past few days.
It's an ARMV7L, running Ubuntu 16.04.6 in a chromebook, using crouton.

I cloned the repo a few hours ago, the last commit that shows up w/ git log is: Merge branch '2' into 'master' (e0fb411fc80f50d32fd98dcbef5c8974b1b25af7)

I managed to get all the dependencies and get past the config part, the cmake log shows the following text:

Code: Select all

-- Configuring OpenMW...
-- Using Qt4
-- Found FFmpeg_AVCODEC 57.64.101
-- Found FFmpeg_AVFORMAT 57.56.101
-- Found FFmpeg_AVUTIL 55.34.101
-- Found FFmpeg_SWSCALE 4.2.100
-- Found FFmpeg_SWRESAMPLE 2.3.100
-- Found LIBUNSHIELD
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   program_options
--   iostreams
--   regex
-- Found MyGUI 3.2.2
-- Found SDL2 2.0.4
-- Found Bullet_BulletCollision
-- Found Bullet_LinearMath
-- Configuring done
-- Generating done
-- Build files have been written to: /home/blupiac/openmw/build
However, when I run the "make" command, I get the following error:

Code: Select all

Scanning dependencies of target osg-ffmpeg-videoplayer
[  0%] Building CXX object extern/osg-ffmpeg-videoplayer/CMakeFiles/osg-ffmpeg-videoplayer.dir/videoplayer.cpp.o
[  0%] Building CXX object extern/osg-ffmpeg-videoplayer/CMakeFiles/osg-ffmpeg-videoplayer.dir/videostate.cpp.o
[  0%] Building CXX object extern/osg-ffmpeg-videoplayer/CMakeFiles/osg-ffmpeg-videoplayer.dir/audiodecoder.cpp.o
[  0%] Linking CXX static library libosg-ffmpeg-videoplayer.a
[  0%] Built target osg-ffmpeg-videoplayer
Scanning dependencies of target local_tinyxml
[  0%] Building CXX object extern/oics/CMakeFiles/local_tinyxml.dir/tinyxml.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/local_tinyxml.dir/tinyxmlparser.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/local_tinyxml.dir/tinyxmlerror.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/local_tinyxml.dir/tinystr.cpp.o
[  0%] Linking CXX static library liblocal_tinyxml.a
[  0%] Built target local_tinyxml
Scanning dependencies of target oics
[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSChannel.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSControl.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSInputControlSystem.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSInputControlSystem_keyboard.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSInputControlSystem_mouse.cpp.o
[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSInputControlSystem_joystick.cpp.o
[  0%] Linking CXX static library liboics.a
[  0%] Built target oics
Scanning dependencies of target osgQt
[  0%] Building CXX object extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o
In file included from /usr/include/qt4/QtOpenGL/qgl.h:79:0,
                 from /usr/include/qt4/QtOpenGL/QGLWidget:1,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:23,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GLES2/gl2.h:75:25: error: conflicting declaration 'typedef khronos_ssize_t GLsizeiptr'
 typedef khronos_ssize_t GLsizeiptr;
                         ^
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/local/include/osg/GL:114,
                 from /usr/local/include/osg/GLDefines:25,
                 from /usr/local/include/osg/GLExtensions:18,
                 from /usr/local/include/osg/State:18,
                 from /usr/local/include/osg/GraphicsContext:17,
                 from /usr/local/include/osgViewer/GraphicsWindow:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/glext.h:468:19: note: previous declaration as 'typedef ptrdiff_t GLsizeiptr'
 typedef ptrdiff_t GLsizeiptr;
                   ^
In file included from /usr/include/qt4/QtOpenGL/qgl.h:79:0,
                 from /usr/include/qt4/QtOpenGL/QGLWidget:1,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:23,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GLES2/gl2.h:76:26: error: conflicting declaration 'typedef khronos_intptr_t GLintptr'
 typedef khronos_intptr_t GLintptr;
                          ^
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/local/include/osg/GL:114,
                 from /usr/local/include/osg/GLDefines:25,
                 from /usr/local/include/osg/GLExtensions:18,
                 from /usr/local/include/osg/State:18,
                 from /usr/local/include/osg/GraphicsContext:17,
                 from /usr/local/include/osgViewer/GraphicsWindow:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/glext.h:469:19: note: previous declaration as 'typedef ptrdiff_t GLintptr'
 typedef ptrdiff_t GLintptr;
                   ^
In file included from /usr/include/qt4/QtOpenGL/QGLWidget:1:0,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:23,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/qt4/QtOpenGL/qgl.h:85:17: error: conflicting declaration 'typedef GLfloat GLdouble'
 typedef GLfloat GLdouble;
                 ^
In file included from /usr/local/include/osg/GL:114:0,
                 from /usr/local/include/osg/GLDefines:25,
                 from /usr/local/include/osg/GLExtensions:18,
                 from /usr/local/include/osg/State:18,
                 from /usr/local/include/osg/GraphicsContext:17,
                 from /usr/local/include/osgViewer/GraphicsWindow:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/gl.h:134:17: note: previous declaration as 'typedef double GLdouble'
 typedef double  GLdouble; /* double precision float */
                 ^
extern/osgQt/CMakeFiles/osgQt.dir/build.make:62: recipe for target 'extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o' failed
make[2]: *** [extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o] Error 1
CMakeFiles/Makefile2:637: recipe for target 'extern/osgQt/CMakeFiles/osgQt.dir/all' failed
make[1]: *** [extern/osgQt/CMakeFiles/osgQt.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
If it helps anyone, I've found a very similar error from this 2016 bug report:
https://bugs.debian.org/cgi-bin/bugrepo ... bug=838792

Should I try to compile another release from the repo?
Any help would be greatly appreciated!

Disclaimer: I'm very new to the concept of building my own programs, so I hope I didn't leave out any important info
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Failing to compile OpenMW on ARM

Post by AnyOldName3 »

We're likely to totally abandon Qt4 support as soon as we get around to making the necessary changes, so I'd start by upgrading to Qt5 and seeing if that fixes anything.
bably
Posts: 9
Joined: 24 May 2019, 22:42

Re: Failing to compile OpenMW on ARM

Post by bably »

Hey AnyOldName3,

So, I've purged Qt4 and installed Qt5, but the cmake step now tells me I need Qt4 instead of Qt5...
I get the following output:

Code: Select all

-- Configuring OpenMW...
-- Using Qt4
CMake Error at /usr/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message):
  Found unsuitable Qt version "5.5.1" from /usr/bin/qmake, this code requires
  Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:157 (find_package)


-- Configuring incomplete, errors occurred!
Any ideas?
User avatar
MiroslavR
Posts: 156
Joined: 12 Feb 2014, 17:45

Re: Failing to compile OpenMW on ARM

Post by MiroslavR »

Run cmake with:

Code: Select all

-DDESIRED_QT_VERSION=5
bably
Posts: 9
Joined: 24 May 2019, 22:42

Re: Failing to compile OpenMW on ARM

Post by bably »

Thanks Miroslav, I was able to get pas the cmake step with that argument.

However, I'm still stuck at the same point once I run make, with a slightly different message:

Code: Select all

[  0%] Built target osg-ffmpeg-videoplayer
[  0%] Built target local_tinyxml
[  0%] Built target oics
[  0%] Building CXX object extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:95:0,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/qgl.h:39,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/QGLWidget:1,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:23,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GLES3/gl31.h:77:25: error: conflicting declaration 'typedef khronos_ssize_t GLsizeiptr'
 typedef khronos_ssize_t GLsizeiptr;
                         ^
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/local/include/osg/GL:114,
                 from /usr/local/include/osg/GLDefines:25,
                 from /usr/local/include/osg/GLExtensions:18,
                 from /usr/local/include/osg/State:18,
                 from /usr/local/include/osg/GraphicsContext:17,
                 from /usr/local/include/osgViewer/GraphicsWindow:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/glext.h:468:19: note: previous declaration as 'typedef ptrdiff_t GLsizeiptr'
 typedef ptrdiff_t GLsizeiptr;
                   ^
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:95:0,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/qgl.h:39,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL/QGLWidget:1,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:23,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GLES3/gl31.h:78:26: error: conflicting declaration 'typedef khronos_intptr_t GLintptr'
 typedef khronos_intptr_t GLintptr;
                          ^
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/local/include/osg/GL:114,
                 from /usr/local/include/osg/GLDefines:25,
                 from /usr/local/include/osg/GLExtensions:18,
                 from /usr/local/include/osg/State:18,
                 from /usr/local/include/osg/GraphicsContext:17,
                 from /usr/local/include/osgViewer/GraphicsWindow:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/blupiac/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/glext.h:469:19: note: previous declaration as 'typedef ptrdiff_t GLintptr'
 typedef ptrdiff_t GLintptr;
                   ^
extern/osgQt/CMakeFiles/osgQt.dir/build.make:62: recipe for target 'extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o' failed
make[2]: *** [extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o] Error 1
CMakeFiles/Makefile2:637: recipe for target 'extern/osgQt/CMakeFiles/osgQt.dir/all' failed
make[1]: *** [extern/osgQt/CMakeFiles/osgQt.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
Edit: typo
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Failing to compile OpenMW on ARM

Post by AnyOldName3 »

Are you maybe mixing up a GLES GL.h and a regular OpenGL build of OSG/Qt or vice versa?
bably
Posts: 9
Joined: 24 May 2019, 22:42

Re: Failing to compile OpenMW on ARM

Post by bably »

I don't remember messing around with OpenGL or OpenGLES, but it could be.
Is there any way to check if this is the case?

I'm no expert, but it looks like Qt has its own version of OpenGL (qopengl), which is clashing with the one used by OSG.

I'll try with a fresh crouton install in the meanwhile.
Update: having the same error with a fresh install
bably
Posts: 9
Joined: 24 May 2019, 22:42

Re: Failing to compile OpenMW on ARM

Post by bably »

By digging around some more, I think that this is actually a bug within OpenGL and not OpenMW...
From what I understood from the last link, it looks like this bug was fixed in Mesa 18.2.5, but mine is still 18.0.5 (is there a way to update this?).

https://github.com/KhronosGroup/OpenGL- ... issues/162
https://bugs.freedesktop.org/show_bug.cgi?id=105328
https://marc.info/?l=mesa3d-dev&m=154219246303000&w=2

I'll try the workarounds they listed tomorrow, with my fingers crossed.
bably
Posts: 9
Joined: 24 May 2019, 22:42

Re: Failing to compile OpenMW on ARM

Post by bably »

So, I've dedicated some time to this today, and got a bit ahead in the process.
I found out I could get a new version of the mesa drivers if I updated my chroot from Ubuntu 16 to 18, and that's what I did.
This allowed me to get the mesa drivers versions 18.2.8, where the bug I was having had already been fixed.

With this, I was able to compile openmw correctly (yay!), using Qt5 (Qt4 still gave me a similar error).
I now have another problem, but it's a crash happening when I launch the game, so I figure I should make another thread about it.
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Failing to compile OpenMW on ARM

Post by AnyOldName3 »

Did you definitely recompile everything and make sure all your packages were compatible with the updated Mesa? It's possible some old stuff was still hanging around.
Post Reply