Apple M1 support


Questions, Explanations, Howtos

erf

Lair Larrikin

Posts: 24

Joined: Wednesday, 22nd April 2015, 19:11

Post Thursday, 19th November 2020, 09:50

Apple M1 support

Will crawl support the new Apple M1 chip?

Dungeon Master

Posts: 349

Joined: Monday, 18th August 2014, 20:04

Post Thursday, 19th November 2020, 14:57

Re: Apple M1 support

Good question! I hope the answer is sooner or later yes, but this will basically depend on someone getting their hands on one and figuring out what it takes to build on it, either a dev or a contributor who is willing to submit a PR. I expect that eventually I'll get one of these myself, they seem very cool, but I don't know if I'll get a gen 1. It's possible that the build will already more or less work; we don't currently support arm but actually the debian folks do build on several arm architectures in an automated test and I believe the former dev who still maintains that process uses linux on arm. Raspberry Pi arm builds also are known to work I think. One major factor will be whether/how our dependencies (SDL, lua, etc) need to be updated, since not all arms are the same.

I can unfortunately almost certainly promise that seeds won't be stable across this architecture without a bunch of effort though.

erf

Lair Larrikin

Posts: 24

Joined: Wednesday, 22nd April 2015, 19:11

Post Thursday, 19th November 2020, 19:10

Re: Apple M1 support

Thanks for your answer!

I will have my machine in a week. I can do some experimentation and report back. If we can't build a native version, i think it still can be converted using Rosetta 2.

Dungeon Master

Posts: 349

Joined: Monday, 18th August 2014, 20:04

Post Thursday, 19th November 2020, 19:31

Re: Apple M1 support

Oh, yeah I should add that from everything I've read I expect that the current builds will work without problems on Rosetta 2 (unless there are weird gatekeeper issues). I've even seen benchmark descriptions where some (higher-end than dcss) games apparently ran better on M1 under rosetta, so I don't expect speed problems.

Please do report back if you can!

erf

Lair Larrikin

Posts: 24

Joined: Wednesday, 22nd April 2015, 19:11

Post Monday, 23rd November 2020, 18:44

Re: Apple M1 support

Hi again,

I was able to build crawl when I opened a terminal using Rosetta, but I was not able to run it.

When trying to build using a terminal without Rosetta I got the following error:

```
src/atomic/SDL_spinlock.c:103:12: error: implicit declaration of function
'OSAtomicCompareAndSwap32Barrier' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
```

I was able to download and run a pre-built macOS version from the website. All the non-M1 apps are automatically translated using Rosetta.

The new M1 MacBook Air is super fast!

Later.

Dungeon Master

Posts: 349

Joined: Monday, 18th August 2014, 20:04

Post Tuesday, 24th November 2020, 19:37

Re: Apple M1 support

Thanks for the report. For the build error I suspect that that could be fixed if the 64 bit version is used in the relevant file in the SDL2 contrib -- it looks like before the following commit, SDL2 didn't properly handle 64 bit mac builds:

http://lists.libsdl.org/pipermail/commi ... 01497.html

Updating the contrib in dcss would probably fix this as well.

Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.