frankmorgner / vsmartcard

umbrella project for emulation of smart card readers or smart cards
http://frankmorgner.github.io/vsmartcard/
684 stars 197 forks source link

Unable to build virtual smart card on OSX 13 Ventura #248

Closed kockas closed 1 year ago

kockas commented 1 year ago

Expected behaviour

Following list of commands should work

autoreconf --verbose --install
autoupdate
./configure --enable-infoplist
make osx

What should happen?

Sucessful build

Actual behaviour

What happens instead? If not using pcsc-lite package configure phase fails:

checking whether make supports nested variables... (cached) yes
configure: WARNING: libpcsclite not found by pkg-config
ls: /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs: No such file or directory
checking for ifdhandler.h... no
configure: error: ifdhandler.h not found, install libpcsclite or use ./configure PCSC_CFLAGS=...

Steps to reproduce

  1. autoreconf --verbose --install
  2. autoupdate
  3. ./configure --enable-infoplist

If however I install brew install pcsc-lite And set:

export LDFLAGS="-L/opt/homebrew/opt/pcsc-lite/lib"
export CPPFLAGS="-I/opt/homebrew/opt/pcsc-lite/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/pcsc-lite/lib/pkgconfig"

I successfully finish configure phase.

make fails almost immediately:

/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in src
Making all in vpcd
make[3]: Nothing to be done for `all'.
Making all in vpicc
  GEN      vicc
  GEN      vicc.1
Making all in ifd-vpcd
  CCLD     libifdvpcd.la
Undefined symbols for architecture arm64:
  "_log_msg", referenced from:
      _IFDHCreateChannel in libifdvpcd_la-ifd-vpcd.o
      _IFDHCreateChannelByName in libifdvpcd_la-ifd-vpcd.o
      _IFDHControl in libifdvpcd_la-ifd-vpcd.o
      _IFDHCloseChannel in libifdvpcd_la-ifd-vpcd.o
      _IFDHGetCapabilities in libifdvpcd_la-ifd-vpcd.o
      _IFDHSetCapabilities in libifdvpcd_la-ifd-vpcd.o
      _IFDHSetProtocolParameters in libifdvpcd_la-ifd-vpcd.o
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libifdvpcd.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

make osx works much longer obviously compiling openssl yet the result is:

  "_vfprintf", referenced from:
      _OPENSSL_showfatal in libcrypto.a(cryptlib.o)
  "_write$UNIX2003", referenced from:
      _raw_write_stdout in apps.o
      _conn_write in libcrypto.a(bss_conn.o)
      _conn_puts in libcrypto.a(bss_conn.o)
      _dgram_write in libcrypto.a(bss_dgram.o)
      _fd_write in libcrypto.a(bss_fd.o)
      _sock_write in libcrypto.a(bss_sock.o)
      _RAND_query_egd_bytes in libcrypto.a(rand_egd.o)
      ...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[6]: *** [link_app.] Error 1
make[5]: *** [openssl] Error 2
make[4]: *** [build_apps] Error 1
make[3]: *** [osx] Error 2
make[2]: *** [osx] Error 2
make[1]: *** [osx] Error 2
make: *** [osx] Error 2

Environment:

OSX Ventura 13.2 XCode 14.2

Brew used for packages: autoconf automake libtool help2man gengetopt pcsc-lite

Thank you for any help.

frankmorgner commented 1 year ago

duplicate of https://github.com/frankmorgner/vsmartcard/issues/242

Please try to report if the suggested solution there works for you.