Unable to bootstrap GDK - missing `libgmp.10.dylib`
Overview
I have GMP installed (and did brew reinstall gmp too), but when I try to bootstrap GDK I get:
$ make bootstrap
INFO: Performing common preflight checks..
INFO: Setting up platform..
INFO: This GDK has already had platform packages installed.
INFO: Remove '/Volumes/Projects/~Gitlab/gitlab-development-kit/.cache/.gdk_platform_setup' to force execution.
INFO: Installing asdf..
INFO: Installing/updating asdf plugins..
Updating golang to master
Already on 'master'
Your branch is up to date with 'origin/master'.
Updating minio to master
Already on 'master'
Your branch is up to date with 'origin/master'.
Updating nodejs to master
Already on 'master'
Your branch is up to date with 'origin/master'.
Updating postgres to master
Already on 'master'
Your branch is up to date with 'origin/master'.
Updating redis to master
Already on 'master'
Your branch is up to date with 'origin/master'.
Updating ruby to master
Already on 'master'
Your branch is up to date with 'origin/master'.
Updating yarn to main
Already on 'main'
Your branch is up to date with 'origin/main'.
INFO: Installing asdf tools..
golang 1.17.9 is already installed
golang 1.17.7 is already installed
golang 1.17.6 is already installed
golang 1.16.14 is already installed
minio 2021-04-06T23-11-00Z is already installed
nodejs 16.14.0 is already installed
postgres 12.10 is already installed
postgres 13.6 is already installed
redis 6.0.16 is already installed
ruby 2.7.5 is already installed
ruby 3.0.4 is already installed
yarn 1.22.17 is already installed
yarn 1.22.19 is already installed
INFO: Reshimming asdf..
dyld[53684]: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
Referenced from: /Users/gkorba/.asdf/installs/ruby/2.7.5/bin/ruby
Reason: tried: '/usr/local/opt/gmp/lib/libgmp.10.dylib' (no such file), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file)
INFO: Installing gitlab-development-kit Ruby gem..
dyld[54778]: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
Referenced from: /Users/gkorba/.asdf/installs/ruby/2.7.5/bin/ruby
Reason: tried: '/usr/local/opt/gmp/lib/libgmp.10.dylib' (no such file), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file)
ERROR: Failed to run gdk_install_gdk_clt().
make: *** [bootstrap] Error 1
When I try to symlink my GMP installation to one of the searched paths (ln -s /opt/homebrew/Cellar/gmp/6.2.1_1/lib /usr/local/opt/gmp/lib) I get:
dyld[36063]: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
Referenced from: /Users/gkorba/.asdf/installs/ruby/2.7.5/bin/ruby
Reason: tried: '/usr/local/opt/gmp/lib/libgmp.10.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file), '/opt/homebrew/Cellar/gmp/6.2.1_1/lib/libgmp.10.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file)
INFO: Installing gitlab-development-kit Ruby gem..
dyld[37134]: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
Referenced from: /Users/gkorba/.asdf/installs/ruby/2.7.5/bin/ruby
Reason: tried: '/usr/local/opt/gmp/lib/libgmp.10.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file), '/opt/homebrew/Cellar/gmp/6.2.1_1/lib/libgmp.10.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libgmp.10.dylib' (no such file), '/usr/lib/libgmp.10.dylib' (no such file)
I was able to workaround it by using asdf local ruby 3.0.4 and running make bootstrap again - it completed bootstrapping without problems.
Steps to replicate (optional)
- Git pull newest GDK
make bootstrap
Environment (optional)
- Operating system name:
Darwin gkorba-mbpro 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 - Architecture:
arm64 - The contents of your
gdk.yml(if any) - Ruby version:
2.7.5(displayed in prompt by p10k,ruby --versionends with the error mentioned above) - GDK version:
5bbc0ccb
Edited by Grzegorz Korba