-
Notifications
You must be signed in to change notification settings - Fork 128
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
Unable to load shared library 'MonoPosixHelper' or one of its dependencies #223
Comments
Hi @JonDouglas, could you describe how you are attempting to use the tool as well as the version of the tool? I was unable to reproduce the issue on an Intel Mac also running macOS Ventura 13.2.1. |
Here's some more details. Might be ARM/m1 related. Apple M1 Max Reproduction:
|
Same problem on my machine. Apple M2 Pro |
Same issue Apple M1 Pro / macOS 13.4. Happy to help diagnose / test fix if helpful. |
Same issue Apple M1 Max / macOS 13.4.1 |
Hello @Hackmodford what method are you using to download the tool? I was able to run the tool on an M1/macOS 13.4.1 by using the following commands: curl -Lo sbom-tool https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-osx-x64 Could you try this as a workaround and provide us with how you are currently trying to install the tool. Thanks. |
I was using the global dotnet tool version. I am getting farther with the file you provided. |
@sebasgomez238 this error occurs if the incorrect runtime was specified during the build process. This issue only affects ARM based Macs. dotnet publish src/Microsoft.Sbom.Tool/Microsoft.Sbom.Tool.csproj --configuration Release --output bin --runtime osx-arm64 -p:SelfContained=true -p:OFFICIAL_BUILD=true -p:MinVerVersionOverride=1.1.8 -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false If the above command is used to build the CLI it will result in the error below. I've set the
If instead of the runtime being set to
The issue here is that the
Footnotes |
@sebasgomez238 we think you've been working on this, is there an update? |
@shawnfunke Thank you for the details! We have a branch that has a fix for this if you're willing to try it out. https://github.com/microsoft/sbom-tool/tree/users/segomez/mono-posix-update |
@sebasgomez238 that doesn't seem to work. I've compiled it locally and ran the following command: ./bin/Microsoft.Sbom.Tool generate -b ~/tmp/sbom-tool/ -bc ~/tmp/sbom-tool/ -pn TestProject -pv 1.2.3 -ps ASD -nsb http://null.shawnfunke.dev This is the output from the command execution:
|
@sebasgomez238 I've replaced the package PS: You've used tabs instead of spaces in the
|
Reopening this issue. This change will be reverted in the latest release as it is causing issues when running the tool in a container. We will re-evaluate and implement a different solution. Docs have been updated as well to reflect this. |
@shawnfunke tagging you for awareness. It is also worth noting that since this issue had been resolved we also updated the sdk to dotnet 7.0.400 so it is possible the tool will still be compatible for this scenario. |
@sebasgomez238 that is odd, what kind of issues? Note that reverting this will break the package - such as the Homebrew Formulae - downstream. |
@shawnfunke "Unable to load shared library 'Mono.Unix' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libMono.Unix: No such file or directory" When running on an alpine docker image. It seems like it is currently not supported by the Mono.Unix library so we will be reverting back to Mono.Posix.NETStandard until we find a solution. |
@sebasgomez238 what if the dependency is set using conditions based on the current operating system? That should then fix the issue for both of these use-cases. |
I feel the same, it has broke the arm builds for the last two releases. |
We are planning to move to .NET 8 and that will fix this issue |
@chenrui333 @shawnfunke v1.8.0 was released yesterday. We are now targeting .NET 6 and 8. The net8.0 runtime fixes the issue for arm builds. Feel free to try it out and let me know if you encounter any issues. I will update the docs and close this issue after that. Keep in mind that the version of .NET required to build our tool is 8.0.100-rc.2.23502.2. |
@sebasgomez238 that does not seem to work on my end if compiled with the specified .NET 8 release candidate:
|
@sebasgomez238, actually I take that back, it does work. There were some problems that caused it to fail for me. The Also a note, not directly related to this - the install documentation here for MacOS is incorrect whenever .NET is already installed through other means. Instead of
|
I'm unable to use the
sbom-tool
on macOS Ventura 13.2.1 as the tool immediately fails with the latest version of 0.3.3 with the following message:Might be related to #114 and #123
The text was updated successfully, but these errors were encountered: