Skip to content

Commit

Permalink
Prevent ruby 2.7.2 build failures due to missing openssl (#98)
Browse files Browse the repository at this point in the history
This PR addresses the Ruby installation failure encountered by @claym-ih
during the ih-setup -f setup process on macOS 14.5 with Apple Silicon.
The issue was traced to incorrect environment variables pointing to
non-existent OpenSSL directories. The PR updates the LDFLAGS, CPPFLAGS,
and PKG_CONFIG_PATH to use the correct paths from Homebrew's
`[email protected]` installation and adds `[email protected]` as a dependency in the
homebrew-ih-public formula.
  • Loading branch information
pb-dod authored Jul 17, 2024
1 parent be80090 commit dd2eab6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.57
0.1.58
3 changes: 2 additions & 1 deletion formula/ih-core.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class IhCore < Formula
VERSION="0.1.57"
VERSION="0.1.58"
desc "Brew formula for installing core tools used at Included Health engineering."
homepage "https://github.com/ConsultingMD/homebrew-ih-public"
license "CC BY-NC-ND 4.0"
Expand All @@ -16,6 +16,7 @@ class IhCore < Formula
depends_on "yq"
depends_on "go-jira"
depends_on "envconsul"
depends_on "[email protected]" # required by ruby 2.7.2
depends_on "openssl@3"
depends_on "coreutils"
depends_on "yamllint"
Expand Down
9 changes: 5 additions & 4 deletions lib/core/shell/default/99_bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ if [[ "$PS1" = "\\s-\\v\\\$ " ]]; then
fi

# Open SSL management
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
BREW_PREFIX_OPENSSL="$(brew --prefix [email protected])"
export PATH="$BREW_PREFIX_OPENSSL/bin:$PATH"
export LDFLAGS="-L$BREW_PREFIX_OPENSSL/lib"
export CPPFLAGS="-I$BREW_PREFIX_OPENSSL/include"
export PKG_CONFIG_PATH="$BREW_PREFIX_OPENSSL/lib/pkgconfig"
##########################################################

# Rancher desktop added to the PATH
Expand Down
9 changes: 5 additions & 4 deletions lib/core/shell/default/99_zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ if [[ ${#PROMPT} -lt 10 ]]; then
fi

# Open SSL management
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
BREW_PREFIX_OPENSSL="$(brew --prefix [email protected])"
export PATH="$BREW_PREFIX_OPENSSL/bin:$PATH"
export LDFLAGS="-L$BREW_PREFIX_OPENSSL/lib"
export CPPFLAGS="-I$BREW_PREFIX_OPENSSL/include"
export PKG_CONFIG_PATH="$BREW_PREFIX_OPENSSL/lib/pkgconfig"

# Rancher desktop added to the PATH
export PATH=$PATH:/Users/$USER/.rd/bin
Expand Down

0 comments on commit dd2eab6

Please sign in to comment.