x2on / OpenSSL-for-iPhone

A script for compiling OpenSSL for iOS Devices (iPhone, iPad, Watch, iPod Touch, AppleTV, MacCatalyst)
https://www.felixschulze.de
Apache License 2.0
2.48k stars 828 forks source link

error Unable to determine target or target not included in OpenSSL build #187

Closed frerr closed 2 years ago

frerr commented 4 years ago

When I run build-libssl.sh, .a could be created successfully.

But when I put "include" and .a into Xcode project, error is occurred:“error Unable to determine target or target not included in OpenSSL build”

My MAC iOS version is 10.15.3

截屏2020-02-19下午3 00 31

Logs:

CompileC /Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/Objects-normal/x86_64/sm3hash.o /Users/wubing/codinglearn/Leecode/Learn\ Leecode/SM3hash_openssl/SM3hash_openssl/sm3hash.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'SM3hash_openssl' from project 'SM3hash_openssl') cd /Users/wubing/codinglearn/Leecode/Learn\ Leecode/SM3hash_openssl export LANG=en_US.US-ASCII /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target x86_64-apple-macos10.15 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fmodules -gmodules -fmodules-cache-path=/Users/wubing/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/wubing/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.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/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Index/DataStore -iquote /Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/SM3hash_openssl-generated-files.hmap -I/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/SM3hash_openssl-own-target-headers.hmap -I/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/SM3hash_openssl-all-target-headers.hmap -iquote /Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/SM3hash_openssl-project-headers.hmap -I/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Products/Debug/include -I/Users/wubing/Downloads/OpenSSL-for-iPhone-master/include -I/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/DerivedSources-normal/x86_64 -I/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/DerivedSources/x86_64 -I/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/DerivedSources -F/Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Products/Debug -MMD -MT dependencies -MF /Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/Objects-normal/x86_64/sm3hash.d --serialize-diagnostics /Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/Objects-normal/x86_64/sm3hash.dia -c /Users/wubing/codinglearn/Leecode/Learn\ Leecode/SM3hash_openssl/SM3hash_openssl/sm3hash.c -o /Users/wubing/Library/Developer/Xcode/DerivedData/SM3hash_openssl-favcdvldsfzgilgpspyhmoodduom/Build/Intermediates.noindex/SM3hash_openssl.build/Debug/SM3hash_openssl.build/Objects-normal/x86_64/sm3hash.o

In file included from /Users/wubing/codinglearn/Leecode/Learn Leecode/SM3hash_openssl/SM3hash_openssl/sm3hash.c:9: In file included from /Users/wubing/Downloads/OpenSSL-for-iPhone-master/include/openssl/evp.h:13: /Users/wubing/Downloads/OpenSSL-for-iPhone-master/include/openssl/opensslconf.h:22:3: error: Unable to determine target or target not included in OpenSSL build

error Unable to determine target or target not included in OpenSSL build

^ In file included from /Users/wubing/codinglearn/Leecode/Learn Leecode/SM3hash_openssl/SM3hash_openssl/sm3hash.c:9: In file included from /Users/wubing/Downloads/OpenSSL-for-iPhone-master/include/openssl/evp.h:14: In file included from /Users/wubing/Downloads/OpenSSL-for-iPhone-master/include/openssl/ossl_typ.h:19: In file included from /Users/wubing/Downloads/OpenSSL-for-iPhone-master/include/openssl/e_os2.h:13: /Users/wubing/Downloads/OpenSSL-for-iPhone-master/include/openssl/opensslconf.h:22:3: error: Unable to determine target or target not included in OpenSSL build

error Unable to determine target or target not included in OpenSSL build

^

geeksia1 commented 4 years ago

I'm also facing same issue with Xcode 11.5