Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 915358

Summary: dev-dotnet/dotnet-sdk-7.0.105-r1 build failure: Generator 'JSExportGenerator' failed to initialize
Product: Gentoo Linux Reporter: ppw0
Component: Current packagesAssignee: dotnet project <dotnet>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/dotnet/runtime/issues/74944
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
runtime.log
emerge --info
emerge --info '=dev-dotnet/dotnet-sdk-7.0.105-r1::gentoo'
Build log for dev-dotnet/dotnet-sdk-7.0.105-r1

Description ppw0 2023-10-08 07:34:26 UTC
Created attachment 872284 [details]
build log

Trying to emerge dev-dotnet/dotnet-sdk-7.0.15-r1 will result in the following error(s):
```
    CSC : warning CS8784: Generator 'JSExportGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Interop.
SourceGeneration, Version=7.0.8.25901, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System
.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    CSC : warning CS8784: Generator 'JSImportGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Interop.
SourceGeneration, Version=7.0.8.25901, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System
.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/CancelablePromise.cs(12,37): error CS8795: Parti
al method 'CancelablePromise._CancelPromise(nint)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebS
ockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs(28,40): error CS8795: Partial method 'Browser
Interop.WebSocketCreate(string, string?[]?, nint, Action<int, string>)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libr
aries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs(44,36): error CS8795: Partial method 'Browser
Interop.WebSocketOpen(JSObject)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/
System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs(48,37): error CS8795: Partial method 'Browser
Interop.WebSocketSend(JSObject, nint, int, int, bool)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.
WebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs(71,37): error CS8795: Partial method 'Browser
Interop.WebSocketReceive(JSObject, nint, int)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSocke
ts.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs(82,37): error CS8795: Partial method 'Browser
Interop.WebSocketClose(JSObject, int, string?, bool)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.W
ebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs(89,36): error CS8795: Partial method 'Browser
Interop.WebSocketAbort(JSObject)' must have an implementation part because it has accessibility modifiers. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src
/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
        250 Warning(s)
        7 Error(s)
```

Possibly related to https://github.com/dotnet/runtime/issues/74944.

Attaching logs.
Comment 1 ppw0 2023-10-08 07:36:38 UTC
Created attachment 872285 [details]
runtime.log
Comment 2 ppw0 2023-10-08 07:38:43 UTC
Created attachment 872286 [details]
emerge --info
Comment 3 Markus Ewald 2023-12-12 17:29:11 UTC
I am observing the same issue, with dev-dotnet/dotnet-sdk-7.0.105-r1.

It does seem to build Microsoft.Interop.SourceGeneration.dll for .NET Standard 2.0:
```
Microsoft.Interop.SourceGeneration -> /var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/artifacts/bin/Microsoft.Interop.SourceGeneration/Release/netstandard2.0/Microsoft.Interop.SourceGeneration.dll
```

But later on in the build, it's unable to reference it:
```
CSC : warning CS8784: Generator 'JSExportGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Interop.SourceGeneration, Version=7.0.8.25901, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
    CSC : warning CS8784: Generator 'JSImportGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Interop.SourceGeneration, Version=7.0.8.25901, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/var/tmp/portage/dev-dotnet/dotnet-sdk-7.0.105-r1/work/dotnet-sdk-7.0.105/src/runtime/artifacts/source-build/self/src/src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj::TargetFramework=net7.0-Browser]
```
Comment 4 Markus Ewald 2023-12-12 17:32:31 UTC
Created attachment 878945 [details]
emerge --info '=dev-dotnet/dotnet-sdk-7.0.105-r1::gentoo'
Comment 5 Markus Ewald 2023-12-12 17:33:43 UTC
Created attachment 878946 [details]
Build log for dev-dotnet/dotnet-sdk-7.0.105-r1
Comment 6 Maciej Barć gentoo-dev 2023-12-12 17:35:31 UTC
Hello Markus!

Do you have the same issue with .NET 8.0? 
If so please pen a new bug report.

From-source is gone from the ::gentoo tree due to security vulnerabilities.
For your security please do not use the 7.0.105 version and update your projects 
that you control to 8.0.