Haiku port?

Good idea. I’ve been trying to get a working system with haikuports but it’s tough when I’m completely unfamiliar with the environment :confused:

If you get the SDL errors I got when doing make (and you have SDL installed), then it should be fixable by editing the HAVE_THREADS part of the makefile.

I moved “OBJ += autosave.o thread.o” above “ifeq ($(HAVE_THREADS), 1)” and removed -lpthread, so that it looks like this:

OBJ += autosave.o thread.o

ifeq ($(HAVE_THREADS), 1)

LIBS += endif

Now I get no errors when doing make. I get small errors with make install but it still manages to install the retroarch binary.

They stopped replying now it seems. Do you know what to do about “RetroArch [ERROR] :: Fatal error received in: “parse_input()”” when trying to run something in RetroArch?

Just a guess, but I would imagine that’s related to SDL, since I think it handles input.

What format is your RetroArch binary? Is it an exe, as would be expected from it guessing Win32?

No, it looks like it’s a normal Haiku binary with no extension. The libraries are also .so files. The binary actually runs, it’s just that I can’t load any roms with it, and I get that error.

I’m suspecting that I need a proper fix for that “dlopen” issue instead of using the libdl.so solution that I wrote about earlier…

EDIT: Lol, I just tried running RetroArch (retroarch.exe, not the Phoenix GUI) in Windows now and I got the “RetroArch [ERROR] :: Fatal error received in: “parse_input()”” here as well. Perhaps there’s nothing wrong?

hmm. yeah, that’s possible. What kind of command did you use in haiku to launch it?

retroarch retroarch /boot/home/Desktop/ROMNAME.gba retroarch /boot/home/Desktop/ROMNAME.gba --config=/boot/common/etc

I think. And pretty much the same result with all three I believe. I can reboot into Haiku and check to make sure in a while, but is there a proper way that is supposed to work? Just asking because there’s not much point in trying to make it work through methods that aren’t working even in the Windows port. I usually use RetroArch through the Phoenix GUI in Windows, so I might have missed a couple of things…

You can look in the log of RetroArch Phoenix and it will tell you at the top what command it used to launch, so start a game, close, then peek into the log and see what it says. The main things are ‘-c /path/to/config’ and if you compiled it with --disable-dynamic, it’s only going to use the libretro it was compiled with, IIRC. It might also use the one in the same directory as the executable, if it can find it there.

I did what you suggested and now I got a tiny bit further, but it’s crashing on me:

~/RetroArch> retroarch FFIV.ws -c /boot/common/etc/retroarch.cfg -v --no-patch RetroArch: Opening file: “FFIV.ws” === Build ======================================= Compiler: GCC (4.6.3) 32-bit Built: Dec 20 2012

RetroArch: [CPUID]: Vendor: GenuineIntel RetroArch: [CPUID]: SSE: 1 RetroArch: [CPUID]: SSE2: 1 RetroArch: [CPUID]: AVX: 0 === Config === savestate_directory = “/boot/home/config/settings/retroarch/savestates” system_directory = “/boot/home/config/settings/retroarch/system” === Config end ===

Then a window comes up telling me to either kill or debug it, and I got this when I clicked on debug:

GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type “show copying” to see the conditions. There is absolutely no warranty for GDB. Type “show warranty” for details. This GDB was configured as “i586-pc-haiku”… [tcsetpgrp failed in terminal_inferior: Invalid Argument] Thread 2523 caused an exception: Segment violation Reading symbols from /boot/system/runtime_loader…done. Loaded symbols for /boot/system/runtime_loader Reading symbols from /boot/common/lib/libSDL-1.2.so.0.11.4…done. Loaded symbols for /boot/common/lib/libSDL-1.2.so.0.11.4 Reading symbols from /boot/system/lib/libGL.so…done. Loaded symbols for /boot/system/lib/libGL.so Reading symbols from /boot/common/lib/libxml2.so.2.8.0…done. Loaded symbols for /boot/common/lib/libxml2.so.2.8.0 Reading symbols from /boot/home/RetroArch/lib/libdl.so…done. Loaded symbols for /boot/home/RetroArch/lib/libdl.so Reading symbols from /boot/common/lib/libSDL_image-1.2.so.0.8.4…done. Loaded symbols for /boot/common/lib/libSDL_image-1.2.so.0.8.4 Reading symbols from /boot/system/lib/libroot.so…done. Loaded symbols for /boot/system/lib/libroot.so Reading symbols from /boot/common/lib/libiconv.so.2.5.0…done. Loaded symbols for /boot/common/lib/libiconv.so.2.5.0 Reading symbols from /boot/system/lib/libbe.so…done. Loaded symbols for /boot/system/lib/libbe.so Reading symbols from /boot/system/lib/libmedia.so…done. Loaded symbols for /boot/system/lib/libmedia.so Reading symbols from /boot/system/lib/libgame.so…done. Loaded symbols for /boot/system/lib/libgame.so Reading symbols from /boot/system/lib/libdevice.so…done. Loaded symbols for /boot/system/lib/libdevice.so Reading symbols from /boot/system/lib/libtextencoding.so…done. Loaded symbols for /boot/system/lib/libtextencoding.so Reading symbols from /boot/system/lib/libnetwork.so…done. Loaded symbols for /boot/system/lib/libnetwork.so Reading symbols from /boot/system/lib/libstdc++.so…done. Loaded symbols for /boot/system/lib/libstdc++.so Reading symbols from /boot/system/lib/libz.so.1.2.7…done. Loaded symbols for /boot/system/lib/libz.so.1.2.7 Reading symbols from /boot/common/lib/liblzma.so.5.0.1…done. Loaded symbols for /boot/common/lib/liblzma.so.5.0.1 Reading symbols from /boot/system/lib/libjpeg.so.8.4.0…done. Loaded symbols for /boot/system/lib/libjpeg.so.8.4.0 Reading symbols from /boot/system/lib/libicudata.so.48.1.1…done. Loaded symbols for /boot/system/lib/libicudata.so.48.1.1 Reading symbols from /boot/system/lib/libicui18n.so.48.1.1…done. Loaded symbols for /boot/system/lib/libicui18n.so.48.1.1 Reading symbols from /boot/system/lib/libicuio.so.48.1.1…done. Loaded symbols for /boot/system/lib/libicuio.so.48.1.1 Reading symbols from /boot/system/lib/libicule.so.48.1.1…done. Loaded symbols for /boot/system/lib/libicule.so.48.1.1 Reading symbols from /boot/system/lib/libiculx.so.48.1.1…done. Loaded symbols for /boot/system/lib/libiculx.so.48.1.1 Reading symbols from /boot/system/lib/libicutu.so.48.1.1…done. Loaded symbols for /boot/system/lib/libicutu.so.48.1.1 Reading symbols from /boot/system/lib/libicuuc.so.48.1.1…done. Loaded symbols for /boot/system/lib/libicuuc.so.48.1.1 Reading symbols from /boot/system/lib/libsupc++.so…done. Loaded symbols for /boot/system/lib/libsupc++.so Reading symbols from /boot/home/RetroArch/lib/libroot-addon-icu.so…done. Loaded symbols for /boot/home/RetroArch/lib/libroot-addon-icu.so [tcsetpgrp failed in terminal_inferior: Invalid Argument] [Switching to team ./retroarch FFIV.ws -c /boot/common/etc/retroarch.cfg -v --no-p (2523) thread retroarch (2523)] 0x00c219df in dlopen () from /boot/home/RetroArch/lib/libdl.so (gdb)

I got a lot of help on the IRC channel and I managed to do a clean compile of RetroArch. It can run roms now!

Here is my modified source: http://www.sendspace.com/file/isyh7u

FFIV Wonderswan: http://img191.imageshack.us/img191/231/screenshot2ut.png

Whoa, congratulations, dude! I’m glad you got it worked out.

You might consider making a haikuport of it to save others the trouble :slight_smile:

Thanks. :smiley: Making a haikuport is probably out of my league, but I submitted a binary package on Haikuware: http://haikuware.com/directory/view-details/emulators/game-systems/retroarch

I hope the developers will take a look at my modified source and apply appropriate changes.

Can you give a quick summary of the changes that were necessary? That would make it easier present to them than just the source bundle, especially since there’s been quite a lot of changes to the official source recently, so they’d have quite a few diffs to dig through to find the haiku-specific changes.

It’s taken from git, a day ago or so, so I don’t think there’s been too many changes since then, but sure I’ll try to sum up the changes today.

You got it running? Pretty cool :smiley: How intrusive are these changes?

I don’t think they’re really intrusive. I did 3 pull requests with my changes on git, please check them out.

EDIT: Merged everything to one pull request.

Hi everyone,

Are there still people willing to work on this five years later? I have a working Haiku running on a laptop, but RetroArch build seems broken at this point. I can spend some time debugging but would love to know if anybody else can lend a hand when I hit a roadblock :stuck_out_tongue:

Thanks!

Your best bet is to join us on IRC at #retroarch on Freenode or on the libretro discord server. You can talk to people in real-time that way.