Skip to content

[GMP] Patch for Apple Silicon#42293

Merged
KristofferC merged 5 commits intoJuliaLang:masterfrom
jeremiahpslewis:patch-gmp-apple-arm
Sep 23, 2021
Merged

[GMP] Patch for Apple Silicon#42293
KristofferC merged 5 commits intoJuliaLang:masterfrom
jeremiahpslewis:patch-gmp-apple-arm

Conversation

@jeremiahpslewis
Copy link
Copy Markdown
Contributor

@jeremiahpslewis jeremiahpslewis commented Sep 17, 2021

GMP appears to need a patch for Arm64, thank you to @domschl for finding this!

Ideally, this will resolve #42184

@jeremiahpslewis jeremiahpslewis marked this pull request as draft September 17, 2021 16:03
@vchuravy
Copy link
Copy Markdown
Member

Can you also add the patch to https://github.com/JuliaPackaging/Yggdrasil/tree/master/G/GMP?

@vchuravy vchuravy added system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips backport 1.7 external dependencies Involves LLVM, OpenBLAS, or other linked libraries labels Sep 17, 2021
@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

@vchuravy Let me see if I can walk this PR to the finish line, and then I’d gladly do the same for Yggrasil…so far this is more of a shot in the dark based on @domschl’s tip. :)

@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

@mryodo Can you test this on your machine and confirm the build now works?

@mryodo
Copy link
Copy Markdown

mryodo commented Sep 17, 2021

@mryodo Can you test this on your machine and confirm the build now works?

Sure! Thanks for the work, man, builds perfectly for me on the 1.8.0-DEV
OpenBLAS is still broken though same as on 1.7.0-**, i've reopened the issue JuliaLang/LinearAlgebra.jl#866

@jeremiahpslewis jeremiahpslewis marked this pull request as ready for review September 17, 2021 17:53
@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

Does anyone know if there are license compatibility issues with incorporating this patch into the Julia repo? Afaict gmp is GPL/LGPL...

@stevengj
Copy link
Copy Markdown
Member

stevengj commented Sep 17, 2021

Can't you just s/x18/x17/g on the file rather than using patch? That will avoid copyright questions. I guess there is no single register rename that works in all the cases?

@stevengj
Copy link
Copy Markdown
Member

stevengj commented Sep 17, 2021

Has someone reported this upstream to gmp-bugs@gmplib.org yet?

@domschl
Copy link
Copy Markdown

domschl commented Sep 17, 2021

@stevengj : The patch was provided by upstream.

Copy link
Copy Markdown
Member

@staticfloat staticfloat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

@vchuravy
Copy link
Copy Markdown
Member

Great! Now the adding the patch to Yggrdasil and also bumping the GMB build we use when not building from source would be the next step.

@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

Yggdrasil patch is already available, here: JuliaPackaging/Yggdrasil#3640

@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

Not sure what you mean about the non-source gmb lib version, can you flesh out your comment?

@vchuravy
Copy link
Copy Markdown
Member

Yggdrasil patch is already available, here: JuliaPackaging/Yggdrasil#3640

Okay landed.

Can you bump

version = "6.2.1+0"
to 6.2.1+1

and then make -f contrib/refresh_checksums.mk GMP (on my phone but hopefully I remembered the right command).

This will update what binary we will pull down when we don't build against the source version. A build from BinaryBuilder is the default (on CI as well)

@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

Pushed updates.

@vchuravy
Copy link
Copy Markdown
Member

Something went wrong. It should have updated https://github.com/JuliaLang/julia/blob/master/deps/checksums/gmp instead of creating many files.

@staticfloat any ideas?

@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

@vchuravy didn't let the script run all the way through. Fixed and pushed.

@vchuravy
Copy link
Copy Markdown
Member

@vchuravy didn't let the script run all the way through. Fixed and pushed.

Not seeing the push, yet :)

@jeremiahpslewis
Copy link
Copy Markdown
Contributor Author

@vchuravy didn't let the script run all the way through. Fixed and pushed.

Not seeing the push, yet :)

Force push failed on me. Now. :)

@KristofferC KristofferC merged commit 764159c into JuliaLang:master Sep 23, 2021
KristofferC pushed a commit that referenced this pull request Sep 23, 2021
* [GMP] Patch for Apple Silicon

(cherry picked from commit 764159c)
KristofferC pushed a commit that referenced this pull request Sep 28, 2021
* [GMP] Patch for Apple Silicon
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external dependencies Involves LLVM, OpenBLAS, or other linked libraries system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Julia fails to build on M1, MacOS 12.0 Beta6

7 participants