Raspberry Pi 4

For new and upcoming OpenMW branches and ports; move fast and break things!
langest
Posts: 7
Joined: 28 Jul 2019, 21:34

Raspberry Pi 4

Post by langest » 29 Jul 2019, 19:01

I am planning to get a Raspberry Pi 4 as soon as they are back in stock and wanted to try to run OpenMW on it.
I saw that there were some attempts at running OpenMW on RPi3 here at the forum. Is there anyone who has tried it on the RPi4?
Also, is compiling pretty straight forward or should I expect lots of compatibility issues with the architecture?

Thanks

User avatar
psi29a
Posts: 4631
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Raspberry Pi 4

Post by psi29a » 30 Jul 2019, 09:22

Same as with the RPi2... nothing really has changed. You can run OpenMW on a RPi2 and above but you have to compile a few things yourself or re-use what is on our PPA to help along.

langest
Posts: 7
Joined: 28 Jul 2019, 21:34

Re: Raspberry Pi 4

Post by langest » 30 Jul 2019, 19:54

Great,

Thanks for the info.
I'll report back how it goes.

User avatar
lysol
Posts: 1325
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Raspberry Pi 4

Post by lysol » 05 Aug 2019, 13:22

Please do. Should be interesting to see the performance.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

langest
Posts: 7
Joined: 28 Jul 2019, 21:34

Re: Raspberry Pi 4

Post by langest » 23 Aug 2019, 18:19

I am trying to compile it now. I followed the regular Debian instructions since I am on latest Raspbian.
I ran into some errors that seemed like they would be solved by specifying -DBUILD_OPENCS=NO and -DBUILD_LAUNCHER=NO.
Found the solution here: viewtopic.php?t=3594
Such as:

Code: Select all

cmake .. -DBUILD_OPENCS=NO -DBUILD_LAUNCHER=NO
But I still get the same compile error. Any idea of what is wrong?
Following is my error:

Code: Select all

/home/pi/openmw/components/sceneutil/lightmanager.cpp: In member function ‘void SceneUtil::LightStateAttribute::applyLight(GLenum, const osg::Light*) const’:
/home/pi/openmw/components/sceneutil/lightmanager.cpp:78:34: error: ‘GL_AMBIENT’ was not declared in this scope
             glLightfv( lightNum, GL_AMBIENT,               light->getAmbient().ptr() );                                                                                                                         
                                  ^~~~~~~~~~                                                   
/home/pi/openmw/components/sceneutil/lightmanager.cpp:78:34: note: suggested alternative: ‘GL_APIENTRY’
             glLightfv( lightNum, GL_AMBIENT,               light->getAmbient().ptr() );                                                                                                                         
                                  ^~~~~~~~~~                                                   
                                  GL_APIENTRY             
/home/pi/openmw/components/sceneutil/lightmanager.cpp:78:13: error: ‘glLightfv’ was not declared in this scope
             glLightfv( lightNum, GL_AMBIENT,               light->getAmbient().ptr() );                                                                                                                         
             ^~~~~~~~~                                                                                                                                                                                           
/home/pi/openmw/components/sceneutil/lightmanager.cpp:78:13: note: suggested alternative: ‘mLights’
             glLightfv( lightNum, GL_AMBIENT,               light->getAmbient().ptr() );
             ^~~~~~~~~                                                                                  
             mLights                                                         
/home/pi/openmw/components/sceneutil/lightmanager.cpp:79:34: error: ‘GL_DIFFUSE’ was not declared in this scope
             glLightfv( lightNum, GL_DIFFUSE,               light->getDiffuse().ptr() );
                                  ^~~~~~~~~~                                                                                                                                                                     
/home/pi/openmw/components/sceneutil/lightmanager.cpp:79:34: note: suggested alternative: ‘GL_FALSE’
             glLightfv( lightNum, GL_DIFFUSE,               light->getDiffuse().ptr() );
                                  ^~~~~~~~~~                                                                                                                                                                     
                                  GL_FALSE                                   
/home/pi/openmw/components/sceneutil/lightmanager.cpp:80:34: error: ‘GL_SPECULAR’ was not declared in this scope
             glLightfv( lightNum, GL_SPECULAR,              light->getSpecular().ptr() );            
                                  ^~~~~~~~~~~                                
