From c8219b5f7ffe44299402beb9d47feae2dfd5b8de Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Tue, 23 Jun 2020 13:51:11 +0100 Subject: [PATCH] Fix `dyld: lazy symbol binding failed: Symbol not found` error Build fails with: ``` dyld: lazy symbol binding failed: Symbol not found: _ffi_prep_closure_loc Referenced from: /Users/christopherashton/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle Expected in: /usr/lib/libffi.dylib dyld: Symbol not found: _ffi_prep_closure_loc Referenced from: /Users/christopherashton/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle Expected in: /usr/lib/libffi.dylib [1] 66481 abort GITHUB_TOKEN=$(cat ~/github_token.txt) NO_CONTRACTS=true bundle exec middlema ``` Downgrading to lower version fixes it. It looks as though this should have been fixed in https://github.com/ffi/ffi/pull/787, but we're seeing the same error as originally reported. --- Gemfile | 1 + Gemfile.lock | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 992740a0b7a..0f2d41bf06b 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ ruby File.read(".ruby-version").chomp gem "activesupport", "~> 5.2" gem "capybara", "~> 3.33.0" +gem "ffi", "1.12" gem "rake" gem "rspec", "~> 3.9" gem "rubocop-govuk" diff --git a/Gemfile.lock b/Gemfile.lock index bca4851cfe4..2847b2e63f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,9 +9,9 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.1) - autoprefixer-rails (9.7.6) + autoprefixer-rails (9.8.4) execjs - backports (3.17.2) + backports (3.18.1) builder (3.2.4) capybara (3.33.0) addressable @@ -46,7 +46,7 @@ GEM contracts (0.13.0) crack (0.4.3) safe_yaml (~> 1.0.0) - diff-lcs (1.3) + diff-lcs (1.4.2) docile (1.3.2) dotenv (2.7.5) em-websocket (0.5.1) @@ -63,7 +63,7 @@ GEM faraday (~> 1.0) fast_blank (1.0.0) fastimage (2.1.7) - ffi (1.13.1) + ffi (1.12.0) github-markdown (0.6.9) govuk_schemas (4.0.0) json-schema (~> 2.8.0) @@ -278,6 +278,7 @@ DEPENDENCIES capybara (~> 3.33.0) faraday-http-cache (~> 2.2.0) faraday_middleware (~> 1.0.0) + ffi (= 1.12) github-markdown govuk_schemas (~> 4.0.0) govuk_tech_docs