opendf icon indicating copy to clipboard operation
opendf copied to clipboard

CMake error: graphicswindow.cpp

Open y4my4my4m opened this issue 5 years ago • 7 comments

I've installed the dependencies and am met with this error when trying to build:

→ make                                                                                                                                                                                               [1c5266b]
[ 10%] Built target bsatool
Scanning dependencies of target opendf
[ 12%] Building CXX object CMakeFiles/opendf.dir/src/components/sdlutil/graphicswindow.cpp.o
/home/y4my4m/Dev/opendf/src/components/sdlutil/graphicswindow.cpp: In function ‘void SDLUtil::graphicswindow_SDL2()’:
/home/y4my4m/Dev/opendf/src/components/sdlutil/graphicswindow.cpp:312:27: error: ‘setWindowingSystemInterface’ is not a member of ‘osg::GraphicsContext’
  312 |     osg::GraphicsContext::setWindowingSystemInterface(new SDL2WindowingSystemInterface);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/opendf.dir/build.make:83: CMakeFiles/opendf.dir/src/components/sdlutil/graphicswindow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/opendf.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

image

Any advice?

I'm using arch linux. The dependencies/gcc are all recent/latest versions.

y4my4my4m avatar Jun 18 '20 15:06 y4my4my4m

Seems that this is no longer how things are done with OSG 3.4/3.6 (I can reproduce this error with OSG 3.6)

psi29a avatar Jun 18 '20 21:06 psi29a

@psi29a I've tried to manually build OSG 3.2 but alas...seems like it coincidentally has a build problem specifically on arch linux.

Let me know if there's an easy fix for OSG 3.6. I'd love to try this out.

y4my4my4m avatar Jun 25 '20 01:06 y4my4my4m

Sadly no quick fix that I found. Even OpenMW does things slightly different here.

psi29a avatar Jun 25 '20 08:06 psi29a

@psi29a I'm not too sure how I did it but I got it to build on OSG3.6 image

I deleted MYGUI_DBG_BREAK; from src/components/mygui_sg/diagnostic.h and it seems to have helped.

image

This is hacky, but figured I'd leave it as a comment in case someone stumble upon this issue later on...

y4my4my4m avatar Jun 25 '20 22:06 y4my4my4m

You must have done something else, as doing that for me doesn't change this:

/home/psi29a/workspace/opendf/src/components/sdlutil/graphicswindow.cpp: In function ‘void SDLUtil::graphicswindow_SDL2()’:
/home/psi29a/workspace/opendf/src/components/sdlutil/graphicswindow.cpp:312:27: error: ‘setWindowingSystemInterface’ is not a member of ‘osg::GraphicsContext’
     osg::GraphicsContext::setWindowingSystemInterface(new SDL2WindowingSystemInterface);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Are you sure it is OSG 3.6 and not 3.2 or 3.4 ?

psi29a avatar Jun 26 '20 11:06 psi29a

@psi29a yes, the difference that I can see is that I did try to build 3.2 manually from cloning the source code on the branch 3.2... (git clone --branch OpenSceneGraph-3.2.3 https://github.com/openscenegraph/OpenSceneGraph.git)

but I never made it past make (couldnt get to make install as make would flood with errors around 30% in) so it would make no sense this helped...right? Unless it installed some dependencies without me noticing?

3.6 was completely uninstalled at this point, after 3.2.3 failing, I reinstalled 3.6 using pacman

y4my4my4m avatar Jun 26 '20 22:06 y4my4my4m

I made it work with the current OpenSceneGraph. Fixes are in this PR https://github.com/kcat/opendf/pull/16

lrustand avatar Mar 18 '23 15:03 lrustand