Yubico / Yubico.NET.SDK

A YubiKey SDK for .NET developers
Apache License 2.0
96 stars 48 forks source link

Can't build Yubico.NativeShims on osx-arm64 #76

Closed thomnico closed 1 week ago

thomnico commented 2 months ago

The error is here: [ 28%] Building C object CMakeFiles/Yubico.NativeShims.dir/ssl.bignum.c.o /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/ssl.bignum.c:9:1: error: cannot combine with previous 'type-name' declaration specifier void Native_BN_new(void) ^ 1 error generated.

See fulll logs bellow : Yubico.NativeShims % sh build-macOS.sh ~/vcpkg ~/src/Yubico.NET.SDK/Yubico.NativeShims Already on 'master' Your branch is up to date with 'origin/master'. Already up to date. warning: neither vcpkg.json nor vcpkg-configuration.json exist to update. ~/src/Yubico.NET.SDK/Yubico.NativeShims -- Running vcpkg install Detecting compiler hash for triplet arm64-osx... Detecting compiler hash for triplet x64-osx... The following packages will be built and installed: openssl[core]:x64-osx -> 3.2.1#2

-- Running vcpkg install - done -- The C compiler identification is AppleClang 15.0.0.15000309 -- The CXX compiler identification is AppleClang 15.0.0.15000309 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_STACK_PROTECTOR_ALL -- Performing Test HAVE_STACK_PROTECTOR_ALL - Success -- -fstack-protector-all support detected Checking for PCSC with Mac linkage PCSC_WINSCARD_H_FOUND: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PCSC.framework/Headers/winscard.h HAVE_PCSC_WINSCARD_H: ON PCSC_MACOSX_LIBS: -Wl,-framework -Wl,PCSC PCSC_LIBRARIES: -Wl,-framework -Wl,PCSC PCSC_CFLAGS: BACKEND_PCSC: ON HAVE_PCSC_WINSCARD_H: ON -- Found OpenSSL: /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/build64/vcpkg_installed/x64-osx/lib/libcrypto.a (found version "3.2.1") INFOIPO is enabled. -- Configuring done (4.6s) -- Generating done (0.0s) -- Build files have been written to: /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/build64 [ 14%] Building C object CMakeFiles/Yubico.NativeShims.dir/pcsc.c.o [ 28%] Building C object CMakeFiles/Yubico.NativeShims.dir/ssl.bignum.c.o /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/ssl.bignum.c:9:1: error: cannot combine with previous 'type-name' declaration specifier void Native_BN_new(void) ^ 1 error generated. gmake[2]: [CMakeFiles/Yubico.NativeShims.dir/build.make:90: CMakeFiles/Yubico.NativeShims.dir/ssl.bignum.c.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:83: CMakeFiles/Yubico.NativeShims.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 cp: ./build64/libYubico.NativeShims.dylib: No such file or directory -- Running vcpkg install Detecting compiler hash for triplet arm64-osx... The following packages will be built and installed: openssl[core]:arm64-osx -> 3.2.1#2

-- Running vcpkg install - done -- The C compiler identification is AppleClang 15.0.0.15000309 -- The CXX compiler identification is AppleClang 15.0.0.15000309 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_STACK_PROTECTOR_ALL -- Performing Test HAVE_STACK_PROTECTOR_ALL - Success -- -fstack-protector-all support detected Checking for PCSC with Mac linkage PCSC_WINSCARD_H_FOUND: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PCSC.framework/Headers/winscard.h HAVE_PCSC_WINSCARD_H: ON PCSC_MACOSX_LIBS: -Wl,-framework -Wl,PCSC PCSC_LIBRARIES: -Wl,-framework -Wl,PCSC PCSC_CFLAGS: BACKEND_PCSC: ON HAVE_PCSC_WINSCARD_H: ON -- Found OpenSSL: /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/buildarm/vcpkg_installed/arm64-osx/lib/libcrypto.a (found version "3.2.1") INFOIPO is enabled. -- Configuring done (3.0s) -- Generating done (0.0s) -- Build files have been written to: /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/buildarm [ 14%] Building C object CMakeFiles/Yubico.NativeShims.dir/pcsc.c.o [ 28%] Building C object CMakeFiles/Yubico.NativeShims.dir/ssl.bignum.c.o /Users/nicolasthomas/src/Yubico.NET.SDK/Yubico.NativeShims/ssl.bignum.c:9:1: error: cannot combine with previous 'type-name' declaration specifier void Native_BN_new(void) ^ 1 error generated. gmake[2]: [CMakeFiles/Yubico.NativeShims.dir/build.make:90: CMakeFiles/Yubico.NativeShims.dir/ssl.bignum.c.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:83: CMakeFiles/Yubico.NativeShims.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 cp: ./buildarm/libYubico.NativeShims.dylib: No such file or directory

GregDomzalski commented 2 months ago

Thanks for the report! Not sure how this one snuck past our CI.

We will address this soon.

DennisDyallo commented 3 weeks ago

Hi! As most people don't build this SDK themselves and we're starved for time, we are not able to prioritize this investigation. I hope to notify you as soon as we pick it up though.

Thanks for the report.