Heimdal uses a prefixed location for homebrew which not always work
Overview
During a gdk install
on a MacOS with HomeBrew (and no asdf
), heimdal compilation will hardcode an include pointing to where it thinks homebrew installed heimdal: "-I/opt/homebrew/opt/heimdal/include"
. This only works for Mac OS running on ARM processors. For intel based ones, the default location is /usr/local/
.
We should always rely on the output from brew --prefix
instead of trying to guess where it is installed, as the user could have a custom setup that installs it in a different folder.
Introduced by: !2943 (merged) / gitlab-shell!709 (merged)
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Steps to replicate (optional)
- On a new MacOS machine, follow the installation instructions (without
asdf
) and clone the repository - Now run
gdk install
- Get the following compilation error:
clang: error: no such file or directory: '"-I/opt/homebrew/opt/heimdal/include"'
make[1]: *** [bin/gitlab-shell] Error 2
make: *** [gitlab-shell-setup] Error 2
ERROR: Failed to install.
See: https://gitlab.com/gitlab-org/gitlab-development-kit/-/jobs/4075185632
Proposal (optional)
We should use the output from brew --prefix
instead of hard-coded values.
Environment (optional)
- Operating system name:
Darwin Gitlabs-iPro 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64
- Architecture:
i386
- The contents of your
gdk.yml
(if any) - Ruby version:
<!-- output of `ruby --version` command -->
- GDK version:
GitLab Development Kit 0.2.16 (5f68efc3)
Edited by Gabriel Mazetto