OpenSSL-for-iPhone icon indicating copy to clipboard operation
OpenSSL-for-iPhone copied to clipboard

The macOS M1 chip does not compile

Open sliderss opened this issue 3 years ago • 1 comments

截屏2022-08-03 17 05 30 截屏2022-08-03 17 05 42

sliderss avatar Aug 03 '22 09:08 sliderss

Which Xcode version? Are you compiling on an M1 chip device?

x2on avatar Sep 14 '22 12:09 x2on

@x2on - I couldnt compile this on M1 Mac. Any idea how to resolve this?

Xcode Vesion - Version 14.2 (14C18)

Error:

rm -f apps/openssl
${LDCMD:-/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc} -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk -fno-common -fembed-bitcode -mios-version-min=12.0 -O3 -Wall -L. -Wl,-search_paths_first -L/opt/homebrew/opt/llvm/lib \
		-o apps/openssl apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o apps/ocsp.o apps/openssl.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o apps/rsautl.o apps/s_client.o apps/s_server.o apps/s_time.o apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/storeutl.o apps/ts.o apps/verify.o apps/version.o apps/x509.o \
		 apps/libapps.a -lssl -lcrypto  
ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', building for iOS Simulator-x86_64 but attempting to link with file built for macOS-arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [apps/openssl] Error 1
make: *** [all] Error 2

dinbtechit avatar Jan 29 '23 17:01 dinbtechit

@dinbtechit it look like you are using some stuff from homebrew? Shouldn't been used here. Build works fine here on M2 mac.

x2on avatar Jan 30 '23 14:01 x2on

@x2on - Thank you so much! 🙏🙏🙏

After uninstalling llvm I was able to build it successfully.

brew uninstall llvm 

dinbtechit avatar Jan 30 '23 18:01 dinbtechit