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

Use a newer version of ffi for Apple M1 #1772

Closed
wants to merge 1 commit into from

Conversation

al45tair
Copy link

Apple Silicon Macs need a newer version of ffi (I think 1.14 or so).

# Ref: https://github.com/jordansissel/fpm/issues/1708
spec.add_dependency("ffi", "~> 1.12.0") # license: GPL3/LGPL3
if (Gem::Platform.local.os == "darwin" &&
Gem::Platform.local.cpu == "arm64")

Choose a reason for hiding this comment

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

At least on my M1 machine Gem::Platform.local.cpu returns universal instead of arm64 🤷

@jordansissel
Copy link
Owner

Unfortunately, gem build turns the .gemspec file into YAML which doesn't support executable conditions as your change proposes.

You can observe this by looking at the output, and here's what it looks like when I run it from master:

% gem build fpm.gemspec
% tar -xf fpm-*.gem -O metadata.gz | gzip -dc
...
dependencies:
- !ruby/object:Gem::Dependency
  name: ffi
  requirement: !ruby/object:Gem::Requirement
    requirements:
    - - "~>"
      - !ruby/object:Gem::Version
        version: 1.12.0

I'm still searching for a way to solve this ffi version problem.

@jordansissel
Copy link
Owner

#1795 -- I'm to try removing ffi from fpm's dependency list.

@jordansissel
Copy link
Owner

#1785 is resolved by #1786 which removes the ffi dependency entirely from ffi! Woo!

Thank you for this proposed change. I'm closing this now since I believe this issue to be resolved by #1786.

One note, though: I don't have an M1 mac, so I don't have easy access to test that this issue is resolved. If you can, please test the next release and let me know :)

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.

None yet

3 participants