Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier build on M1 #577

Closed
wants to merge 3 commits into from
Closed

Easier build on M1 #577

wants to merge 3 commits into from

Conversation

nullobsi
Copy link

Adjust the Makefile, CMakeLists.txt, and the debug source files to make it easier to build on M1 Macs.

It should also be possible to build Universal libraries with CMake, but you'd need to have Universal libraries for SDL/mbedtls/etc to build those hdlls.

See also #521 since hl is broken on arm64.

@skial skial mentioned this pull request Jan 4, 2023
1 task
@waaadim
Copy link

waaadim commented Mar 5, 2023

[edit
this is the only thing that worked for me:
https://community.haxe.org/t/compiling-hashlink-on-macos-apple-silicon/3150
]

it didn't work for me, I used the latest version of hashlink, and ran brew bundle after applying the patch

% cmake --version
cmake version 3.25.2

getting this error on make

opt/homebrew/opt/libuv/include -I /opt/homebrew/opt/openal-soft/include -Dopenal_soft  -DGL_SILENCE_DEPRECATION -arch arm64 -o src/profile.o -c src/profile.c
src/profile.c:159:32: error: no member named '__rip' in 'struct __darwin_arm_thread_state64'
                *eip = (void*)mcontext->__ss.__rip;
                              ~~~~~~~~~~~~~~ ^
src/profile.c:160:32: error: no member named '__rsp' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
                return (void*)mcontext->__ss.__rsp;
                                             ^~~~~
                                             __sp
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:141:13: note: '__sp' declared here
        __uint64_t __sp;    /* Stack pointer x31 */
                   ^
2 errors generated.
make: *** [src/profile.o] Error 1

@tobil4sk
Copy link
Member

tobil4sk commented Mar 5, 2023

getting this error on make

@waaadim Looks like some new changes are needed after #588. If you revert to 3651d51, that was the last commit before the PR was merged, so you could try to apply the patch there.

@Simn
Copy link
Member

Simn commented Nov 18, 2023

Superseded by #611

@Simn Simn closed this Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants