Issue trying to build genplus-gx

Hi everyone :smiley:

I’m trying to develop a little homebrew game for the SegaCD console. I have no way to get the hardware, so I have to deal with emulators, being the Genesis Plus GX core the most accurate I know. It does however, lack a little limitation with the access with one of its RAM chips, the Word-RAM (only one CPU should access it at time, but Genplus-GX (and so does every other emus) allow both CPUs to access it). Lack of this limitation makes the creation of ā€œsharedā€ and overall delicate code between CPUs more than hard, because it’s really easy to break compatibilization with the real hardware without even knowing.

To solve this problem, I have downloaded the full source code of genplus-gx, to try to find a way to add those restrictions. To be frank, I confess I don’t really know C/C++, but I do know PHP, so I found the code syntax to be quite similar. After struggling some time to get it all to compile on my Xubuntu 14.04 (Linux :P) OS, I got both Wii and GameCube versions working perfectly, but, the libretro version, after compiling all files, it SEEMS it couldn’t link the final .so file (or that’s what I think).

From Makefile.libretro, this is the conflicted line:

SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz

… which, after some minutes trying to compile, gives the following output:

[I](a bunch of other files listed just here...)[/I]
./libretro/libretro.o  -lm -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz 
/usr/bin/ld: no se puede encontrar -lz ([I]means "couldn't find -lz"[/I])
collect2: error: ld returned 1 exit status
make: *** [genesis_plus_gx_libretro.so] Error 1

Like I said, Wii/GC versions do compile just fine, and while I am fully able to use these versions in Dolphin (I don’t have a Wii either :X) under my desktop PC, it’s just so slow it’s unusable on my old netbook, where I work most of the time. The libretro core has always ran under a rather decent speed here, so that’s why I want to get it to compile as well.

So, how may I fix this issue? Thank you! :smiley:

You’re missing the zlib dependency (the only dependency most libretro cores have). sudo apt-get zlib1g-dev

If you figure out how to add that restriction, be sure to send a pull request to Ekeeke. He’s always keen to improve accuracy.

Thanks for the fast reply! Works fine now… I thought that the instructions for installing zlib on Wii devkitpro were enough (especially since RetroArch (I think it seems) to have native support for it)