SLADE
SLADE copied to clipboard
Cannot build SLADE under Kubuntu 22.04 with GCC
SLADE Version: (3.2.x, f826d1381cff23e957628bebe76a7e09a8c1fb2d) Operating System: (Linux)
Issue Details: I cannot compile SLADE using GCC under Kubuntu 22.04. The issue seems to be that slade::audio::Music is an "incomplete type", whatever that means.
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In constructor ‘slade::AudioEntryPanel::AudioEntryPanel(wxWindow*)’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:73:27: error: invalid use of incomplete type ‘class slade::audio::Music’
73 | music_{ new audio::Music() },
| ^
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:75:30: error: no matching function for call to ‘std::unique_ptr<slade::audio::Music>::unique_ptr(<brace-enclosed initializer list>)’
75 | mp3_{ new audio::Mp3Music() }
| ^
In file included from /usr/include/c++/9/bits/locale_conv.h:41,
from /usr/include/c++/9/locale:43,
from /usr/include/SFML/System/Utf.hpp:33,
from /usr/include/SFML/System/String.hpp:32,
from /usr/include/SFML/System.hpp:42,
from /home/kevinc/Games/code/SLADE/src/common.h:115,
from /home/kevinc/Games/code/SLADE/build/src/cotire/slade_CXX_prefix.cxx:4,
from /home/kevinc/Games/code/SLADE/build/src/cotire/slade_CXX_prefix.hxx:4:
/usr/include/c++/9/bits/unique_ptr.h:281:2: note: candidate: ‘template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::auto_ptr<_Up>&&)’
281 | unique_ptr(auto_ptr<_Up>&& __u) noexcept;
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:281:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:271:2: note: candidate: ‘template<class _Up, class _Ep, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&)’
271 | unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:271:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:257:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = slade::audio::Music; _Dp = std::default_delete<slade::audio::Music>]’
257 | unique_ptr(unique_ptr&& __u) noexcept
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:257:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/unique_ptr.h:250:12: note: candidate: ‘template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t)’
250 | constexpr unique_ptr(nullptr_t) noexcept
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:250:12: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:244:2: note: candidate: ‘template<class _Del, class _DelUnref> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer, std::__enable_if_t<std::is_lvalue_reference<_Del>::value, _DelUnref&&>)’ <deleted>
244 | unique_ptr(pointer,
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:244:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:236:2: note: candidate: ‘template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer, std::__enable_if_t<(! std::is_lvalue_reference<_Del>::value), _Del&&>)’
236 | unique_ptr(pointer __p,
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:236:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:224:2: note: candidate: ‘template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer, const deleter_type&)’
224 | unique_ptr(pointer __p, const deleter_type& __d) noexcept
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:224:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:211:2: note: candidate: ‘template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer)’
211 | unique_ptr(pointer __p) noexcept
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:211:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/unique_ptr.h:199:12: note: candidate: ‘template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr()’
199 | constexpr unique_ptr() noexcept
| ^~~~~~~~~~
/usr/include/c++/9/bits/unique_ptr.h:199:12: note: template argument deduction/substitution failed:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:75:30: note: candidate expects 0 arguments, 1 provided
75 | mp3_{ new audio::Mp3Music() }
| ^
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:135:8: error: invalid use of incomplete type ‘class slade::audio::Music’
135 | music_->setVolume(snd_volume);
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘bool slade::AudioEntryPanel::open(slade::ArchiveEntry*)’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:263:8: error: invalid use of incomplete type ‘class slade::audio::Music’
263 | music_->allowSeek(false); // Needed to avoid a crash in SFML with ogg files
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:346:8: error: invalid use of incomplete type ‘class slade::audio::Music’
346 | music_->allowSeek(true);
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘bool slade::AudioEntryPanel::openAudio(slade::MemChunk&, const wxString&)’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:385:17: error: invalid use of incomplete type ‘class slade::audio::Music’
385 | else if (music_->openFromMemory((const char*)audio.data(), audio.size()))
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:392:26: error: invalid use of incomplete type ‘class slade::audio::Music’
392 | setAudioDuration(music_->getDuration().asMilliseconds());
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘void slade::AudioEntryPanel::startStream()’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:513:20: error: invalid use of incomplete type ‘class slade::audio::Music’
513 | case Music: music_->play(); break;
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘void slade::AudioEntryPanel::stopStream() const’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:529:20: error: invalid use of incomplete type ‘class slade::audio::Music’
529 | case Music: music_->pause(); break;
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘void slade::AudioEntryPanel::resetStream() const’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:545:20: error: invalid use of incomplete type ‘class slade::audio::Music’
545 | case Music: music_->stop(); break;
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘void slade::AudioEntryPanel::onTimer(wxTimerEvent&)’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:714:26: error: invalid use of incomplete type ‘class slade::audio::Music’
714 | case Music: pos = music_->getPlayingOffset().asMilliseconds(); break;
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:726:37: error: invalid use of incomplete type ‘class slade::audio::Music’
726 | || (audio_type_ == Music && music_->getStatus() == sf::Sound::Stopped)
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘void slade::AudioEntryPanel::onSliderSeekChanged(wxCommandEvent&)’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:744:20: error: invalid use of incomplete type ‘class slade::audio::Music’
744 | case Music: music_->setPlayingOffset(sf::milliseconds(slider_seek_->GetValue())); break;
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp: In member function ‘void slade::AudioEntryPanel::onSliderVolumeChanged(wxCommandEvent&)’:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:762:20: error: invalid use of incomplete type ‘class slade::audio::Music’
762 | case Music: music_->setVolume(snd_volume); break;
| ^~
In file included from /home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:33:
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.h:8:7: note: forward declaration of ‘class slade::audio::Music’
8 | class Music;
| ^~~~~
In file included from /usr/include/c++/9/bits/locale_conv.h:41,
from /usr/include/c++/9/locale:43,
from /usr/include/SFML/System/Utf.hpp:33,
from /usr/include/SFML/System/String.hpp:32,
from /usr/include/SFML/System.hpp:42,
from /home/kevinc/Games/code/SLADE/src/common.h:115,
from /home/kevinc/Games/code/SLADE/build/src/cotire/slade_CXX_prefix.cxx:4,
from /home/kevinc/Games/code/SLADE/build/src/cotire/slade_CXX_prefix.hxx:4:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = slade::audio::Music]’:
/usr/include/c++/9/bits/unique_ptr.h:292:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = slade::audio::Music; _Dp = std::default_delete<slade::audio::Music>]’
/home/kevinc/Games/code/SLADE/src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp:75:30: required from here
/usr/include/c++/9/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘slade::audio::Music’
79 | static_assert(sizeof(_Tp)>0,
| ^~~~~~~~~~~