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

Replace Mono.Posix.NETStandard with Mono.Unix #2781

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Jun 16, 2024

Description

A test followup to #2780, in the hope that replacing the old Mono.Posix.NetStandard with the newer Mono.Unix will work better on ARM macs and help get the CI builds working again.
(I don't have an ARM mac to test with, so I'm guessing at some of this)

@Numpsy Numpsy changed the title Mono unix Replace Mono.Posix.NETStandard with Mono.Unix Jun 16, 2024
@Numpsy Numpsy mentioned this pull request Jun 16, 2024
@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 16, 2024

The way that the macOS tests timing out causes the Linux tests to abort is ever so slightly not helpful :-(

@xperiandri
Copy link
Collaborator

I have Mac M2. Do I just need to build and check if the build succeeds?

@xperiandri
Copy link
Collaborator

Why does it try to find something from net8.0 on CI?

@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 16, 2024

I have Mac M2. Do I just need to build and check if the build succeeds?

Some of the integration tests seem to be getting an exception thrown from

Mono.Unix.UnixPath.GetRealPath(dotnetTool) |> Path.GetDirectoryName
on the macOS runner. Maybe try calling that on an ARM mac and see if it works?

This change seems to avoid that error, though the CI run still fails.

@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 16, 2024

I tried another build with a longer timeout at https://github.com/Numpsy/FAKE/actions/runs/9537030314 and the Windows run passed, but macOS and Linux both timed out running the integration tests, not sure why that is.

Why does it try to find something from net8.0 on CI?

Looks like some of the NuGet packages that it's installing have .NET 8 libs in them now and that causes warnings due to the old version of Paket in use, I don't know besides that.

@xperiandri
Copy link
Collaborator

I had the same until I applied my fix above

@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 18, 2024

Hmm, looking at the CI logs for the mac build in more detail I see there's also this

DllNotFoundException: Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libSQLite.Interop.dll, 0x0001): tried: 'libSQLite.Interop.dll' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSQLite.Interop.dll' (no such file), '/usr/lib/libSQLite.Interop.dll' (no such file, not in dyld cache), 'libSQLite.Interop.dll' (no such file), '/usr/local/lib/libSQLite.Interop.dll' (no such file), '/usr/lib/libSQLite.Interop.dll' (no such file, not in dyld cache)

from the issue #2007 - native libs work, so maybe that's another issue with a native lib on the ARM host?

@xperiandri
Copy link
Collaborator

I thought it runs on x64 on CI

@Numpsy Numpsy marked this pull request as draft June 18, 2024 10:20
@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 18, 2024

I thought it runs on x64 on CI

The macOS-Latest runners are now using M1 CPUs - one of the effects of #2773 is to put in back to the older runners on Intel CPUs

@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 18, 2024

Why does it try to find something from net8.0 on CI?

Actually, the integration tests at

[ testCase "Make sure dotnet installer works in paths with spaces - #2319"
install the latest version of the .NET SDK, which is a moving target (there is a lot of stuff going on in here)

@xperiandri
Copy link
Collaborator

I expect that workaround that I mentioned has to work

@Thorium
Copy link
Member

Thorium commented Jul 15, 2024

#2783 could help this one as well.

@Numpsy
Copy link
Contributor Author

Numpsy commented Jul 15, 2024

When looking for info about problems with Mono.Posix.NetStandard on ARM macs, I found microsoft/sbom-tool#223 which suggests that they tried changing it to Mono.Unix to fix macOS ARM builds, but that broke it on Alpine Linux, so I'm not sure how good of an idea this would be if that's the case?
(there are also comments about that tool being fixed on .NET 8, but it looks like that's by removing the Mono.Posix dependency in that TFM rather that the .NET version fixing it directly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants