melonDS
melonDS copied to clipboard
Tried compiling melonDS recently, 64 bit linux,
I have tried your instructions for linux on the main page:
/usr/bin/ld: /tmp/ccnyqbTG.ltrans0.ltrans.o: in function std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::filesystem::__cxx11::path::format) [clone .constprop.585]': <artificial>:(.text+0xd992): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o: in function FATStorage::CleanupDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)': <artificial>:(.text+0x46ce): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: <artificial>:(.text+0x4985): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o: in function
FATStorage::DeleteHostDirectory(std::__cxx11::basic_string<char, std::char_traitsstd::filesystem::__cxx11::path::_M_split_cmpts()' /usr/bin/ld: <artificial>:(.text+0x5233): undefined reference to
std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' /usr/bin/ld: <artificial>:(.text+0x5383): undefined reference to
std::filesystem::__cxx11::directory_iterator::operator*() const'
/usr/bin/ld: std::filesystem::__cxx11::directory_iterator::operator++()' /usr/bin/ld: <artificial>:(.text+0x569d): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)' /usr/bin/ld: <artificial>:(.text+0x56f9): undefined reference to
std::filesystem::remove(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)' /usr/bin/ld: <artificial>:(.text+0x59b0): undefined reference to
std::filesystem::remove(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o: in function
FATStorage::ExportDirectory(std::__cxx11::basic_string<char, std::char_traitsstd::filesystem::__cxx11::path::_M_split_cmpts()' /usr/bin/ld: <artificial>:(.text+0x61a9): undefined reference to
std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: <artificial>:(.text+0x66d0): undefined reference to
std::filesystem::last_write_time(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::create_directory(std::filesystem::__cxx11::path const&, std::error_code&)' /usr/bin/ld: <artificial>:(.text+0x6c9b): undefined reference to
std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)'
/usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o: in function FATStorage::Save()': <artificial>:(.text+0x71bd): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)' /usr/bin/ld: <artificial>:(.text+0x721e): undefined reference to
std::filesystem::remove(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o: in function FATStorage::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': <artificial>:(.text+0x8999): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: <artificial>:(.text+0x9306): undefined reference to
std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' /usr/bin/ld: <artificial>:(.text+0x9426): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text+0x94de): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text+0x94f2): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::operator*() const' /usr/bin/ld: <artificial>:(.text+0x9913): undefined reference to
std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::operator++()' /usr/bin/ld: <artificial>:(.text+0x99d4): undefined reference to
std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: <artificial>:(.text+0x9a00): undefined reference to
std::filesystem::file_size(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::last_write_time(std::filesystem::__cxx11::path const&)' /usr/bin/ld: <artificial>:(.text+0x9f9a): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text+0xa0be): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text+0xa0ef): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text+0xa164): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::operator*() const'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::operator++()' /usr/bin/ld: <artificial>:(.text+0xa194): undefined reference to
std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: <artificial>:(.text+0xa1ba): undefined reference to
std::filesystem::file_size(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o: in function FATStorage::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) [clone .cold.10]': <artificial>:(.text.unlikely+0xa80): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text.unlikely+0xa94): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /usr/bin/ld: <artificial>:(.text.unlikely+0xb6f): undefined reference to
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/usr/bin/ld: /tmp/ccnyqbTG.ltrans20.ltrans.o:
Keeps ending this way no matter how closely I follow this:
https://github.com/Arisotura/melonDS#linux
Curious, if there is a gcc problem, or if its a jit problem, or what, but yeah, something is weird here...
I wonder if I need to compile without jit, or if I am screwed, period...
:/
What are you trying to build this on? distro, compiler, etc.?
Hyperbola, gcc 8.4.0-5
I don't know if this is a problem or not, etc.
I wanted to compile this from source due to it having a fallback option if I don't have those ds binaries, etc...
Anywho, here is the website:
https://www.hyperbola.info/packages/
hope this helps?
The issue is due to melon using std::filesystem, a c++17 feature. GCC's c++17 support was "experimental" until v9. v8 should be should be able to use std::filesystem though as long as it linked with -lstdc++fs.
I wanted to compile this from source due to it having a fallback option if I don't have those ds binaries
You don't need to build for that. The BIOS and firmware replacements are a part of the latest stable release.
I wanted to compile this from source due to it having a fallback option if I don't have those ds binaries
You don't need to build for that. The BIOS and firmware replacements are a part of the latest stable release.
Same result, in the latest stable as well...
Which very much confuses me...
Btw, what solution can help me build this properly, without that issue blocking me building it properly?
I run into issues even in the latest stable as well... Also, the glibc issue comes up if I use your binary build, instead of building it myself.
Use a newer version of GCC or adjust the build system to link against stdc++fs
. However if your system's version of Qt is as old as your compiler it probably still won't work.
Use a newer version of GCC or adjust the build system to link against
stdc++fs
. However if your system's version of Qt is as old as your compiler it probably still won't work.
Hmm okay, how do I adjust the build system?
Btw, got qt 5.15, is that too old?
I don't know which version you support at this time aka...
5.15 is the newest version so that's all good, though 5.10 and up should work.
For the build system you would want to edit src/CMakeLists.txt
and add something like target_link_libraries(core PUBLIC stdc++fs)
after the add_library
.
is hyperbola not arch-based? why is your gcc version so old?
is hyperbola not arch-based? why is your gcc version so old?
It is an unusual distro, its hard to explain, but yeah, think hard fork of Arch, made to be stable and many other K.I.S.S friendly changes...
;)
5.15 is the newest version so that's all good, though 5.10 and up should work.
For the build system you would want to edit
src/CMakeLists.txt
and add something liketarget_link_libraries(core PUBLIC stdc++fs)
after theadd_library
.
Hmm, if this works, cool!
I will try this as soon as I can...
Late right now, but thanks!
EDIT:
Seems I might be doing this wrong, dunno if this is needed, but I am either adding it in the wrong spot, or, I need to be more precise... gonna try a few things though.
Just an update on how this is working:
Building usually fails still, at this:
[100%] Linking CXX executable ../../../melonDS etc...
I thought I had mentioned this on this thread, but I think I may have forgotten too.
cmake .. -DCMAKE_PREFIX_PATH=/usr
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'epoxy'
-- Found epoxy, version 1.5.4
-- Checking for module 'sdl2'
-- Found sdl2, version 2.0.14
-- Checking for module 'slirp'
-- Found slirp, version 4.4.0
-- Checking for module 'libarchive'
-- Found libarchive, version 3.4.3
-- Configuring done
-- Generating done
-- Build files have been written to: /home/myusername/Downloads/melonDS-version
Any Version beyond 9.4, Master or newer, as far as I know, has the same problem. including the wifi version, which I tried to install just for the hell of it...
It seems to me that you have some mechanism that breaks it if the versions of specific software are too old...
Do you know how I could completely turn that off?
For GNU only... of course. It may not be a huge need, long term, but it is kind of annoying. Also, using your suggestion to melonDS/src/CMakeLists, still fails, for two reasons, needing to add another )
Or if I don't add the ) it seems to have some weird issue which makes it not realize that its not an issue...
Anyways... be back another time...
Last EDIT? I Think for tonight?
Tried the Modern CMake version, still failed.
Anywho respond if you can.
Also, if you end up making a new build, whether it be 0.9.5, or otherwise, could you make sure such options exist there as well?
Not a huge need, but at the least, even a side build would be nice. Aka, not using the non-free bios crap would be awesome for a stable build.
:)