stefan-gr / abendbrot

Desktop oriented overlay for various ebuilds and the occasional gamer
19 stars 13 forks source link

games-emulation/mame-libretro: Multiple problems #47

Closed Jannis234 closed 7 years ago

Jannis234 commented 7 years ago

I've found a couple of small issues with mame-libretro: 1.) The Manifest needs updating, looks like the files have changed upstream 2.) The ebuild tries to install docs/mamelicense.txt which doens't exist 3.) It needs a lot of memory when building with debug CFLAGS (about 25GB disk and 9GB of RAM on my amd64 machine with -ggdb), maybe add a warning if these CFLAGS are found?

mwolos commented 7 years ago

I also had to update the Manifest due to a mismatch in size but afterwards the build process throws this error and fails:

error: ‘cbegin’ is not a member of ‘std’
error: ‘cend’ is not a member of ‘std’
Jannis234 commented 7 years ago

error: ‘cbegin’ is not a member of ‘std’ error: ‘cend’ is not a member of ‘std’

As far as I know, this is a problem with C++14 support in GCC 4.X and updating to GCC 5.1 should fix it. I've made a quick patch that fixes it for me, but it's a rather dirty hack and will break building with GCC 5:

diff -ru mame-9359b71e93c20aa27315dfa41f888fc6f49cc7ae_orig/src/lib/util/strformat.h mame-9359b71e93c20aa27315dfa41f888fc6f49cc7ae/src/lib/util/strformat.h
--- mame-9359b71e93c20aa27315dfa41f888fc6f49cc7ae_orig/src/lib/util/strformat.h 2016-09-06 02:53:14.000000000 +0200
+++ mame-9359b71e93c20aa27315dfa41f888fc6f49cc7ae/src/lib/util/strformat.h      2016-11-04 00:46:35.437749021 +0100
@@ -185,7 +185,6 @@
 #include <type_traits>
 #include <utility>

-#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20150413)
 namespace std
 {
 template<class _Container>
@@ -198,7 +197,6 @@
        cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))
        { return std::end(__cont); }
 }
-#endif

 namespace util {
 namespace detail {

There is compatibility code for GCC versions before 5.1, but MAME seems is disable it too early. This patch just removes the conditional, maybe someone can figure out the correct version? (Or just depend on GCC 5 in the ebuild)

stefan-gr commented 7 years ago

Thanks for the reports, I fixed the checksums and removed the license, seems like it changed to gpl2. @Jannis234 how does your -j* look like? I'm guessing those requirements change depending on setup. I can't test it now since I don't have swap and I'm fearing losing my running work when ram hits max. I just put some checks with 9G ram and 25G disk space in the ebuild. I hope that isn't too overkill.

@dwma @Jannis234 I applied the portage patch from sdlmame from https://bugs.gentoo.org/show_bug.cgi?id=582576 This should do until libretro syncs to upstream since it got fixed with 0.175.

I will close this for now, please open it up again if something is wrong or if I should reduce the ram/disk checks.

Jannis234 commented 7 years ago

The memory checks should be ok. I was using a pretty high setting for -j, but it's the final link that uses so much memory, so -j souldn't make any difference.