opendylan icon indicating copy to clipboard operation
opendylan copied to clipboard

Improve macOS packaging

Open cgay opened this issue 1 year ago • 5 comments

Currently there are a few problems with building, installing, running a release on macOS...

  1. Given we don't yet have native support for Apple silicon, is there a way to build for the x86_64 architecture on an M3 Mac? For now I'm using the Build Release workflow on GitHub to build the release, but this requires manually editing the config.jam file and re-tarring the release because on the GitHub machine xcrun --show-sdk-path returns a version-specific path, currently pointing to version 14.2 of Xcode. (I set it to /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk since my understanding is that this is more general since installing Xcode will also install the command-line tools. We'll see.)
  2. Untarring the release and running the binaries on macOS Sonoma 14.3.1 results in a security pop-up: "dylan-environment cannot be opened because the developer cannot be verified." This is easy enough to work around, once for each distinct executable. I think we need to sign our binaries.
  3. Ideally we should be making a real macOS application packaged in a dmg.

cgay avatar Feb 20 '24 03:02 cgay

Re: the first point, I am currently using this to build on macOS, thanks to help from housel and brucem:

CC=/usr/bin/clang DYLANCOMPILER=/Users/cgay/dylan/opendylan-2024.2pre/bin/dylan-compiler ./configure --prefix=${DYLAN}/opendylan-dev --host=x86_64-darwin CFLAGS="-O2 -arch x86_64"

cgay avatar Apr 22 '24 21:04 cgay

Update: I'm also adding the --with-gc=/usr/local/lib flag.

cgay avatar Apr 08 '25 15:04 cgay

How difficult would it be to add support for Apple Silicon?

jolonf avatar Nov 20 '25 02:11 jolonf

From Oct 9 Matrix chat:

https://matrix.to/#/!vrixQDmAvsEcTvrdVu:gitter.im/$wFz8NuBuxZ_xRQd3yxSEaFlLZkSrOOKXhZfvtVXwCrc?via=gitter.im&via=matrix.org&via=amber.tel indicates to me that it is fairly straight-forward.

"The main thing is that enables doing a native aarch64-darwin (Apple Silicon) port, which I got fully working (based on Bruce's initial work last year) in only a couple more hours"

and later...

"From preliminary benchmarking, I estimate a speedup of about 35% for going from Rosetta-executed to native"

My guess is that we might be able to have it in the next release, which is planned for this year, but it depends how much time Peter Housel spends watching Ken Burns documentaries and how much he spends on Dylan. :-)

cgay avatar Nov 20 '25 03:11 cgay

Wow, that would be great to see. I've resisted installing Rosetta on my current Mac.

jolonf avatar Nov 20 '25 03:11 jolonf