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

Mac support with M1 processor (darwin, arm64) #56

Open
victorpaleologue opened this issue Jun 16, 2022 · 19 comments
Open

Mac support with M1 processor (darwin, arm64) #56

victorpaleologue opened this issue Jun 16, 2022 · 19 comments

Comments

@victorpaleologue
Copy link

When using the VSCode PDDL extension, I am given the opportunity to download and configure a pre-built VAL tool. The matching binary is not found for my platform: Mac OS on an M1 processor (darwin, arm64).
I reported the issue there jan-dolejsi/vscode-pddl#127, however I feel like this issue is that the VAL release for that platform is missing.

@victorpaleologue
Copy link
Author

Can I help? I am at ease with CMake and GitHub Actions.
I would have tried out updating the Azure pipeline, but I cannot find the relevant YAML file.
If someone can point at where to start, I could do something.

@DerekLong101
Copy link
Contributor

DerekLong101 commented Jun 16, 2022 via email

@victorpaleologue
Copy link
Author

FYI it compiles well on Mac, all we need is a release.
I'm still available for help.

@DerekLong101
Copy link
Contributor

DerekLong101 commented Jul 13, 2022 via email

@jan-dolejsi
Copy link
Contributor

Can I help? I am at ease with CMake and GitHub Actions. I would have tried out updating the Azure pipeline, but I cannot find the relevant YAML file. If someone can point at where to start, I could do something.

Yes, you can definitely help. Modifying the azure pipeline to harvest and publish the binary artifacts would be the simplest change at the end. The hard part is to change the build scripts, so they produce the arm binaries. You can see the azure-pipeline.yml in the root of the repo. It is simply calling ./scripts/build_linux_windows.sh and ./scripts/build_macos.sh on ubuntu and MacOS respectively. The arm64 script should be added either to the build_linux_windows.sh, if the compilation for arm64 can be done on linux, or as a separate build_arm64.sh script, which we would add to the pipeline to run on hosted arm64 pool (not sure it exists).

The pipeline then runs over there: https://dev.azure.com/schlumberger/ai-planning-validation/_build?definitionId=2

@DerekLong101
Copy link
Contributor

DerekLong101 commented Jul 13, 2022 via email

@victorpaleologue
Copy link
Author

victorpaleologue commented Jul 27, 2022

You can see the azure-pipeline.yml in the root of the repo.

Sorry but I cannot find that file. Could you provide me a link to it?

@jan-dolejsi
Copy link
Contributor

Oh, my bad. I did not realize the pipeline file was only in my fork. Looking closer, it was work I started and did not finish. It only includes the build job for linux and windows (targeting linux build machine). But it would eventually include the MacOS job too. The build pipeline that we currently run on Azure DevOps is using the infrastructure that predates yaml.

Nevertheless, what is needed for the M1 processor binaries is a build script first. Adding it to the pipeline would just mean calling the new script from using an additional task in the pipeline. Like what you can see on the line 17.

@victorpaleologue
Copy link
Author

victorpaleologue commented Jul 28, 2022

Alright, I've put myself on it, but... Microsoft-hosted Azure agents for Mac OS do not seem to be running on M1 processors:

Agents that run macOS images are provisioned on Mac pros with a 3 core CPU, 14 GB of RAM, and 14 GB of SSD disk space.

Knowing that M1 processors have many more CPU cores, this hardware is certainly x86_64. GitHub runners have the same hardware specs, btw, and they are explicit on the architecture being x86_64.

I checked scripts/build_macos.sh and it works fine already. But I won't be able to get your CI pipeline run it. Sorry, I genuinely hoped to help =/

However I can think of Conan and ConanCenter, which are dedicated to distribute portable native binaries to every platform. They do produce MacOS arm64 releases, and VAL could be distributed there too. Another big advantage of Conan is that if the binary is missing, it has access to all the recipes to rebuild it for the current host.
But that does not really fit the workflow of the PDDL plug-in for VSCode.

@jan-dolejsi
Copy link
Contributor

@victorpaleologue are you saying that the script scripts/build_macos.sh produces binaries that you can run on the new shiny Mac?
Or only if you run the build locally, while the macos binaries that come out of the pipeline are not compatible?

Yes the pipeline can be fixed eventually. Looks like Microsoft is working on the sup6 for M1 build machines.

I am not against an alternative build and download location. Ad long as the platform specific binaries can be downloaded from a fixed url. Ideally the version should ge part of the url too.

@victorpaleologue
Copy link
Author

@victorpaleologue are you saying that the script scripts/build_macos.sh produces binaries that you can run on the new shiny Mac? Or only if you run the build locally, while the macos binaries that come out of the pipeline are not compatible?

Yes, running the script on a new shiny Mac builds a binary compatible with new shiny Macs. But the ones that come out of the pipeline, built on older-but-perhaps-still-shiny Macs, are not compatible.

Yes the pipeline can be fixed eventually. Looks like Microsoft is working on the sup6 for M1 build machines.

I am not against an alternative build and download location. Ad long as the platform specific binaries can be downloaded from a fixed url. Ideally the version should ge part of the url too.

Ok. I could publish my release someplace that won't move, but building manually next versions would be annoying. IMO it has to be automated, and rely on a machine dedicated for that. So I'd rather wait for Microsoft's support...

@DerekLong101
Copy link
Contributor

DerekLong101 commented Aug 3, 2022 via email

@DavidKaub
Copy link

Any updates on this so far?

@victorpaleologue
Copy link
Author

Azure support for arm64-powered MacOS has not changed.
I did not take time to produce my own release. I cannot tell when I can do this.
In the meantime you will have to rebuild it yourself, it should build fine.

@victorpaleologue
Copy link
Author

Would you be interested by having it available through Conan?

@victorpaleologue
Copy link
Author

Still no change. If someone wants a manual release, let me know.
I'll let this sit in the meantime.

@DavidKaub
Copy link

A manual release would be welcome! Thanks

@victorpaleologue
Copy link
Author

There it is.
You need to unzip it somewhere and configure the PDDL extension to use the binary called Validate.
Val--Darwin.tar.gz
Val--Darwin.zip

@Asriel31
Copy link

Asriel31 commented Oct 3, 2024

my Norton antivirus have intercepted pdf file from pdf file from val--Darwin.tar.gz, it seems this file is not safe :/

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

No branches or pull requests

5 participants