Previous Thread
Next Thread
Print Thread
How to cross-compile #114652 02/11/19 11:41 AM
Joined: May 2007
Posts: 548
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 548
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
Joined: Apr 2005
Posts: 558
Darkstar Offline
Senior Member
Offline
Senior Member
Joined: Apr 2005
Posts: 558
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
Joined: Mar 2001
Posts: 16,277
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,277
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
Joined: May 2007
Posts: 548
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 548
OK, thanks, looks promising.

Re: How to cross-compile [Re: mizapf] #114855 03/16/19 01:00 PM
Joined: May 2007
Posts: 548
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 548
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
Joined: Mar 2001
Posts: 16,277
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,277
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
2 registered members (TSCHAK, nerd4gw), 149 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,675
Posts113,814
Members4,859
Most Online418
Aug 14th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3