Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS: OpenSCToken fails to build from inside OpenSC directory #26

Closed
mouse07410 opened this issue Feb 5, 2020 · 1 comment
Closed

Comments

@mouse07410
Copy link

MacOS Mojave 1014.6, Xcode-11.3.1, everything fresh.

When OpenSCToken is being built by OpenSC as a part of the OpenSC "main" build, the process fails. First, there's a conflict between the pre-installed OpenSSL (via Brew, Macports, or manually) and the Xcode project that expects to find OpenSSL headers and libraries in a certain place (as opposed to following what pkg-config returned). Described in #25.

Then, the build fails for me with this:

. . . . .
openpace 1.1.0 has been configured with following options:

Libraries:               //lib
CVC directory:           /Applications/OpenSCTokenApp.app/Contents/PlugIns/OpenSCToken.appex/Contents/Resources
X.509 directory:         /Applications/OpenSCTokenApp.app/Contents/PlugIns/OpenSCToken.appex/Contents/Resources

Host:                    x86_64-apple-darwin18.7.0
Compiler:                clang
Preprocessor flags:      
Compiler flags:           -isysroot /Applications/Xcode-9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -arch x86_64
Linker flags:            
Libraries:               
CRYPTO_CFLAGS:           -I/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openssl//include
CRYPTO_LIBS:             -L/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openssl//lib -lcrypto

HELP2MAN:                /opt/local/bin/help2man
GENGETOPT:               /opt/local/bin/gengetopt

Install patched OpenSSL: no
GIT:                     
OPENSSL_CONFIGURE_FLAGS: 

SWIG:                    
Python Bindings:         no
PYTHON:                  
Java Bindings:           no
JAVA_CFLAGS:             
JAVACFLAGS:              
Ruby Bindings:           no
RUBY:                    
Go Bindings:             no
gccgo:                   
GCCGOFLAGS:              
SWIGGOPARAMS:            

+ make DESTDIR=/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openpace install
Making install in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-recursive
Making install in docs
Making install in _static
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
Making install in certs
make[4]: Nothing to be done for `install-exec-am'.
/opt/local/bin/gmkdir -p "/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openpace/Applications/OpenSCTokenApp.app/Contents/PlugIns/OpenSCToken.appex/Contents/Resources"
for cert in ff3d20d2; do /opt/local/bin/ginstall -c -m 644 ./${cert} "/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openpace/Applications/OpenSCTokenApp.app/Contents/PlugIns/OpenSCToken.appex/Contents/Resources"; done
/opt/local/bin/gmkdir -p "/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openpace/Applications/OpenSCTokenApp.app/Contents/PlugIns/OpenSCToken.appex/Contents/Resources"
for cert in DECVCAeID00102 DECVCAEPASS00102 DECVCAeSign00102;   do /opt/local/bin/ginstall -c -m 644 ./${cert} "/Users/ur20980/src/OpenSC-test/OpenSCToken/build/openpace/Applications/OpenSCTokenApp.app/Contents/PlugIns/OpenSCToken.appex/Contents/Resources";  done
  CC       cvc_print-cvc-print.o
  CC       cvc_print-cvc-print-cmdline.o
  CCLD     cvc-print
  CC       cvc_create-cvc-create.o
  CC       cvc_create-cvc-create-cmdline.o
  CCLD     cvc-create
make -C . cvc-create
make[4]: `cvc-create' is up to date.
/opt/local/bin/help2man \
		--output=cvc-create.1 \
		--no-info \
		--source='OpenPACE 1.1.0' \
		./cvc-create
sh: line 1: 29593 Abort trap: 6           ./cvc-create --help 2> /dev/null
help2man: can't get `--help' info from ./cvc-create
Try `--no-discard-stderr' if option outputs to stderr
make[3]: *** [cvc-create.1] Error 134
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1

Interestingly, this only happens when I enable OpenSCToken build as a part of the OpenSC build, and it clones OpenSCToken into the OpenSC directory. If I clone OpenSCToken to a location where it cannot find an existing OpenSC source and is forced to clone it afresh (doesn't matter whether it clones OpenSC/OpenSC.git or my fork mouse07410/OpenSC.git), the build succeeds and produces a usable OpenSCToken.

mouse07410 added a commit to mouse07410/openpace that referenced this issue Feb 5, 2020
Apparently, `cvc-create --help` outputs to `stderr`. The added `no-discard-stderr` flag makes sure `help2man` completes successfully. 

Resolves frankmorgner/OpenSCToken#26
@mouse07410
Copy link
Author

@frankmorgner I think I found the problem - solution is in frankmorgner/openpace#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant