dotnet / dotnet/macios

Using PCSC nuget makes linking fail with clang error 1

Open
#15,118 12 comments 0 reactions 0 assignees View on GitHub
bug Mac Catalyst
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 17h
Merged PRs (30d)
108

Description

When trying to use PCSC 6.0.0 nuget ( https://www.nuget.org/packages/PCSC/ https://github.com/danm-de/pcsc-sharp) in a MAUI MacCatalyst project build will fail with clang error 1.
With Maui preview 14 it was possible to successfully build (with same project and same PCSC nuget version)

### Steps to Reproduce

1. Create new maui project (dotnet new maui -n MauiPCSC)
2. Add reference to PCSC 6.0.0 nuget
3. Build against MacCatalyst target (dotnet build -f net6.0-maccatalyst -v d /bl:msbuild.binlog)

### Expected Behavior
Successful build

### Actual Behavior
Build fails in the linking stage
```
Build failed: error : clang++ exited with code 1
Tool xcrun execution finished (exit code = 1).
ld: building for Mac Catalyst, but linking in .tbd built for macOS, file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks//PCSC.framework/PCSC.tbd' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

### Environment

Version information
Visual Studio Enterprise 2022 for Mac Preview
Version 17.3 Preview (17.3 build 191)
Installation UUID: f7a2a130-2329-430a-8fcc-3d90486174aa

Runtime
.NET 6.0.3 (64-bit)
Architecture: Arm64

Roslyn (Language Service)
4.2.0-3.22181.8+a59a22c6f3c2cc1883e20cece412209f18f4a29f

NuGet
Version: 6.0.0.262

.NET SDK (Arm64)
SDK: /usr/local/share/dotnet/sdk/6.0.300/Sdks
SDK Version: 6.0.300
MSBuild SDKs: /usr/local/share/dotnet/sdk/6.0.300/Sdks

.NET SDK (x64)
SDK Version: 3.1.419

.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 6.0.5

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
6.0.5
6.0.4
6.0.3
6.0.2
6.0.1
5.0.17
5.0.16
5.0.15
5.0.14
5.0.13
3.1.25
3.1.24
3.1.23
3.1.22

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode 13.4 (20503)
Build 13F17a

Xamarin.Mac
Version: 8.10.0.1 (Visual Studio Enterprise)
Hash: 568bdb24e
Branch: d17-2
Build date: 2022-04-08 18:52:56-0400

Xamarin Designer
Version: 17.3.0.70
Hash: 4cf1a2208
Branch: remotes/origin/d17-3
Build date: 2022-05-19 16:00:39 UTC

Xamarin.iOS
Version: 15.10.0.1 (Visual Studio Enterprise)
Hash: 568bdb24e
Branch: d17-2
Build date: 2022-04-08 18:52:57-0400

Xamarin.Android
Version: 12.3.99.58 (Visual Studio Enterprise)
Commit: xamarin-android/main/64b22fc
Android SDK: /Users/olssonch/Library/Xamarin/android-sdk-macosx
Supported Android versions:
12.0 (API level 31)
11.0 (API level 30)

SDK Command-line Tools Version: 5.0
SDK Platform Tools Version: 31.0.3
SDK Build Tools Version: 30.0.3

Build Information:
Mono: adf1bc4
Java.Interop: xamarin/java.interop/release/6.0.3xx@2a882d2d
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.38.2@7b1e016
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@fc3c2ac

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.2.0.47
Hash: d6dd135
Branch: remotes/origin/dev/tondat/main-1512059~2
Build date: 2022-05-19 16:00:33 UTC

Android Device Manager
Version: 0.0.0.1127
Hash: 4bb4d48
Branch: remotes/origin/dev/tondat/main-1536295~1
Build date: 2022-05-19 16:00:33 UTC

Build Information
Release ID: 1703000191
Git revision: 6e028abf3763bf8fde618c0de2c24b1091eb76d8
Build date: 2022-05-19 15:58:40+00
Build branch: release-17.3
Build lane: release-17.3

Operating System
Mac OS X 12.3.1
Darwin 21.4.0 Darwin Kernel Version 21.4.0
Fri Mar 18 00:46:32 PDT 2022
root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64

### Build Logs

[msbuild.binlog.zip](https://github.com/xamarin/xamarin-macios/files/8770981/msbuild.binlog.zip)

### Example Project (If Possible)

[MauiPCSC.zip](https://github.com/xamarin/xamarin-macios/files/8771004/MauiPCSC.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.