Previous Thread
Next Thread
Print Thread
How to cross-compile #114652
02/11/19 11:41 AM
02/11/19 11:41 AM
Joined: May 2007
Posts: 548
Germany
M
mizapf Offline OP
Senior Member
mizapf  Offline OP
Senior Member
M
Joined: May 2007
Posts: 548
Germany
I just got a Raspi 3 B+ and wanted to check whether it has become strong enough to run MAME emulations.

However, I seem to be unable to build it on the Raspi. I know (I once posted it here) that I could compile MAME on a Raspi3 a while ago, and again, I remembered to add swap space on another drive, but when it gets to luaengine, the gcc eats up all memory and sends the Raspi into thrashing hell. I tried it without graphics desktop, let it run over night, but no way.

I tried to install the cross-compile libs, and I set PLATFORM:=arm, even explicitly in the makefile, after the ifeq stuff, but I end up with the x64 binary again.

Are there any simple recipes to cross-compile MAME, in particular for a Raspberry?

Re: How to cross-compile [Re: mizapf] #114653
02/11/19 11:50 AM
02/11/19 11:50 AM
Joined: Apr 2005
Posts: 556
GERMANY
Darkstar Offline
Senior Member
Darkstar  Offline
Senior Member
Joined: Apr 2005
Posts: 556
GERMANY
I think you also need to set CROSS_BUILD:=1 in the makefile, and override the compilers/linkers with your cross toolchain (i.e. OVERRIDE_CC:=arm-unknown-linux-gnueabihf-cc or whatever prefix the Raspberry Pi Cross Compiler uses)

Re: How to cross-compile [Re: mizapf] #114654
02/11/19 12:44 PM
02/11/19 12:44 PM
Joined: Mar 2001
Posts: 16,163
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,163
USA
ChoccyHobNob posts Pi and macOS binaries with hardware video acceleration: https://choccyhobnob.com/mame-0-206/

And they have a great guide to compiling for the Pi: https://choccyhobnob.com/compiling-mame-on-raspberry-pi/

Re: How to cross-compile [Re: mizapf] #114656
02/11/19 02:53 PM
02/11/19 02:53 PM
Joined: May 2007
Posts: 548
Germany
M
mizapf Offline OP
Senior Member
mizapf  Offline OP
Senior Member
M
Joined: May 2007
Posts: 548
Germany
OK, thanks, looks promising.

Re: How to cross-compile [Re: mizapf] #114855
03/16/19 01:00 PM
03/16/19 01:00 PM
Joined: May 2007
Posts: 548
Germany
M
mizapf Offline OP
Senior Member
mizapf  Offline OP
Senior Member
M
Joined: May 2007
Posts: 548
Germany
Interestingly, I cannot run the benchmark on the Pi. It is running with software rendering, though.

Code
michael@raspi03:~/mame0206b_rPi $ ./mame ti99_4ae -video none -sound none -str 10
Ignoring MAME exception: Error on creating renderer: Couldn't find matching render driver

Fatal error: Error on creating renderer: Couldn't find matching render driver

Re: How to cross-compile [Re: mizapf] #114856
03/16/19 01:15 PM
03/16/19 01:15 PM
Joined: Mar 2001
Posts: 16,163
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,163
USA
Choccy's page has instructions on how to get hardware rendering, which is pretty much necessary. (You have to rebuild SDL, basically).


Who's Online Now
1 registered members (nerd4gw), 146 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,645
Posts113,189
Members4,842
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.047s Queries: 14 (0.023s) Memory: 5.6238 MB (Peak: 5.8119 MB) Zlib enabled. Server Time: 2019-04-20 04:50:42 UTC