Open elliott5 opened 2 years ago
In good news, hl
compiled on OSX/X86 runs on OSX/M1, provided that libhl.dylib
is also moved with it ... and both installed at the usual locations.
I can get my "hello world" program (generated with HashLink/C) to compile and link correctly by adding an -arch x86_64
flag.
Which then runs correctly on my M1 Mac (via the magic of Rosetta 2).
gcc -O3 -o hello -std=c11 out/main.c -I ./../hashlink-1.12/src -I ./out -lhl -L /usr/local/lib -arch x86_64
Might be relevant: https://github.com/HaxeFoundation/hashlink/issues/457
Hi, I'm curious - is anybody working on aarch64 JIT at the moment? Unfortunately calling C compiler is not convenient for my use case, and NekoVM is marked as deprecated :( Thanks!
In my case, make just outputs this:
make: ./hl: Command not found
cc -Wall -O3 -I src -msse2 -mfpmath=sse -std=c11 -D LIBHL_EXPORTS -m64 -I include -I /usr/local/include -I /usr/local/opt/libjpeg-turbo/include -I /usr/local/opt/jpeg-turbo/include -I /usr/local/opt/sdl2/include -I /usr/local/opt/libvorbis/include -I /usr/local/opt/openal-soft/include -Dopenal_soft -DGL_SILENCE_DEPRECATION -o include/pcre/pcre2_auto_possess.o -c include/pcre/pcre2_auto_possess.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
error: unknown FP unit 'sse'
make: *** [include/pcre/pcre2_auto_possess.o] Error 1
Though Hashlink still does not work, make will succeed now on Apple Silicon now that this PR is merged and compiling to C works: https://github.com/HaxeFoundation/hashlink/commit/dacd8fb13fa16185a8b658c049b4081adcdc241c
try
make clean
make uninstall
then
edit ~/.zprofile
or ~/.bash_profile
use x86 brew package
export PATH="/usr/local/bin:$PATH"
then
arch -x86_64 make
sudo arch -x86_64 make install
work for me
brew bundle
seems to work,make
fails: