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

Build fails in windows container image #197

Open
dr1rrb opened this issue Nov 14, 2023 · 2 comments
Open

Build fails in windows container image #197

dr1rrb opened this issue Nov 14, 2023 · 2 comments
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.

Comments

@dr1rrb
Copy link
Member

dr1rrb commented Nov 14, 2023

Current behavior

Referencing Uno.Resizetizer in an app make the app impossible to build in a windows container:

Resizetizer is not working in windows docker

C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): warning : Uno.Resizetizer0000 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:  ---> System.DllNotFoundException: Unable to load library 'libSkiaSharp'. [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.LibraryLoader.LoadLocalLibrary[T](String libraryName) in D:\a\1\s\binding\Binding.Shared\LibraryLoader.cs:line 38 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SkiaApi.<>c.<.cctor>b__1831_0() in D:\a\1\s\binding\Binding\SkiaApi.cs:line 15 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.CreateValue() [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.get_Value() [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SkiaApi.GetSymbol[T](String name) in D:\a\1\s\binding\Binding\SkiaApi.cs:line 18 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SkiaApi.sk_colortype_get_default_8888() in D:\a\1\s\binding\Binding\SkiaApi.generated.cs:line 4404 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SKImageInfo..cctor() in D:\a\1\s\binding\Binding\SKImageInfo.cs:line 46 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    --- End of inner exception stack trace --- [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Svg.Skia.SKSvgSettings..ctor() in /_/src/Svg.Skia/SKSvgSettings.cs:line 22 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Svg.Skia.SKSvg..ctor() in /_/src/Svg.Skia/SKSvg.Model.cs:line 55 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\SkiaSharpSvgTools.cs:line 23 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\SkiaSharpTools.cs:line 11 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.Resizer.Rasterize(DpiPath dpi, String destination) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\Resizer.cs:line 118 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.Resizer.Resize(DpiPath dpi, String inputsFile) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\Resizer.cs:line 111 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.ResizetizeImages_552eeb6d5ef9c18a8d0018d00fb258048e099b8d.ProcessImageResize(ResizeImageInfo img, DpiPath[] dpis, ConcurrentBag`1 resizedImages) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\ResizetizeImages.cs:line 254 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.ResizetizeImages_552eeb6d5ef9c18a8d0018d00fb258048e099b8d.<>c__DisplayClass58_0.<ExecuteAsync>b__0(ResizeImageInfo img) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\ResizetizeImages.cs:line 103 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.<ParallelForEach>b__0(TSource s) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\AsyncTaskExtensions.cs:line 21 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]

Build FAILED.

C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): warning : Uno.Resizetizer0000 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:  ---> System.DllNotFoundException: Unable to load library 'libSkiaSharp'. [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.LibraryLoader.LoadLocalLibrary[T](String libraryName) in D:\a\1\s\binding\Binding.Shared\LibraryLoader.cs:line 38 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SkiaApi.<>c.<.cctor>b__1831_0() in D:\a\1\s\binding\Binding\SkiaApi.cs:line 15 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.CreateValue() [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at System.Lazy`1.get_Value() [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SkiaApi.GetSymbol[T](String name) in D:\a\1\s\binding\Binding\SkiaApi.cs:line 18 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SkiaApi.sk_colortype_get_default_8888() in D:\a\1\s\binding\Binding\SkiaApi.generated.cs:line 4404 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at SkiaSharp.SKImageInfo..cctor() in D:\a\1\s\binding\Binding\SKImageInfo.cs:line 46 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    --- End of inner exception stack trace --- [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Svg.Skia.SKSvgSettings..ctor() in /_/src/Svg.Skia/SKSvgSettings.cs:line 22 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Svg.Skia.SKSvg..ctor() in /_/src/Svg.Skia/SKSvg.Model.cs:line 55 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\SkiaSharpSvgTools.cs:line 23 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\SkiaSharpTools.cs:line 11 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.Resizer.Rasterize(DpiPath dpi, String destination) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\Resizer.cs:line 118 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.Resizer.Resize(DpiPath dpi, String inputsFile) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\Resizer.cs:line 111 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.ResizetizeImages_552eeb6d5ef9c18a8d0018d00fb258048e099b8d.ProcessImageResize(ResizeImageInfo img, DpiPath[] dpis, ConcurrentBag`1 resizedImages) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\ResizetizeImages.cs:line 254 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.ResizetizeImages_552eeb6d5ef9c18a8d0018d00fb258048e099b8d.<>c__DisplayClass58_0.<ExecuteAsync>b__0(ResizeImageInfo img) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\ResizetizeImages.cs:line 103 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
C:\Users\ContainerUser\.nuget\packages\uno.resizetizer\1.2.0\build\Uno.Resizetizer.targets(430,3): error Uno.Resizetizer0000:    at Uno.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.<ParallelForEach>b__0(TSource s) in D:\a\uno.resizetizer\uno.resizetizer\src\Resizetizer\src\AsyncTaskExtensions.cs:line 21 [C:\src\App\MyApp\MyApp.csproj::TargetFramework=net7.0]
    1 Warning(s)
    1 Error(s)

Expected behavior

WASM app can be built in a docker container

How to reproduce it (as minimally and precisely as possible)

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
COPY . .
RUN dotnet build "src/App/MyApp/MyApp.Wasm.csproj" -c Release
@dr1rrb dr1rrb added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Nov 14, 2023
@jeromelaban jeromelaban changed the title Build fails in windows conatienr image Build fails in windows container image Nov 14, 2023
@dr1rrb
Copy link
Member Author

dr1rrb commented Feb 1, 2024

@pictos Any update on this ?

@pictos
Copy link
Contributor

pictos commented Feb 1, 2024

@dr1rrb sorry, I didn't look at this one specifically. But there are some improvements on Windows head, can you try the latest preview package and see if that works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

No branches or pull requests

2 participants