File OpenSCTokenApp.xcodeproj/project.pbxproj sets location for OpenSSL include files and libraries (actually, only libcrypto.a).
Asa result, if bootstrap script locates a suitable OpenSSL that's already installed on the system (via Macports, in my case), the build fails:
Fails to compile, because cannot find include file <openssl/opensslv.h>. Could get through by manually adding the correct include files location to the .xcodeproj - but it is not a correct workaround (see below).
Then it fails to start linking because it fails to locate the library $SRCROOT/openssl/lib/libcrypto.a. Removing this dependency and relying on $OPENSSL_LIBS did not help - linking failed with unresolved symbols.
To get past this, I had to modify the bootstrap script, forcing it to always build OpenSSL from the source (ugly, but it works).
Proposed solution
If possible - make the .xcodeproj use and depend upon $OPENSSL_CFLAGS and $OPENSSL_LIBS. If not - modify the bootstrap script to always build from the source, so xcodebuild always finds the headers and the library exactly where it is expecting them.
Problem
File
OpenSCTokenApp.xcodeproj/project.pbxproj
sets location for OpenSSL include files and libraries (actually, onlylibcrypto.a
).Asa result, if
bootstrap
script locates a suitable OpenSSL that's already installed on the system (via Macports, in my case), the build fails:<openssl/opensslv.h>
. Could get through by manually adding the correct include files location to the.xcodeproj
- but it is not a correct workaround (see below).$SRCROOT/openssl/lib/libcrypto.a
. Removing this dependency and relying on$OPENSSL_LIBS
did not help - linking failed with unresolved symbols.To get past this, I had to modify the
bootstrap
script, forcing it to always build OpenSSL from the source (ugly, but it works).Proposed solution
If possible - make the
.xcodeproj
use and depend upon$OPENSSL_CFLAGS
and$OPENSSL_LIBS
. If not - modify thebootstrap
script to always build from the source, soxcodebuild
always finds the headers and the library exactly where it is expecting them.