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

gocryptfs: Fix build for arm64 #13069

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

MarcelBochtler
Copy link
Contributor

Description

  • Introduce doc variant, which is enabled by default.
  • Use go-md2man instead of pandoc on arm64 as this arch is not yet
    supported by upstream yet 1.
Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 11.6.1 20G224 x86_64
Xcode 13.1 13A1030d

Verification

Have you

* Introduce doc variant, which is enabled by default.
* Use go-md2man instead of pandoc on arm64 as this arch is not yet
supported by upstream yet [1].

[1]: jgm/pandoc#6960
@pmetzger
Copy link
Member

Would md2man work better than pandoc on all platforms?

@MarcelBochtler
Copy link
Contributor Author

Would md2man work better than pandoc on all platforms?

No, because the manpage generated by md2man has some formatting issues, which is why I'd like to use it only when pandoc is not available.

@pmetzger
Copy link
Member

Makes sense.

@pmetzger pmetzger merged commit 6ae64d2 into macports:master Nov 21, 2021
@kencu
Copy link
Contributor

kencu commented Nov 21, 2021

We previously had arm64 copy over and install the x86_64 binary of pandoc, which runs just fine on arm64 and solves this issue until ghc is updated to support arm macs. It was packaged like this:

https://packages.macports.org/pandoc/pandoc-2.10.1_0.darwin_20.arm64.tbz2

but somewhere along the line that was scrubbed out, and I guess we're just broken again.

@kencu
Copy link
Contributor

kencu commented Nov 21, 2021

Actually, Josh also said that MacPorts would automatically see the x86_64 version as runnable on arm64 Macs, and install that x86_64 version without any intervention by the user if it existed on the packages server.

Or that was supposed to be how it worked, if I understood the logic correctly.

@AlexBasile123
Copy link

Thanks @MarcelBochtler ! The change is working on M1 now

@MarcelBochtler
Copy link
Contributor Author

@kencu I investigated this and it seems to be that direct installations of x86_64 ports works on ARM64 devices.
However, when trying to install ports that has a x86_64 dependency it doesn't work. I tried with scrcpy:

❯ sudo port install scrcpy
--->  Computing dependencies for scrcpy
Error: Cannot install scrcpy for the arch 'arm64' because
Error: its dependency android-platform-tools only supports the arch 'x86_64'.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port scrcpy failed

~
❯ sudo port install android-platform-tools
--->  Computing dependencies for android-platform-tools
--->  Fetching archive for android-platform-tools
--->  Attempting to fetch android-platform-tools-31.0.3_0.darwin_21.x86_64.tbz2 from https://nue.de.packages.macports.org/android-platform-tools
--->  Attempting to fetch android-platform-tools-31.0.3_0.darwin_21.x86_64.tbz2 from https://fra.de.packages.macports.org/android-platform-tools
--->  Attempting to fetch android-platform-tools-31.0.3_0.darwin_21.x86_64.tbz2 from https://packages.macports.org/android-platform-tools
--->  Fetching distfiles for android-platform-tools
--->  Verifying checksums for android-platform-tools
--->  Extracting android-platform-tools
--->  Configuring android-platform-tools
--->  Building android-platform-tools
--->  Staging android-platform-tools into destroot
--->  Installing android-platform-tools @31.0.3_0
--->  Activating android-platform-tools @31.0.3_0
--->  Cleaning android-platform-tools
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

This issue is also outlined in this ticket: https://trac.macports.org/ticket/63092

@kencu
Copy link
Contributor

kencu commented Nov 22, 2021

Hmm. I wonder if we might "depends_skip_archcheck pandoc" then, as it is just a tool and we don't care if it has a matching architecture to the port being built.

that may not be the exact line to use in the Portfile, but it is something similar to that..

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

Successfully merging this pull request may close these issues.

5 participants