OpenMW on Arch Linux ARM

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
rhioun
Posts: 3
Joined: 02 Jun 2016, 22:27

OpenMW on Arch Linux ARM

Post by rhioun »

Hello there forums!

I currently have been rather interested in the project, and have a Raspberry Pi 2 running Arch Linux ARM.
I have the VC4 driver enabled and it works perfectly, and have seen videos of tiny little raspberry pi's running OpenMW.
Unfortunately, I have seen none with Arch, and looking in your Downloads section, there is no ARM version for Arch..
Only for *shudder* Debian.
I never liked Debian, and it never liked me. I could never get the VC4 driver to work on Debian with the Raspberry Pi 2.
So, I ask you, "the team", developers, is there any Arch Linux ARM version?
Is there any way I can build one from source?

IS THERE ANY WAY?

Thanks, and please respond! :)
User avatar
johndh
Posts: 124
Joined: 25 Jan 2015, 18:20

Re: OpenMW on Arch Linux ARM

Post by johndh »

You should be able to build it from source. Here's how:
https://wiki.openmw.org/index.php?title ... ment_Setup

I've been a user of Debian derivatives pretty much exclusively, so hopefully someone else can help you with Arch-specific issues, but in general you have to 1.) get the dependencies, 2.) get the OpenMW source (https://github.com/OpenMW/openmw), and 3.) build it.

1.) I have no idea how this works on Arch, but on debian the dependencies are named as follows:

Code: Select all

libopenal-dev libsdl2-dev libqt4-dev libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libboost-system-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libbullet-dev libmygui-dev libunshield-dev cmake build-essential libqt4-opengl-dev libopenscenegraph-dev
2.) You can either download a snapshot of the source as a zip, or you can be a power user and download it with:

Code: Select all

git clone https://github.com/OpenMW/openmw.git <path-to-a-new-directory-here>
...where <path-to-a-new-directory-here> is wherever you want this to be cloned. If you leave it blank, it will default to "./openmw".

3.) From your source directory (~/openmw or wherever you cloned it), run...
mkdir build
cd build
cmake ../
make
If you want to install it system-wide, rather than it just living wherever you cloned it, replace "make" with "make install", running it as root (i.e. "sudo make install" on my system).

4.) Bonus step! If you used git to download the source, you can use git to easily update it. Every time you want to update it to a new revision, navigate to wherever you cloned the source to, and run "git pull", then run cmake and make again.
rhioun
Posts: 3
Joined: 02 Jun 2016, 22:27

Re: OpenMW on Arch Linux ARM

Post by rhioun »

darkbasic..

Read my post again. For Arch Linux ARM.

I've already tried the AUR, they don't have a version for armv7.

Everyone's heard of the AUR. Except that's for Arch x86_64 75% of the time.

Anyway, going to try out the better instructions posted above.
darkbasic
Posts: 153
Joined: 18 Apr 2016, 15:45
Contact:

Re: OpenMW on Arch Linux ARM

Post by darkbasic »

Of course you know about AUR, it was meant to be ironic... My suggestion was to simply patch around the AUR pkgbuild to make it compile on arm. There is no such a thing like an x86 only pkgbuild because you're compiling from sources, you simply need to figure out what's causing you troubles when compiling on arm.
rhioun
Posts: 3
Joined: 02 Jun 2016, 22:27

Re: OpenMW on Arch Linux ARM

Post by rhioun »

So very sorry, darkbasic.

The irony is clear upon reading your comment again. Anyway, I had just figured that out by talking to scrawl last night.
See - https://github.com/MyGUI/mygui/issues/112.

Thanks for the help though.
AshSlave
Posts: 25
Joined: 26 Sep 2012, 18:22

Re: OpenMW on Arch Linux ARM

Post by AshSlave »

I'd like to necro-bump this thread and ask for help with compiling too. I followed the github link and have pretty much the same result, except that I get different errors from both OSG from Arch Linux ARM repository and compiled from github.com/OpenMW/osg.git.
This is with OSG from repository:

Code: Select all

[  6%] Building CXX object components/CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp: In member function ‘void SceneUtil::LightStateAttribute::applyLight(GLenum, const osg::Light*) const’:
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:61:34: error: ‘GL_AMBIENT’ was not declared in this scope
             glLightfv( lightNum, GL_AMBIENT,               light->getAmbient().ptr() );
                                  ^~~~~~~~~~
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:61:86: error: ‘glLightfv’ was not declared in this scope
             glLightfv( lightNum, GL_AMBIENT,               light->getAmbient().ptr() );
                                                                                      ^
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:62:34: error: ‘GL_DIFFUSE’ was not declared in this scope
             glLightfv( lightNum, GL_DIFFUSE,               light->getDiffuse().ptr() );
                                  ^~~~~~~~~~
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:63:34: error: ‘GL_SPECULAR’ was not declared in this scope
             glLightfv( lightNum, GL_SPECULAR,              light->getSpecular().ptr() );
                                  ^~~~~~~~~~~
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:64:34: error: ‘GL_POSITION’ was not declared in this scope
             glLightfv( lightNum, GL_POSITION,              light->getPosition().ptr() );
                                  ^~~~~~~~~~~
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:70:34: error: ‘GL_CONSTANT_ATTENUATION’ was not declared in this scope
             glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  light->getConstantAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~~~
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:70:92: error: ‘glLightf’ was not declared in this scope
             glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  light->getConstantAttenuation() );
                                                                                            ^
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:71:34: error: ‘GL_LINEAR_ATTENUATION’ was not declared inthis scope
             glLightf ( lightNum, GL_LINEAR_ATTENUATION,    light->getLinearAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~
/home/sumire/builds/openmw-git/src/openmw/components/sceneutil/lightmanager.cpp:72:34: error: ‘GL_QUADRATIC_ATTENUATION’ was not declaredin this scope
             glLightf ( lightNum, GL_QUADRATIC_ATTENUATION, light->getQuadraticAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [components/CMakeFiles/components.dir/build.make:759: components/CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:444: components/CMakeFiles/components.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
And this is with scrawl's version of OSG:

Code: Select all

[  2%] Building CXX object extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/include/osg/GL:113,
                 from /usr/include/osg/GLDefines:25,
                 from /usr/include/osg/GLExtensions:18,
                 from /usr/include/osg/State:18,
                 from /usr/include/osg/GraphicsContext:17,
                 from /usr/include/osgViewer/GraphicsWindow:17,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt:19,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/glext.h:468:19: error: conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’
 typedef ptrdiff_t GLsizeiptr;
                   ^~~~~~~~~~
In file included from /usr/include/qt/QtGui/qopengl.h:99:0,
                 from /usr/include/qt/QtOpenGL/qgl.h:45,
                 from /usr/include/qt/QtOpenGL/QGLWidget:1,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GLES3/gl31.h:69:25: note: previous declaration as ‘typedef khronos_ssize_t GLsizeiptr’
 typedef khronos_ssize_t GLsizeiptr;
                         ^~~~~~~~~~
In file included from /usr/include/GL/gl.h:2055:0,
                 from /usr/include/osg/GL:113,
                 from /usr/include/osg/GLDefines:25,
                 from /usr/include/osg/GLExtensions:18,
                 from /usr/include/osg/State:18,
                 from /usr/include/osg/GraphicsContext:17,
                 from /usr/include/osgViewer/GraphicsWindow:17,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt:19,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GL/glext.h:469:19: error: conflicting declaration ‘typedef ptrdiff_t GLintptr’
 typedef ptrdiff_t GLintptr;
                   ^~~~~~~~
In file included from /usr/include/qt/QtGui/qopengl.h:99:0,
                 from /usr/include/qt/QtOpenGL/qgl.h:45,
                 from /usr/include/qt/QtOpenGL/QGLWidget:1,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt:17,
                 from /home/sumire/builds/openmw-git/src/openmw/extern/osgQt/GraphicsWindowQt.cpp:14:
/usr/include/GLES3/gl31.h:70:26: note: previous declaration as ‘typedef khronos_intptr_t GLintptr’
 typedef khronos_intptr_t GLintptr;
                          ^~~~~~~~
make[2]: *** [extern/osgQt/CMakeFiles/osgQt.dir/build.make:63: extern/osgQt/CMakeFiles/osgQt.dir/GraphicsWindowQt.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:356: extern/osgQt/CMakeFiles/osgQt.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
For some reason with compiled from source I get the error that rhioun got when used from repository. With my limited understanding it looks like in my case Qt is compiled against OpenGLES3, so they just switched places. Is this so? And if yes, should I also compile Qt?
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW on Arch Linux ARM

Post by psi29a »

Yeah, I hit that with Debian/Ubuntu. They compiled Qt on arm with libGLESv2 isntead of libGL, then they compiled OSG (osgQt) against the libGLESv2 Qt5, so that too must have been libGLESv2. I'll be honest, it doesn't work with OpenMW. OpenMW expects libGL.

Feel free to read my conversation about your problem here on the debian listserv/bug tracker:
https://bugs.debian.org/cgi-bin/bugrepo ... bug=838792
AshSlave
Posts: 25
Joined: 26 Sep 2012, 18:22

Re: OpenMW on Arch Linux ARM

Post by AshSlave »

So disabling openmw-cs should be enough? I probably wouldn't use it on RPi anyway, so I am okay with this solution. But how can I disable it? Sorry if it was already written and I just missed it.
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW on Arch Linux ARM

Post by psi29a »

using cmake, you can pass it flags like -DBUILD_OPENCS=NO

At that point osgQt will stop being a problem, but you might have to deal with the launcher that is also written in Qt. That would be -DBUILD_LAUNCHER=NO You might want to test with just the above first to see if that is enough.

So long as your OSG is compiled against libGL (gl.h) you'll be OK. The moment OSG is linked against anything else, it's game over.
Post Reply