Comments (14)
I didn't do much research, who wants to make it happen?
from openssl.
Had some progress. This seems to be the magic trick: -target x86_64-apple-ios-macabi -miphoneos-version-min=13.0
. Add it to CFLAGS
and LDFLAGS
.
from openssl.
I did some more digging, it looks like you use a subfolder in the MacOSX SDK with a x86_64-apple-ios13.0-macabi
target. Here are some nuggets I found in the raw build logs for compiling a C file in a static lib:
Compiling
-target x86_64-apple-ios13.0-macabi
-isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
-isystem /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/include
-iframework /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/System/Library/Frameworks
Linking
-syslibroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
-L/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/lib
-L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/uikitformac
CompileC /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/Objects-normal/x86_64/CrossTest.o /Users/xxxxxx/Desktop/Marzipan/CrossTwo/CrossTest.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target: CrossTwo)
cd /Users/xxxxxx/Desktop/Marzipan
export LANG=en_US.US-ASCII
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target x86_64-apple-ios13.0-macabi -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fmodules -fmodules-cache-path=/Users/xxxxxx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/xxxxxx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DDEBUG=1 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Index/DataStore -iquote /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/CrossTwo-generated-files.hmap -I/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/CrossTwo-own-target-headers.hmap -I/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/CrossTwo-all-non-framework-target-headers.hmap -ivfsoverlay /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/all-product-headers.yaml -iquote /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/CrossTwo-project-headers.hmap -I/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Products/Debug-uikitformac/include -isystem /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/include -I/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/DerivedSources-normal/x86_64 -I/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/DerivedSources/x86_64 -I/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/DerivedSources -F/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Products/Debug-uikitformac -iframework /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/System/Library/Frameworks -MMD -MT dependencies -MF /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/Objects-normal/x86_64/CrossTest.d --serialize-diagnostics /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/Objects-normal/x86_64/CrossTest.dia -c /Users/xxxxxx/Desktop/Marzipan/CrossTwo/CrossTest.c -o /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/Objects-normal/x86_64/CrossTest.o
Libtool /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Products/Debug-uikitformac/libCrossTwo.a normal x86_64 (in target: CrossTwo)
cd /Users/xxxxxx/Desktop/Marzipan
export MACOSX_DEPLOYMENT_TARGET=10.15
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Products/Debug-uikitformac -L/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/lib -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/uikitformac -L/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/iOSSupport/usr/lib -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/uikitformac -filelist /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Intermediates.noindex/Marzipan.build/Debug-uikitformac/CrossTwo.build/Objects-normal/x86_64/CrossTwo.LinkFileList -o /Users/xxxxxx/Library/Developer/Xcode/DerivedData/Marzipan-gbnckgdrmlikahasegoldvxdkpif/Build/Products/Debug-uikitformac/libCrossTwo.a
from openssl.
If you have anything working, I'm happy to see it. Starting with PR would be great to collaborate I think.
from openssl.
Linking a stackoverflow question I created already. Hopefully it will steer some traffic.
https://stackoverflow.com/questions/56459036/how-does-one-build-a-openssl-library-for-uikitformac
from openssl.
Any progress update?
Could we provide static libcrypto lib for UIKit on mac?
from openssl.
I guess we need a script to build a xcframework structure. I didn't dig it much yet by myself.
from openssl.
@chrisballinger Could you provide a proper sh script to build libcrypto.a from public source?
It should be compatible with UIKit for mac. Seems like export CFLAGS="-target x86_64-apple-ios-macabi -miphoneos-version-min=13.0"
is not enough and I'm having trouble to use resulted static lib in UIKitForMac env. Then I could help u with Universal xcframework script.
from openssl.
@hellc Here's a hacky WIP where OpenSSL is compiled in another context: https://github.com/ursachec/CPAProxy/compare/marzipan
from openssl.
Has anyone succeeded with this? Our catalyst app is like 99% ready appart from OpenSSL lib which we haven't achieved to build yet. Thanks
from openssl.
I haven't tried it, but I'm interested in working and confirmed solution to include and release
from openssl.
Any update on using this OpenSSL cocoapod in Catalyst?
from openssl.
Hello, are there any updates on this?
from openssl.
Catalyst build is here as of 1.1.180 🎊
from openssl.
Related Issues (20)
- Legacy Provider support? HOT 1
- SHA1 crashes when digesting big data HOT 1
- OpenSSL 3.1.4 HOT 1
- Where to get opensslconf-arm64.h? HOT 1
- Cannot find 'BIO_set_conn_hostname' in scope HOT 1
- Privacy Manifest and Signature HOT 11
- Big git .pack file HOT 5
- where X509_get_notAfter HOT 1
- Getting ITMS-90482: Invalid Executable from Apple HOT 4
- Add support for apple watch / watchos HOT 5
- Require Apple Release - Privacy Manifest and Signature for third-party frameworks HOT 1
- Apple Silicon (arm64) and iphone-simulator builds HOT 2
- Missing type definitions when building for simulator HOT 1
- ERROR ITMS-90711: "Invalid executable permissions" HOT 5
- 3.1.5 Signing error HOT 1
- 3.1.5 s.ios.deployment_target = '14.0' is too heigh HOT 2
- OpenSSL 3.2.1 is available HOT 2
- 1.1.0e support privacy agreement and sign HOT 2
- 3.1.5 Needs to incorporate Privacy Manifest in Podspec HOT 3
- Privacy Manifest in 3.1.5000 is invalid HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openssl.