Use osx-x64 for mac rid rather than macos.#5288
Merged
NikolajBjorner merged 1 commit intoZ3Prover:masterfrom May 20, 2021
Symbolica:master
Merged
Use osx-x64 for mac rid rather than macos.#5288NikolajBjorner merged 1 commit intoZ3Prover:masterfrom Symbolica:master
NikolajBjorner merged 1 commit intoZ3Prover:masterfrom
Symbolica:master
Conversation
Contributor
|
Thanks!! |
Contributor
Author
|
@NikolajBjorner thanks for merging so quickly. Do you publish nightlies for the NuGet package? To be able to test properly I really need to be able to install a specific version from NuGet and make sure that the dylib is in the correct folder to be picked up when running on mac. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hit an issue today when using the Microsoft.Z3.x64 package in a .NET 5.0 project and running the tests for my project on mac. Specifically it throws the following exception when running the tests.
After probing about in
MyTestProject/bin/x64/Debug/net5.0/runtimesI noticed that thez3lib.dylibwas under a folder calledmacosand that theMyTestProject.deps.jsonfile was pointing to this location for themacosrid. However, checking with the Microsoft documentation on which runtime identifiers are officially supported it seems thatmacosis not a well known value. Insteadosx-x64is the base rid for mac, as detailed here.Also running
dotnet --infoon my machine reveals my specificridto be:It seems that NuGet generates the
MyProject.deps.jsonrid mappings based on the folder structure in the NuGet package and that the package is installed at~/.nuget/packages/microsoft.z3.x64/4.8.10/. Inspecting that location showed again that under theruntimesfolder there was amacosfolder which contained thelibz3.dylibfile. If I copied / renamed this folder toosx-x64, and then re-ran the tests in my project it was properly able to locateliibz3.dylib.Therefore, I think the fix is to ensure that when the nuget package is created the
libz3.dylibfile is placed underosx-x64rather thanmacos.I've attempted a fix here, but I'm not completely certain I've identified the right places to ensure that the packaging is now done correctly.