/home/pi/openmw/components/sceneutil/lightmanager.cpp:80:34: note: suggested alternative: ‘GL_APICALL’
             glLightfv( lightNum, GL_SPECULAR,              light->getSpecular().ptr() );
                                  ^~~~~~~~~~~                                                                                                                                                                    
                                  GL_APICALL                                 
/home/pi/openmw/components/sceneutil/lightmanager.cpp:81:34: error: ‘GL_POSITION’ was not declared in this scope
             glLightfv( lightNum, GL_POSITION,              light->getPosition().ptr() );              
                                  ^~~~~~~~~~~                                
/home/pi/openmw/components/sceneutil/lightmanager.cpp:81:34: note: suggested alternative: ‘GL_POLYGON’
             glLightfv( lightNum, GL_POSITION,              light->getPosition().ptr() );
                                  ^~~~~~~~~~~                                                            
                                  GL_POLYGON                                                                                                                                                                     
/home/pi/openmw/components/sceneutil/lightmanager.cpp:87:34: error: ‘GL_CONSTANT_ATTENUATION’ was not declared in this scope
             glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  light->getConstantAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:87:34: note: suggested alternative: ‘GL_CONSTANT_ALPHA’
             glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  light->getConstantAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~~~
                                  GL_CONSTANT_ALPHA
/home/pi/openmw/components/sceneutil/lightmanager.cpp:87:13: error: ‘glLightf’ was not declared in this scope
             glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  light->getConstantAttenuation() );
             ^~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:87:13: note: suggested alternative: ‘mLights’
             glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  light->getConstantAttenuation() );
             ^~~~~~~~
             mLights
/home/pi/openmw/components/sceneutil/lightmanager.cpp:88:34: error: ‘GL_LINEAR_ATTENUATION’ was not declared in this scope
             glLightf ( lightNum, GL_LINEAR_ATTENUATION,    light->getLinearAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:88:34: note: suggested alternative: ‘GL_BLEND_EQUATION’
             glLightf ( lightNum, GL_LINEAR_ATTENUATION,    light->getLinearAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~
                                  GL_BLEND_EQUATION
/home/pi/openmw/components/sceneutil/lightmanager.cpp:89:34: error: ‘GL_QUADRATIC_ATTENUATION’ was not declared in this scope
             glLightf ( lightNum, GL_QUADRATIC_ATTENUATION, light->getQuadraticAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:89:34: note: suggested alternative: ‘GL_INVALID_OPERATION’
             glLightf ( lightNum, GL_QUADRATIC_ATTENUATION, light->getQuadraticAttenuation() );
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
                                  GL_INVALID_OPERATION
/home/pi/openmw/components/sceneutil/lightmanager.cpp: In member function ‘virtual void SceneUtil::DisableLight::apply(osg::State&) const’:
/home/pi/openmw/components/sceneutil/lightmanager.cpp:324:34: error: ‘GL_AMBIENT’ was not declared in this scope
             glLightfv( lightNum, GL_AMBIENT,               mnullptr.ptr() );
                                  ^~~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:324:34: note: suggested alternative: ‘GL_APIENTRY’
             glLightfv( lightNum, GL_AMBIENT,               mnullptr.ptr() );
                                  ^~~~~~~~~~
                                  GL_APIENTRY
/home/pi/openmw/components/sceneutil/lightmanager.cpp:324:13: error: ‘glLightfv’ was not declared in this scope
             glLightfv( lightNum, GL_AMBIENT,               mnullptr.ptr() );
             ^~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:325:34: error: ‘GL_DIFFUSE’ was not declared in this scope
             glLightfv( lightNum, GL_DIFFUSE,               mnullptr.ptr() );
                                  ^~~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:325:34: note: suggested alternative: ‘GL_FALSE’
             glLightfv( lightNum, GL_DIFFUSE,               mnullptr.ptr() );
                                  ^~~~~~~~~~
                                  GL_FALSE
/home/pi/openmw/components/sceneutil/lightmanager.cpp:326:34: error: ‘GL_SPECULAR’ was not declared in this scope
             glLightfv( lightNum, GL_SPECULAR,              mnullptr.ptr() );
                                  ^~~~~~~~~~~
/home/pi/openmw/components/sceneutil/lightmanager.cpp:326:34: note: suggested alternative: ‘GL_APICALL’
             glLightfv( lightNum, GL_SPECULAR,              mnullptr.ptr() );
                                  ^~~~~~~~~~~
                                  GL_APICALL
Thanks

langest
Posts: 7
Joined: 28 Jul 2019, 21:34

Re: Raspberry Pi 4

Post by langest » 23 Aug 2019, 20:10

psi29a wrote:
30 Jul 2019, 09:22
you have to compile a few things yourself or re-use what is on our PPA to help along
How can I check what these things are?

User avatar
AnyOldName3
Posts: 1553
Joined: 26 Nov 2015, 03:25

Re: Raspberry Pi 4

Post by AnyOldName3 » 23 Aug 2019, 22:49

I doubt very much anyone has ever resolved that issue by disabling the launcher or the CS. I'm pretty sure you've got something wrong with your OpenGL includes. The most likely culpret is that you've built OSG against GLES instead of regular OpenGL.
AnyOldName3, Master of Shadows

langest
Posts: 7
Joined: 28 Jul 2019, 21:34

Re: Raspberry Pi 4

Post by langest » 24 Aug 2019, 11:34

Ok, thanks.
I managed to dig this post up: viewtopic.php?t=5579&p=60030#p60030
It seems very relevant to what I need to do. I'll get back with my new results/problems.

langest
Posts: 7
Joined: 28 Jul 2019, 21:34

Re: Raspberry Pi 4

Post by langest » 24 Aug 2019, 13:22

I managed to get further after building osg from scratch.

I got the following error and decided to try to enable permissive flag to see if it would work anyway.

Code: Select all

/home/pi/repos/openmw/apps/openmw/mwrender/sky.cpp: In member function ‘osg::ref_ptr<osg::OcclusionQueryNode> MWRender::Sun::createOcclusionQueryNode(osg::Group*, bool)’:                                        
/home/pi/repos/openmw/apps/openmw/mwrender/sky.cpp:565:69: error: passing ‘const osg::QueryGeometry’ as ‘this’ argument discards qualifiers [-fpermissive]                                                        
         oqn->getQueryGeometry()->setDataVariance(osg::Object::STATIC);                                                                                                                                           
                                                                     ^                                                                                                                                            
In file included from /usr/local/include/osg/UniformBase:15,                                                                                                                                                      
                 from /usr/local/include/osg/Uniform:22,                                                                                                                                                          
                 from /home/pi/repos/openmw/apps/openmw/mwrender/sky.hpp:10,                                                                                                                                      
                 from /home/pi/repos/openmw/apps/openmw/mwrender/sky.cpp:1:                                                                                                                                       
/usr/local/include/osg/Object:236:21: note:   in call to ‘void osg::Object::setDataVariance(osg::Object::DataVariance)’                                                                                           
         inline void setDataVariance(DataVariance dv) { _dataVariance = dv; }                                                                                                                                     
                     ^~~~~~~~~~~~~~~                                                                                                                                                                   
/home/pi/repos/openmw/apps/openmw/mwrender/sky.cpp:570:57: error: invalid conversion from ‘const osg::Geometry*’ to ‘osg::Geometry*’ [-fpermissive]                                                               
         osg::Geometry* queryGeom = oqn->getQueryGeometry();                                                                                                                                              
                                    ~~~~~~~~~~~~~~~~~~~~~^~ 
Adding the permissive flag let me compile everything without errors. But now it is failing during the linking.

Code: Select all

Linking CXX executable ../../openmw
/usr/bin/ld: ../../components/libcomponents.a(navmeshtilescache.cpp.o): undefined reference to symbol '[email protected]@LIBATOMIC_1.0'
/usr/bin/ld: //usr/lib/arm-linux-gnueabihf/libatomic.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Any idea how I can fix this?
I have installed the dependencies lister for Debian here: https://wiki.openmw.org/index.php?title ... pendencies, except libopenscenegraph-3.4-dev.

User avatar
Capostrophic
Posts: 660
Joined: 22 Feb 2016, 20:32

Re: Raspberry Pi 4

Post by Capostrophic » 24 Aug 2019, 14:48

You're using upstream master OSG. Don't. Use OpenSceneGraph-3.6 branch or OpenMW/osg 3.4 branch (fork of 3.4.1) or the official 3.4.1 stable release..

Post Reply