sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
699 stars 108 forks source link

SLADE fails to build on Ubuntu 22.04 #1624

Closed Wohlstand closed 9 months ago

Wohlstand commented 9 months ago

SLADE Version: top master Operating System: (Linux, Ubuntu 22.04, actually Linux Mint 21.2)

Issue Details: On attempt to build the latest version (the top of the branch master), I do get the next error:

/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp: In member function ‘void slade::TextEditorCtrl::setup()’:
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp:277:9: error: ‘SetFontQuality’ was not declared in this scope
  277 |         SetFontQuality(txed_font_quality);
      |         ^~~~~~~~~~~~~~
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp: In member function ‘void slade::TextEditorCtrl::selectNextOccurrence()’:
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp:726:9: error: ‘TargetWholeDocument’ was not declared in this scope
  726 |         TargetWholeDocument();
      |         ^~~~~~~~~~~~~~~~~~~
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp:728:9: error: ‘MultipleSelectAddNext’ was not declared in this scope
  728 |         MultipleSelectAddNext();
      |         ^~~~~~~~~~~~~~~~~~~~~
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp: In member function ‘void slade::TextEditorCtrl::selectAllOccurrences()’:
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp:736:9: error: ‘TargetWholeDocument’ was not declared in this scope
  736 |         TargetWholeDocument();
      |         ^~~~~~~~~~~~~~~~~~~
/home/vitaly/_git_repos_other/SLADE/src/TextEditor/UI/TextEditorCtrl.cpp:738:9: error: ‘MultipleSelectAddEach’ was not declared in this scope
  738 |         MultipleSelectAddEach();
      |         ^~~~~~~~~~~~~~~~~~~~~

I tried to fully remove the build directory and run build from the scratch - the result is the same.

I ran build with the next setup:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..

(doesn't matter, Ninja or GNU Make, it fails on both).

thezerobit commented 9 months ago

I had to upgrade to a newer version of wxwidgets to get it to compile on Kubuntu 22.04. I think I followed the instructions here: https://docs.codelite.org/wxWidgets/repo320/#ubuntu-and-debian

sirjuddington commented 9 months ago

Currently SLADE requires wxWidgets 3.2+ to compile, you'll need to either upgrade your distro or follow the instructions at @thezerobit's link

Wohlstand commented 9 months ago

My distro is already latest LTS, the newer wxWidgets needs me to build it from the source code or install from third party PPA repos.

Wohlstand commented 9 months ago

I had to upgrade to a newer version of wxwidgets to get it to compile on Kubuntu 22.04. I think I followed the instructions here: https://docs.codelite.org/wxWidgets/repo320/#ubuntu-and-debian

Tried to install the stuff just now, and:

-- cotire 1.7.9 loaded. -- wx-config used is: /usr/bin/wx-config -- wxWidgets version is: 3.2.0 -- gtk version is: 3 CMake Error at /usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) (Required is at least version "3.2.0") Call Stack (most recent call first): /usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.27/Modules/FindwxWidgets.cmake:987 (find_package_handle_standard_args) cmake/unix.cmake:75 (find_package) src/CMakeLists.txt:42 (include)

-- Configuring incomplete, errors occurred!

Wohlstand commented 9 months ago

Trying to check the build manual:

a fresh install of Ubuntu 23.04 and should work fine.

It's a SHORT-TERM support branch of Ubuntu that receives newest packages and they has a high chance to be a buggy. Please never ignore LTS Ubuntus (with even number like 20.04, 22.04), they are most stable branches, and also they being widely used as a base for other distros like Linux Mint, etc. Ubuntu versions with the odd version number are kind of proveground for future LTS versions.

I mean, please keep compatibility with the wxWidgets of the latest LTS Ubuntu at least, and once new LTS gets released, then feel free to drop this support.

Wohlstand commented 9 months ago

EDIT: About missing packages, that's a failure of the manual page where are trailing spaces after some of \ characters. That had confused me (and other people) a lot. I found this accidentally. Just now, after fixing all packages, I successfully configured CMake build, and now it builds...