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 when Powershell fails to load libpsl on M1 mac #4972

Closed
sbomer opened this issue Feb 28, 2022 · 0 comments · Fixed by #4973
Closed

Build fails when Powershell fails to load libpsl on M1 mac #4972

sbomer opened this issue Feb 28, 2022 · 0 comments · Fixed by #4973
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout fixed-in-6.0.200-preview.14.2 Look for this fix in 6.0.200-preview.14.2! platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working

Comments

@sbomer
Copy link
Member

sbomer commented Feb 28, 2022

Description

When running dotnet cake --configuration="Release" -v Diagnostic on my m1 mac, I get:

dotnet-pack
========================================
/usr/local/share/dotnet/dotnet --diagnostics pwsh -NoProfile ./eng/package.ps1 -configuration "Release"
Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception.
---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSSysLogProvider' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libpsl-native' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibpsl-native, 0x0001): tried: 'liblibpsl-native' (no such file), '/usr/local/lib/liblibpsl-native' (no such file), '/usr/lib/liblibpsl-native' (no such file), '/Users/sven/maui/liblibpsl-native' (no such file), '/usr/local/lib/liblibpsl-native' (no such file), '/usr/lib/liblibpsl-native' (no such file)
at System.Management.Automation.Tracing.NativeMethods.OpenLog(IntPtr ident, SysLogPriority facility)
at System.Management.Automation.Tracing.SysLogProvider..ctor(String applicationId, PSLevel level, PSKeyword keywords, PSChannel channels)
at System.Management.Automation.Tracing.PSSysLogProvider..cctor()
--- End of inner exception stack trace ---
at System.Management.Automation.Tracing.PSSysLogProvider..ctor()
at System.Management.Automation.Tracing.PSEtwLog..cctor()
--- End of inner exception stack trace ---
at System.Management.Automation.Tracing.PSEtwLog.LogConsoleStartup()
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)
at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args)

Installing libpsl with homebrew doesn't help. @eerhardt found PowerShell/PowerShell#6858 which may be related.

Steps to Reproduce

dotnet cake --configuration="Release" -v Diagnostic

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

12.2.1

Did you find any workaround?

I found that updating the version of powershell here to 7.2.1 fixed the problem:

"version": "7.1.2",
. Could we permanently update the version to 7.2.1 here?

Relevant log output

No response

@sbomer sbomer added the t/bug Something isn't working label Feb 28, 2022
@sbomer sbomer changed the title Build fails on M1 Mac Build fails when Powershell fails to load libpsl on M1 mac Feb 28, 2022
sbomer added a commit to sbomer/maui that referenced this issue Feb 28, 2022
Redth pushed a commit that referenced this issue Mar 1, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 31, 2022
@samhouts samhouts added the fixed-in-6.0.200-preview.14.2 Look for this fix in 6.0.200-preview.14.2! label Feb 23, 2023
@samhouts samhouts added the platform/macOS 🍏 macOS / Mac Catalyst label Feb 1, 2024
@samhouts samhouts added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout fixed-in-6.0.200-preview.14.2 Look for this fix in 6.0.200-preview.14.2! platform/macOS 🍏 macOS / Mac Catalyst t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants