Closed tobil4sk closed 2 months ago
For any changes involving submodules, please start with the 8.2.0 branch and submit changes to that branch.
The branch includes a build guide that may help debug, but still feel free to ask if not.
Created a new branch based on 8.2.0 as suggested. The linker error was due to a problem with the libpixman patch, which I have explained in more detail here: https://github.com/openfl/libpixman/pull/1.
I've created a new PR with the 8.2.0 based branch, which allows for a successful build of the lime.ndll on arm64 Mac with haxelib run lime rebuild mac -DHXCPP_ARM64
: #1642. This also requires the most recent development version of hxcpp. I've pasted the installation instructions in case anyone is interested:
Since the ndll is still loaded from the Mac64
path for now, we had to move the new arm64 binary:
cd $(haxelib libpath lime)
rm ndll/Mac64/lime.ndll
cp ndll/MacArm64/lime-64.ndll ndll/Mac64/lime.ndll
We also ran into this issue: #1750. ~~We managed to work around it by creating symlinks in /usr/local/bin
and /usr/local/lib
, see:
https://brettterpstra.com/2022/09/28/homebrew-and-slash-usr-slash-local-slash-bin-on-m1-macs/~~.
UPDATE: It looks like /usr/local/lib
may no longer be a default path for dyld anymore, see #1750.
Despite having to use these awkward workarounds, openfl test mac -DHXCPP_ARM64
now successfully runs our project. UPDATE: Seems to only build successfully with the -clean
flag.
how whould i build the macos arm64 dll on a x86_64 and i have xcode
For some reason after installing the lime fork and doing all the steps, I got a segmentation fault
openfl test html5 -DHXCPP_ARM64
Could not link to neko.
Called from lime/_internal/backend/native/NativeCFFI.hx line 613
Called from lime/system/CFFI.hx line 171
Called from lime/system/CFFI.hx line 294
Uncaught exception - Segmentation fault
If I put the MacArm64/lime-64.ndll
into ndll/Mac/lime.ndll
Is seems to work, but only for:
openfl test mac -DHXCPP_ARM64
openfl test html5 -DHXCPP_ARM64
@ido-pluto The html5 target doesn't use hxcpp or lime.ndll so there is no need to build here with the -DHXCPP_ARM64
flag. However, it does seem odd that this causes a segmentation fault, there could be something wrong with the conditional compilation in my PR.
Lime does use the ndll when building, which could explain the error.
If so, there's a second solution: the -eval
flag skips lime.ndll when building. The flag was only recently merged into 8.2.0-Dev, so you'd need to pull that first.
👋 Ran into this as well - any closer to this being resolved?
Use the x86 version of haxe without brew (from the website). This works without any issue
Ah will give this a go - thanks!
Use the x86 version of haxe without brew (from the website).
Related: Any chance we could get the x86 version on homebrew?
Related: Any chance we could get the x86 version on homebrew?
I learned a while back that there are now two different versions of Homebrew. One for Intel and one for Apple Silicon, and you can actually install both on the same computer.
I needed the Intel version on my M1 Mac to locally build HashLink binaries a while back, and I mentioned what I did to install Intel Hombrew on the Haxe forums. Maybe it'll help you out.
https://community.haxe.org/t/compiling-hashlink-on-macos-apple-silicon/3150
Now that the PRs have been merged, it is possible to build lime.ndll
on apple silicon and build and run projects, with the following requirements:
haxelib git lime https://github.com/openfl/lime
haxelib git swf https://github.com/openfl/swf
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
Then run:
lime rebuild swf
lime rebuild mac
So I think it's time to close this issue!
how whould i build the macos arm64 dll on a x86_64 and i have xcode
Also, in the develop branch you can now pass the -arm64
flag to do this:
lime rebuild mac -arm64
Same requirements as above (particularly for hxcpp).
Love to see this completed
Created this to keep track of the status of native Apple Silicon builds of the lime.ndll.
Todo:
develop
branch is missing this patch, but this is applied inDev-8.2.0
, in f200ecd9cae9ed45a1f8c23f3229fac74a608d9e/opt/homebrew/lib
as an rpath for arm64 mac builds of lime.ndll: https://github.com/openfl/lime/issues/1750After applying these patches, it is possible to build the ndll and build/run projects as expected.