English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.FS-UAE (https://eab.abime.net/forumdisplay.php?f=122)
-   -   Compiling FS-UAE for Apple Silicon (https://eab.abime.net/showthread.php?t=106154)

cloverskull 08 March 2021 01:43

Compiling FS-UAE for Apple Silicon
 
Hi Frode,

I'm trying to compile FS-UAE following the instructions here. My architecture is Apple Silicon.

After installing the dependencies with brew, I received errors because the SDL2 libs are in a different place. What I had to do to circumvent this was do the following for the `./configure` portion:

Code:

SDL2_CFLAGS=/opt/homebrew/include/SDL2 SDL2_LIBS=/opt/homebrew/lib ./configure
This got me quite a bit farther along but then it failed with an error I can't work past:

Code:

ld: can't map file, errno=22 file '/opt/homebrew/include/SDL2' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [gen/genlinetoscr] Error 1

Any thoughts where to go from here?

FrodeSolheim 08 March 2021 08:46

/opt/homebrew/include/SDL2
is not a valid compiler argument (and neither is
/opt/homebrew/lib
a valid link argument). If you want do it this way, you need to use
SDL2_CFLAGS="-I/opt/homebrew/include/SDL2"
(etc).

However, this is not the best way to do that. Instead, you can probably do
Code:

export PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig
before running configure, so that the `pkg-config` program finds your SDL2 installation and spits out the correct compiler and linker option for you.

(Perhaps also try referring to the Homebrew docs for other tips about how to use Homebrew libraries when compiling other software? I'm assuming that exists...)

cloverskull 08 March 2021 09:26

There's something wonky with the Apple Silicon implementation of brew and clearly there need to be some kinks worked out. Eventually I did get it to build. I also did a brief test to see if it would launch and that was successful. I didn't do any real end to end tests or anything :)

I'm currently in the process of trying to get fs-uae-launcher to build - it's worth mentioning I can't get pyqt5 to install via pip3 and had to use brew to install it.

Also, in spite of having installed pillow, I had to pip3 install image to get fs-uae-launcher to compile.

Finally, I'm having problems launching fs-uae from fs-uae-launcher. I'm in ~/Development, and I have ~/Development/fs-uae/ as well as ~/Development/fs-uae-launcher/. When I'm in ~/Development and launch fs-uae-launcher by typing `fs-uae-launcher/fs-uae-launcher` it does launch, but then when I click "Start" to launch an instance of fs-uae, I get the following error:

Task: RunnerTask
Error: Exception
Message: Could not install file 891E9A54.rom:
Did not find file with SHA-1 checksum 891e9a547772fe0c6c19b610baf8bc4ea7fcb785

The log file may contain more details.

I haven't had much of a chance to delve into log files, it's after midnight here and I need to be up in less than eight hours. But if you have any pointers, let me know :)

FrodeSolheim 08 March 2021 20:16

Quote:

Originally Posted by cloverskull (Post 1468434)
Also, in spite of having installed pillow, I had to pip3 install image to get fs-uae-launcher to compile.

https://pypi.org/project/image/ seems to be something else. I assume this just had the side-effect of installing pillow as a dependency...

Quote:

Originally Posted by cloverskull (Post 1468434)
Task: RunnerTask
Error: Exception
Message: Could not install file 891E9A54.rom:
Did not find file with SHA-1 checksum 891e9a547772fe0c6c19b610baf8bc4ea7fcb785

The log file may contain more details.

I haven't had much of a chance to delve into log files, it's after midnight here and I need to be up in less than eight hours. But if you have any pointers, let me know :)

This is simply a message about the default kickstart file not being found. FS-UAE itself automatically chooses the internal kickstart replacement in this case. Right now, the Launcher requires the kickstart, and the error message is simply not very friendly at the moment :)

Eisengrim 08 March 2021 20:50

I managed to compile FS-UAE with the SDL workarounds, but when I compile FS-UAE Launcher I can't get past a "mach-o but wrong architecture" error. My installed Python is 3.8.5 despite installing 3.9.1, maybe that has something to do with it.

FrodeSolheim 08 March 2021 21:50

Quote:

Originally Posted by Eisengrim (Post 1468626)
My installed Python is 3.8.5 despite installing 3.9.1, maybe that has something to do with it.

That is a very reasonable assumption. You should definitively run that 3.9.1 version that supports Apple silicon...

(You need to uninstall 3.8.5, or manipulate the PATH, or invoke 3.9.1 by absolute path, or something similar to ensure you're running the version you're interested in running...)

cloverskull 09 March 2021 20:09

Quote:

Originally Posted by FrodeSolheim (Post 1468613)
This is simply a message about the default kickstart file not being found. FS-UAE itself automatically chooses the internal kickstart replacement in this case. Right now, the Launcher requires the kickstart, and the error message is simply not very friendly at the moment :)

Gotcha. :)

Where shall I put the kickstart to at least work around this quickly? I haven't had much time to iterate here sadly.

One interesting point is that building the application package will be different; everything now needs to be signed by the publisher so there's no running homebrew applications or independently created applications via app icons unless you change security settings from the Apple equivalent of a BIOS menu :P For better or worse this is now the world we're in so I guess we'll have to figure out how to work with this.

Jason H 12 March 2021 12:10

Quote:

Originally Posted by cloverskull (Post 1468434)
...Eventually I did get it to build.

Despite installing all dependencies, I failed to build a Universal Binary of FS-UAE myself. Care to share your's? Cheers.

cloverskull 12 March 2021 17:37

I’m happy to do so Sunday evening (USA California time) as I’m currently on a little vacation and not near my computer :)

I can share fs-uae as well as fs-uae-launcher, however, I did not get the full app package to build so these will have to be launched from CLI.

Jason H 12 March 2021 19:23

Brilliant!

cloverskull 15 March 2021 16:57

Thanks for waiting - here's a link for ya:

https://drive.google.com/drive/folde...R8?usp=sharing

cloverskull 26 March 2021 23:06

@Jason_H - did you test this out?

Jason H 27 March 2021 18:03

Quote:

Originally Posted by cloverskull (Post 1473356)
@Jason_H - did you test this out?

Hi - yeh, thanks for the uploads. I managed to run it once, but after that it fails to load for me again.. Not sure what's gone wrong. I was looking to see if it picked up my joystick attached to my Mac, but it didn't.

Jason H 15 April 2021 20:37

Quote:

Originally Posted by cloverskull (Post 1473356)
@Jason_H - did you test this out?

I did not give up on this... I managed to get FS-UAE running in the end and finally able to confirm my USB controller (iBUFFALO Gamepad) working under Mac Silicon!

Thanks again cloversull.

cloverskull 16 April 2021 17:44

Oh, nice! I haven't touched it in a while. I'll mess with it more this weekend.


All times are GMT +2. The time now is 05:27.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.08751 seconds with 11 queries