OpenMW Arch Linux ARM Build

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
wooty
Posts: 8
Joined: 09 May 2018, 03:29
Location: [email protected]
Contact:

OpenMW Arch Linux ARM Build

Post by wooty »

As much as I want to open with how much I respect this project and my excitement that OpenMW won an Open Source GotY award... (Seriously, congrats to every member who even put an hour in!) Let's jump into the build issues!

I have managed to get OpenMW installed onto an Asus C201PA (armv7-Arch 5.6.2-1-mainline, 2GB RAM, SD Root, Mali-T628 w/Panfrost Kernel Drivers + veyron_firmware), but am running into some last-minute issues that I hope someone with the background can enlighten me on. This is the procedure I used in order to get to this point:

NOTE: Install all dependencies needed as I encounter them throughout the 'make'/'configure' processes. Googling "Arch package <dependency name>" helped A LOT!

1. Build Ogre (Using Ninja as the Compiler when asked)
1a. Download source into ~/ogre-master (if extracting .zip/.tar from github)
1b. Run 'cmake-gui', set source to ~/ogre-master and build to ~/ogre-master/build
1c. Press "Configure"
1d. Set options as needed in main window with 'compiler flags';
GL=disabled
GLES2=enabled
USE_EGL=enabled
1e. Press "Configure" again. If red disappears from main window, press "Generate". Otherwise install dependencies.
1f. cd to ~/ogre-master and run "sudo ninja -C build/ install"
2. Build MyGUI (Using Ninja as the Compiler when asked)
2a. Download source into ~/mygui-master (if extracting .zip/.tar from github)
2b. Run "cmake-gui", set source to ~/mygui-master and build to ~/mygui-master/build
2c. Press "Configure"
2d. Set options as needed in main window with 'compiler flags';
BUILD_TOOLS=enabled
RENDER_SYSTEM=3 (dummy)
2e. Press "Configure" again. If red disappears from main window, press "Generate". Otherwise install dependencies.
2f. cd to ~/mygui-master and run "sudo ninja -C build/ install"
3. Build OpenMw (Using Ninja as the Compiler when asked)
2a. Download source into ~/openmw (if extracting .zip/.tar from github)
2b. Run 'cmake-gui', set source to ~/openmw and build to ~/openmw/build
2c. Press "Configure"
2d. Set options as needed in main window with 'compiler flags';
QT_VERSION=5
(Keep rest of defaults)
2e. Press "Configure" again. If red disappears from main window, press "Generate". Otherwise install dependencies.
2f. cd to ~/openmw and run "sudo ninja -C build/ install"

Once I completed these steps, I was able to get all of the OpenMW executibles loaded on my system. I have been enjoying my free time during this pandemic however I have been a bit intoxicated all day so I wish I could provide further input on dependencies as this has been a very long and educational experience on porting! I have loaded the OpenMW launcher and installed the data files needed to run. When launching, I get the game window however it is transparent and captures my desktop background. After a few moments it freezes.

Here is the error log that I am receiving, apologies on length as this is an error I cannot seem to diagnose myself: https://pastebin.com/6egTtcn9

As far as building what is needed (after reviewing all other threads on this topic on the forums), I mainly searched the Arch package website or Google'd for the missing dependencies. Most of the time I found it was a Debian package not available on Arch, but was able to find the appropriate package equivalent by searching this way. I may have removed one or two dependencies as I built Ogre and MyGUI that I just could not get working on ArchARM, including switching to Qt5 over Qt4. (Qt4 had build errors compiling 'openssl' and 'cups' dependencies)

I feel like I am so close, just not sure if there is something I may have to rebuild or if there's another issue afoot. Hope someone can provide some feedback to nudge me in the right direction, as I am willing to continue until I have SOMETHING rendering. Thanks.

[P.S. to N00b's like myself: Instead of cross-compiling, if building on a device with limited RAM like the 2GB available on the ASUS C201 Veyron, I built a 4GB Swap File that seemed to help a little bit. However, the PC did lock up and crash plenty of times. I just restarted my machine and continued, as the build process picked up where it left off and eventually after tackling the bottle and my power button several times I was presented with the OpenMW Install Wizard. [Hope this isn't also part of the reason this failed! xD]]
User avatar
AnyOldName3
Posts: 2674
Joined: 26 Nov 2015, 03:25

Re: OpenMW Arch Linux ARM Build

Post by AnyOldName3 »

We've not used OGRE for about five years, so that's why you managed to get anything at all done without it. MyGUI is still necessary, though. The cause of the crash isn't immediately obvious to me, but one thing to check is whether your GPU supports desktop OpenGL - we don't natively support GLES, and lots of ARM chips only do GLES, so it's possible you've built OSG to only target GLES and that's why things caught fire. You can look into workarounds in threads related to Android and desktop ARM systems like the Raspberry Pi.
wooty
Posts: 8
Joined: 09 May 2018, 03:29
Location: [email protected]
Contact:

Re: OpenMW Arch Linux ARM Build

Post by wooty »

As far as OGRE goes I think I needed it to build MyGUI, but rn this isnspeculation on my part and I will try to tackle a recompile without it. AFAIK my GPu chipset only officially supports up to OpenGLESv2, and ai did leave the GL/GLX flags off, in my mind to avoid issues.. My basic understanding is that GLESv2 may work with older Desktop GL versions, however I again need to do some research if it comes to this. Will check out the Pi and Android support and see if I find any clues there, thanks for the info!
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW Arch Linux ARM Build

Post by psi29a »

You're reimplimenting the wheel of people who have done this years before. On a RPi, you have to compile OSG with desktop GL, not with GLES as OpenMW doesn't work with GLES. Doesn't so will give you a broken OpenMW.

GLES is a subset of OpenGL specific for embedded devices, but purely driver/module. The VC4 in the RPi supports OpenGL up to 2.1 with a few extra flags here and there. That is why the FOSS kernel module from Eric was able to support OpenGL and GLES while the binary blob (closed source) just supported GLES... which leads people to believe that hardware devices only support GLES and are incapable of regular OpenGL. Anyway... I hope that helps.

You can can compile MyGUI without Ogre, so bypassing that step alltogether. OpenMW just needs MyGUI as compiled against OpenGL.

After that, you should be good to go. So TLDR; no Ogre and no GLES.
If you are stuck with just GLES... then perhaps a wrapper might work that translates OpenGL calls to GLES? That is how OpenMW on android works.
Time4Tea
Posts: 110
Joined: 01 Jan 2020, 00:27

Re: OpenMW Arch Linux ARM Build

Post by Time4Tea »

@wooty: this is a bit off-topic, but - the panfrost kernel module works on your Chromebook? I also have a Chromebook that I am running Linux on, but I was getting a lot of stability issues with panfrost causing X11 to crash, so I had to disable it. Are you aware of a guide anywhere, or did you have to do anything special to get it to work?

(might be best to continue this as a private discussion?)
wooty
Posts: 8
Joined: 09 May 2018, 03:29
Location: [email protected]
Contact:

Re: OpenMW Arch Linux ARM Build

Post by wooty »

@psi29a: Ah, thanks for even more clarification, I am learning as I go and making assumptions along the way so this gives me more to try now. I did end up recompiling MyGUI with 'OpenGL' (tried Ogre, GLES2, dummy). After looking at the console output I was getting the texture decompression error so ran with "OPENMW_DECOMPRESS_TEXTURES=1 openmw". All I am getting now seems to be an error in the console crashing on loading the '.bik' videos. Think this is ffmpeg throwing a code:

Input #0, bink, from 'video\bethesda logo.bik':
Duration: 00:00:16.00, start: 0.000000, bitrate: 2324 kb/s
Stream #0:0[0x0]: Video: binkvideo (BIKi / 0x694B4942), yuv420p(tv), 640x480, 30.06 fps, 30.06 tbr, 30.06 tbn, 30.06 tbc
Stream #0:1[0x0]: Audio: binkaudio_rdft, 44100 Hz, stereo, flt
[swscaler @ 0x94971790] No accelerated colorspace conversion found from yuv420p to rgba.

*** Fatal Error ***
Invalid address alignment (signal 7)
Address: 0x93cd3008

Anyways, I feel more confident moving forward and tested both GL and GLES2 modes under 'gmark2' and I can at least confirm that part is working. If there's a way to bypass the .bik video or something else I am open to suggestions. Otherwise will report back after I rebuild these with an up-to-date method following the Pi guides. Thanks again.

@Time4Tea: Feel free to send me an email, don't want to derail this thread but more than happy to help! I actually just spent a good 30 hours last week building ChromiumOS and installing Arch side-by-side. Only thing I don't have working is the audio.. :x
User avatar
AnyOldName3
Posts: 2674
Joined: 26 Nov 2015, 03:25

Re: OpenMW Arch Linux ARM Build

Post by AnyOldName3 »

I think the warning about the video isn't related to the error - it could just be telling you that it's decoding it in software instead of on the GPU.
Time4Tea
Posts: 110
Joined: 01 Jan 2020, 00:27

Re: OpenMW Arch Linux ARM Build

Post by Time4Tea »

I updated my Linux kernel version and the panfrost driver now seems more stable, so I tried compiling OpenMW on my Chromebook, as I'm curious to see how it performs.

For OSG, I ran into some compilation errors towards the end with a 'RestHttp' plugin that wasn't able to find some functions related to 'asio'. So, I disabled that plugin, as it didn't seem like something OpenMW would need, and then it built fine. MyGUI built ok when I chose OpenGL for rendering. I had to also install the sdl2_image package, which it needed but wasn't listed as a dependency in the PKGBUILD file. Once those two were in place, OpenMW built fine.

I am getting the same error as the OP, when I try to load the game. I used the setting in the launcher to skip the opening menu and just load a default character in a random cell, which works. So, it seems like it is an issue with the intro video. I also tried

openmw --skip-menu --new-game

from the terminal and that also failed with a similar video error (I believe there is another opening video at the start on the prison ship). So, it seems there is an issue with 'colorspace conversion' for those videos?

I also had to use that texture decompression option, so my random character wasn't walking through a pink candyfloss land. However, I am seeing some issues with some of the textures not having proper transparency and the sky looking quite red (I will try to post a screenshot). On the profiler, the FPS seemed quite low (even with minimal settings), around 10-15, although the game seems smoother than I would expect with that. So, perhaps the profiler isn't reporting an accurate number? There is also no bar for 'gpu' and quite a big gap between the 'cull' and 'draw' bars, so I'm not 100% sure if the GPU is actually being used.
Time4Tea
Posts: 110
Joined: 01 Jan 2020, 00:27

Re: OpenMW Arch Linux ARM Build

Post by Time4Tea »

Screenshot:

Image

You can see there seem to be issues with some textures (mostly on trees/plants), but not others. The red sky looks quite cool, actually :D

(sorry for the issues with the screenshots. Hopefully I have it sorted now ..)
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW Arch Linux ARM Build

Post by psi29a »

Looks like you are just using the CPU and not your GPU.

I can get 25fps outside with a RPi2 @ 1080p
Post Reply