zach-morris / same_cdi

SAME_CDI is a libretro core to play CD-i games. This is a fork and modification of the MAME libretro core
Other
4 stars 7 forks source link

Compilation Errors #12

Open 0x90shell opened 9 months ago

0x90shell commented 9 months ago

I'm having issues compiling this an Arch. I haven't done a deeper analysis at this point, but these are the errors I'm getting:

In file included from ../../../../../src/osd/modules/lib/osdlib_retro.cpp:18:
../../../../../src/osd/modules/lib/osdlib.h: In member function ‘bool osd::virtual_memory_allocation::set_access(std::size_t, std::size_t, unsigned int)’:
../../../../../src/osd/modules/lib/osdlib.h:111:68: error: ‘uint8_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
  111 |                         return do_set_access(reinterpret_cast<std::uint8_t *>(m_memory) + start, size, access);
      |                                                                    ^~~~~~~
      |                                                                    wint_t
../../../../../src/osd/modules/lib/osdlib.h:111:76: error: expected ‘>’ before ‘*’ token
  111 |                         return do_set_access(reinterpret_cast<std::uint8_t *>(m_memory) + start, size, access);
      |                                                                            ^
../../../../../src/osd/modules/lib/osdlib.h:111:76: error: expected ‘(’ before ‘*’ token
../../../../../src/osd/modules/lib/osdlib.h:111:77: error: expected primary-expression before ‘>’ token
  111 |                         return do_set_access(reinterpret_cast<std::uint8_t *>(m_memory) + start, size, access);
      |                                                                             ^
../../../../../src/osd/modules/lib/osdlib.h:111:89: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
  111 |                         return do_set_access(reinterpret_cast<std::uint8_t *>(m_memory) + start, size, access);
      |                                                                              ~~~~~~~~~~~^~~~~~~
make[3]: *** [ocore_retro.make:633: ../../../../libretro/obj/x64/libretro/ocore_retro/src/osd/modules/lib/osdlib_retro.o] Error 1
make[2]: *** [Makefile:19: ocore_retro] Error 2
zach-morris commented 9 months ago

Does the MAME core compile, or have the same issue?

0x90shell commented 3 months ago

Long overdue on this, but the mame core does compile without errors in Arch Linux. Still seeing the same errors for this, though.

zach-morris commented 2 months ago

I'd try downstream's version: https://github.com/libretro/same_cdi I don't think they changed anything in the makefile, but give it a go

0x90shell commented 2 months ago

Yea same issue which tracks back to Mame's OSD code. Libretro Mame will compile but the libretro cores for same_cdi on both repos won't. After diffing mame osdlib.h with this older version, there were 3 additional include statements found.

I found adding "#include \<cstsint>" allowed compile to finish but then unsurprisingly games wouldnt launch. I experimented with dropping in the updated files and folders from libretro mame but compile wouldn't complete with that trivial change.

I suspect I need to be more selective to get a working core after compilation and maybe edit makefile.

zach-morris commented 2 months ago

Very strange considering it's pretty much the same as the mame core with most of the devices stripped. I'll play with it and see if i get anywhere.