Closed cellux closed 7 months ago
That looks awesome, thank you. I'll add this patch to CMakeLists.txt
On Sat, Feb 24, 2024 at 8:10 PM Ruzsa Balázs @.***> wrote:
Assigned #29 https://github.com/slajerek/RetroDebugger/issues/29 to @slajerek https://github.com/slajerek.
— Reply to this email directly, view it on GitHub https://github.com/slajerek/RetroDebugger/issues/29#event-11911400816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZOVY3CGBRDE2SNX3HTNDYVI3KRAVCNFSM6AAAAABDYG6VT6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHEYTCNBQGA4DCNQ . You are receiving this because you were assigned.Message ID: @.***>
-- Marcin Skoczylas
They finally added sndio to libraries recognised by CMake, nice :)
On Sun, Feb 25, 2024 at 3:41 AM Marcin Skoczylas @.***> wrote:
That looks awesome, thank you. I'll add this patch to CMakeLists.txt
On Sat, Feb 24, 2024 at 8:10 PM Ruzsa Balázs @.***> wrote:
Assigned #29 https://github.com/slajerek/RetroDebugger/issues/29 to @slajerek https://github.com/slajerek.
— Reply to this email directly, view it on GitHub https://github.com/slajerek/RetroDebugger/issues/29#event-11911400816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZOVY3CGBRDE2SNX3HTNDYVI3KRAVCNFSM6AAAAABDYG6VT6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHEYTCNBQGA4DCNQ . You are receiving this because you were assigned.Message ID: @.***>
-- Marcin Skoczylas
-- Marcin Skoczylas
I've updated this. The error was due a bad copy from my other repo, I forgot to copy the CMakeLists.txt. Please let me know if that works for you now (the patch is actually almost identical as yours).
RetroDebugger seems fine now, but MTEngineSDL broke, probably due to the enforcing of C++ 17?:
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x5f9): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: /home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x77b): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: /home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x7dd): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_int() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x959): undefined reference to `internalJSONNode::operator long() const'
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0xc22): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_int() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x16e2): undefined reference to `internalJSONNode::operator long() const'
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x170c): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: /home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x1865): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_int() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x1c20): undefined reference to `internalJSONNode::operator long() const'
/usr/bin/ld: /home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x1c89): undefined reference to `internalJSONNode::operator long() const'
/usr/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x1d67): undefined reference to `internalJSONNode::operator double() const'
/usr/bin/ld: /home/rb/aur/retro-debugger-git/src/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x1ebb): undefined reference to `internalJSONNode::operator double() const'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/retrodebugger.dir/build.make:3034: retrodebugger] Error 1
make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/retrodebugger.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Hmm, that's interesting. I'll check what happens now. I think I had this error before and applied a fix. Maybe when I set to support C++20. MTEngineSDL uses C++17 for quite long time already. This comes from libjson library that I wanted to drop support anyway as I switched to hjson already :)
I just tried to build from scratch and it complains about missing libsndio:
[100%] Linking CXX executable retrodebugger
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsndio: Datei oder Verzeichnis nicht gefunden
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsndio: Datei oder Verzeichnis nicht gefunden
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [CMakeFiles/retrodebugger.dir/build.make:3033: retrodebugger] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/retrodebugger.dir/all] Fehler 2
make: *** [Makefile:91: all] Fehler 2
after installing libsndio:
[ 85%] Linking CXX executable retrodebugger
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x5f9): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x77b): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x7dd): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_int() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x959): undefined reference to `internalJSONNode::operator long() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0xc22): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_int() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x16e2): undefined reference to `internalJSONNode::operator long() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x170c): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x1865): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_int() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x1c20): undefined reference to `internalJSONNode::operator long() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:671:(.text+0x1c89): undefined reference to `internalJSONNode::operator long() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/retrodebugger.dir/src/Views/JukeboxPlaylist/CJukeboxPlaylist.cpp.o: in function `JSONNode::as_float() const':
/home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x1d67): undefined reference to `internalJSONNode::operator double() const'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/groepaz/Desktop/c64stuff/retrodebugger/RetroDebugger/../MTEngineSDL/src/Engine/Libs/libjson/_internal/Source/JSONNode.h:676:(.text+0x1ebb): undefined reference to `internalJSONNode::operator double() const'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [CMakeFiles/retrodebugger.dir/build.make:3033: retrodebugger] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/retrodebugger.dir/all] Fehler 2
make: *** [Makefile:91: all] Fehler 2
I've updated CMakeLists, and this compiles for me on my Debian. Please check.
Now it links :) Is there a way to increase the font size in the various windows? its so tiny, i cant use it (not the UI font, the one used for memory dumps etc)
edit: nvm, found it :)
Thanks.
FYI: I managed to build current master branch without issues on Arch Linux, so I can confirm that your changes fixed the build.
Describe the bug
If the executable is built from scratch via CMake, the build fails at the linking step due to lots of undefined reference errors.
To Reproduce
With MTEngineSDL checked out and built in a sibling directory:
Expected behavior
Builds artifact without errors.
Desktop (please complete the following information):
OS: Arch Linux Version: latest Git HEAD (0.64.66)
Additional context
I could fix the build by applying the following patch: