goomba icon indicating copy to clipboard operation
goomba copied to clipboard

How do I build on AppleSilicon

Open Naville opened this issue 2 years ago • 5 comments

Hey: I've downloaded z3 release for arm64-osx and followed the setup instructions, however:

clang++ -m64 -arch x86_64 -mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -dynamiclib -compatibility_version 1.0 -current_version 1.0 -single_module -o ../../bin/plugins/goomba.dylib obj/x64_mac_clang_32/goomba.o obj/x64_mac_clang_32/heuristics.o obj/x64_mac_clang_32/smt_convert.o obj/x64_mac_clang_32/linear_exprs.o obj/x64_mac_clang_32/msynth_parser.o obj/x64_mac_clang_32/bitwise_expr_lookup_tbl.o obj/x64_mac_clang_32/optimizer.o obj/x64_mac_clang_32/equiv_class.o obj/x64_mac_clang_32/file.o -L../../lib/x64_mac_clang_32/ -lida -Wl,-dead_strip -Wl,-map,obj/x64_mac_clang_32/goomba.dylib.map -Wl,-install_name,goomba.dylib -lpthread -liconv -L../../bin/ -lz3
ld: warning: ignoring file ../../bin//libz3.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

I'm not sure why it's building for macOS-x86_64 and is not familiar with ida sdk's build system enough to fix it

Naville avatar Jan 27 '23 02:01 Naville

Please try the ida-cmake PR I made. It would be a good test case as well.

From before, I know ida-cmake works for all platforms include Apple Silicon, so goomba should build equally.

If you got it working, report back please.

If you need help, let me know.

0xeb avatar Jan 27 '23 06:01 0xeb

Yeah your PR works, I kept this issue to urge HR to do sth with your PR

Naville avatar Jan 27 '23 06:01 Naville

Great, thanks for confirming.

Yes, my PR will be merged either tomorrow or next week. I see no reason why not.

0xeb avatar Jan 27 '23 06:01 0xeb

you need to use __ARM__=1 for Apple Silicon build.

skochinsky avatar Jan 27 '23 09:01 skochinsky