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

v1.12 make fails on maxOS Monterey 12.5.1 M1 cpu #557

Open
elliott5 opened this issue Aug 23, 2022 · 7 comments
Open

v1.12 make fails on maxOS Monterey 12.5.1 M1 cpu #557

elliott5 opened this issue Aug 23, 2022 · 7 comments

Comments

@elliott5
Copy link

brew bundle seems to work, make fails:

% brew bundle
==> Tapping homebrew/bundle
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-bundle'...
remote: Enumerating objects: 6720, done.
remote: Counting objects: 100% (794/794), done.
remote: Compressing objects: 100% (192/192), done.
remote: Total 6720 (delta 666), reused 677 (delta 602), pack-reused 5926
Receiving objects: 100% (6720/6720), 1.55 MiB | 4.10 MiB/s, done.
Resolving deltas: 100% (3952/3952), done.
Tapped 1 command (98 files, 1.9MB).
Installing cmake
Installing jpeg-turbo
Installing libpng
Installing sdl2
Installing libogg
Installing libvorbis
Installing openal-soft
Installing mbedtls@2
Installing libuv
Installing openssl
Installing sqlite
Homebrew Bundle complete! 11 Brewfile dependencies now installed.

% make
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/SDL2 -I /usr/local/opt/libvorbis/include -I /usr/local/opt/openal-soft/include -Dopenal_soft  -DGL_SILENCE_DEPRECATION -o include/pcre/pcre_chartables.o -c include/pcre/pcre_chartables.c 
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
error: unknown FP unit 'sse'
make: *** [include/pcre/pcre_chartables.o] Error 1
@elliott5
Copy link
Author

elliott5 commented Aug 23, 2022

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.

@elliott5
Copy link
Author

elliott5 commented Aug 23, 2022

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 

@tobil4sk
Copy link
Member

Might be relevant: #457

@curldivergence
Copy link

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!

@danielo515
Copy link

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

@wynan
Copy link
Contributor

wynan commented Dec 3, 2023

Though Hashlink still does not work, make will succeed now on Apple Silicon now that this PR is merged and compiling to C works: dacd8fb

@yz-xlame
Copy link

yz-xlame commented Aug 19, 2024

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

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

No branches or pull requests

6 participants