hampusborgos/rme

could not compile/use on debian 11

hiwyn opened this issue · 2 comments

hiwyn commented

i've tried:
sudo apt-get install git cmake libboost-system-dev libboost-thread-dev libglu1-mesa-dev libwxgtk3.0-gtk3-dev libarchive-dev freeglut3-dev libxmu-dev libxi-dev

sudo apt-get install git cmake libboost-system-dev libboost-thread-dev libglu1-mesa-dev libwxgtk3.0-gtk3-dev libarchive-dev freeglut3-dev libxmu-dev libxi-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libboost-system-dev is already the newest version (1.74.0.3).
libboost-thread-dev is already the newest version (1.74.0.3).
cmake is already the newest version (3.18.4-2).
freeglut3-dev is already the newest version (2.8.1-6).
git is already the newest version (1:2.30.2-1).
libarchive-dev is already the newest version (3.4.3-2+b1).
libglu1-mesa-dev is already the newest version (9.0.1-1).
libxi-dev is already the newest version (2:1.7.10-1).
libxmu-dev is already the newest version (2:1.1.2-2+b3).
libwxgtk3.0-gtk3-dev is already the newest version (3.0.5.1+dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

mkdir rme/build && cd rme/build && cmake .. && make -j nproc

mkdir rme/build && cd rme/build && cmake .. && make -j `nproc`
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:15 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found LibArchive: /usr/lib/x86_64-linux-gnu/libarchive.so (found version "3.4.3") 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.34.0") found components: thread system 
-- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk3u_html-3.0;-lwx_gtk3u_aui-3.0;-lwx_gtk3u_gl-3.0;-lwx_gtk3u_adv-3.0;-lwx_gtk3u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0 (found version "3.0.5") 
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hiwyn/rme/build
Scanning dependencies of target rme
[  2%] Building CXX object CMakeFiles/rme.dir/source/about_window.cpp.o
[  2%] Building CXX object CMakeFiles/rme.dir/source/action.cpp.o
[  4%] Building CXX object CMakeFiles/rme.dir/source/application.cpp.o
[  4%] Building CXX object CMakeFiles/rme.dir/source/artprovider.cpp.o
In file included from /usr/include/wx-3.0/wx/wx.h:24,
                 from /home/hiwyn/rme/source/main.h:59,
                 from /home/hiwyn/rme/source/application.cpp:18:
/home/hiwyn/rme/source/gui.h:66:32: warning: cast between incompatible pointer to member types from ‘void (wxEvtHandler::*)(wxCommandEvent&)’ to ‘wxEventFunction’ {aka ‘void (wxEvtHandler::*)(wxEvent&)’} [-Wcast-function-type]
   66 |         (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
/home/hiwyn/rme/source/application.cpp:53:2: note: in expansion of macro ‘EVT_ON_UPDATE_MENUS’
   53 |  EVT_ON_UPDATE_MENUS(wxID_ANY, MainFrame::OnUpdateMenus)
      |  ^~~~~~~~~~~~~~~~~~~
[  5%] Building CXX object CMakeFiles/rme.dir/source/basemap.cpp.o
[  6%] Building CXX object CMakeFiles/rme.dir/source/brush.cpp.o
[  7%] Building CXX object CMakeFiles/rme.dir/source/brush_tables.cpp.o
[  8%] Building CXX object CMakeFiles/rme.dir/source/browse_tile_window.cpp.o
[  9%] Building CXX object CMakeFiles/rme.dir/source/positionctrl.cpp.o
[ 10%] Building CXX object CMakeFiles/rme.dir/source/carpet_brush.cpp.o
[ 11%] Building CXX object CMakeFiles/rme.dir/source/client_version.cpp.o
[ 12%] Building CXX object CMakeFiles/rme.dir/source/common.cpp.o
[ 13%] Building CXX object CMakeFiles/rme.dir/source/common_windows.cpp.o
[ 14%] Building CXX object CMakeFiles/rme.dir/source/complexitem.cpp.o
[ 15%] Building CXX object CMakeFiles/rme.dir/source/container_properties_window.cpp.o
[ 16%] Building CXX object CMakeFiles/rme.dir/source/copybuffer.cpp.o
[ 17%] Building CXX object CMakeFiles/rme.dir/source/creature_brush.cpp.o
[ 18%] Building CXX object CMakeFiles/rme.dir/source/creature.cpp.o
[ 20%] Building CXX object CMakeFiles/rme.dir/source/creatures.cpp.o
[ 21%] Building CXX object CMakeFiles/rme.dir/source/dat_debug_view.cpp.o
[ 22%] Building CXX object CMakeFiles/rme.dir/source/dcbutton.cpp.o
[ 23%] Building CXX object CMakeFiles/rme.dir/source/doodad_brush.cpp.o
[ 24%] Building CXX object CMakeFiles/rme.dir/source/editor.cpp.o
[ 25%] Building CXX object CMakeFiles/rme.dir/source/editor_tabs.cpp.o
[ 26%] Building CXX object CMakeFiles/rme.dir/source/eraser_brush.cpp.o
[ 27%] Building CXX object CMakeFiles/rme.dir/source/extension.cpp.o
[ 28%] Building CXX object CMakeFiles/rme.dir/source/extension_window.cpp.o
[ 29%] Building CXX object CMakeFiles/rme.dir/source/find_item_window.cpp.o
[ 30%] Building CXX object CMakeFiles/rme.dir/source/filehandle.cpp.o
[ 31%] Building CXX object CMakeFiles/rme.dir/source/graphics.cpp.o
[ 32%] Building CXX object CMakeFiles/rme.dir/source/ground_brush.cpp.o
[ 33%] Building CXX object CMakeFiles/rme.dir/source/gui.cpp.o
[ 34%] Building CXX object CMakeFiles/rme.dir/source/house_brush.cpp.o
/home/hiwyn/rme/source/gui.cpp: In static member function ‘static wxString GUI::GetDataDirectory()’:
/home/hiwyn/rme/source/gui.cpp:142:13: warning: catching polymorphic type ‘class std::bad_cast’ by value [-Wcatch-value=]
  142 |  catch(std::bad_cast)
      |             ^~~~~~~~
/home/hiwyn/rme/source/gui.cpp: In static member function ‘static wxString GUI::GetExecDirectory()’:
/home/hiwyn/rme/source/gui.cpp:159:13: warning: catching polymorphic type ‘class std::bad_cast’ by value [-Wcatch-value=]
  159 |  catch(std::bad_cast)
      |             ^~~~~~~~
/home/hiwyn/rme/source/gui.cpp: In member function ‘void GUI::ShowWelcomeDialog(const wxBitmap&)’:
/home/hiwyn/rme/source/gui.cpp:1186:106: error: ‘class MainFrame’ has no member named ‘FromDIP’
 1186 |     welcomeDialog = newd WelcomeDialog(__W_RME_APPLICATION_NAME__, "Version " + __W_RME_VERSION__, root->FromDIP(wxSize(800, 480)), icon, recent_files);
      |                                                                                                          ^~~~~~~
make[2]: *** [CMakeFiles/rme.dir/build.make:485: CMakeFiles/rme.dir/source/gui.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/rme.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

and stops on:

[ 32%] Building CXX object CMakeFiles/rme.dir/source/ground_brush.cpp.o
[ 33%] Building CXX object CMakeFiles/rme.dir/source/gui.cpp.o
[ 34%] Building CXX object CMakeFiles/rme.dir/source/house_brush.cpp.o
/home/hiwyn/rme/source/gui.cpp: In static member function ‘static wxString GUI::GetDataDirectory()’:
/home/hiwyn/rme/source/gui.cpp:142:13: warning: catching polymorphic type ‘class std::bad_cast’ by value [-Wcatch-value=]
  142 |  catch(std::bad_cast)
      |             ^~~~~~~~
/home/hiwyn/rme/source/gui.cpp: In static member function ‘static wxString GUI::GetExecDirectory()’:
/home/hiwyn/rme/source/gui.cpp:159:13: warning: catching polymorphic type ‘class std::bad_cast’ by value [-Wcatch-value=]
  159 |  catch(std::bad_cast)
      |             ^~~~~~~~
/home/hiwyn/rme/source/gui.cpp: In member function ‘void GUI::ShowWelcomeDialog(const wxBitmap&)’:
/home/hiwyn/rme/source/gui.cpp:1186:106: error: ‘class MainFrame’ has no member named ‘FromDIP’
 1186 |     welcomeDialog = newd WelcomeDialog(__W_RME_APPLICATION_NAME__, "Version " + __W_RME_VERSION__, root->FromDIP(wxSize(800, 480)), icon, recent_files);
      |                                                                                                          ^~~~~~~
make[2]: *** [CMakeFiles/rme.dir/build.make:485: CMakeFiles/rme.dir/source/gui.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/rme.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

what should i do?

Was this solved? I have the same issue on Arch Linux. Thanks in advance.

Please note I've placed a bounty on this issue.