From b970fdd466e9da42c0d4720515f05b8dab7309b8 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 3 Jul 2024 13:24:09 -0700 Subject: [PATCH] Apply fixes for macos builds --- .github/workflows/build-macos.yml | 4 ++-- package/darwin/generate_package_contents | 5 ----- substrate/deps.sh | 5 +++-- substrate/run.sh | 6 ++---- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index cd6f3268..7bca224f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -132,7 +132,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-x86-substrate: if: github.repository == 'hashicorp/vagrant-builders' && needs.info.outputs.substrate-x86-unsigned-exists != 'true' - runs-on: macos-13 + runs-on: macos-latest permissions: contents: write needs: [info] @@ -561,7 +561,7 @@ jobs: - name: Upgrade bash run: brew install bash - name: Install dmgbuild - run: pip3 install dmgbuild && pip3 install biplist + run: pip3 install --break-system-packages dmgbuild && pip3 install --break-system-packages biplist - name: Code Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Fetch Vagrant installer diff --git a/package/darwin/generate_package_contents b/package/darwin/generate_package_contents index 862e7215..80dd2e57 100755 --- a/package/darwin/generate_package_contents +++ b/package/darwin/generate_package_contents @@ -35,11 +35,6 @@ if [ ! -f "${vagrant_gem}" ]; then error "Invalid path provided for Vagrant gem (%s)" "${vagrant_gem}" fi -# Make sure the go modules are installed -pushd "${root}" > /dev/null || exit -go mod download || exit -popd > /dev/null || exit - # Create a working directory for unpacking # the substrate substrate_dir="$(mktemp -d vagrant-substrate.XXXXXX)" || exit diff --git a/substrate/deps.sh b/substrate/deps.sh index 04a6c9dc..9c787494 100644 --- a/substrate/deps.sh +++ b/substrate/deps.sh @@ -39,5 +39,6 @@ libxcrypt_version="4.4.18" # Only used for macOS # NOTE: The 10.12 SDK was the earliest version of the # SDK which could properly build all the dependencies -macos_sdk_file="MacOSX10.12.sdk.tgz" -macos_deployment_target="10.12" +# NOTE: Old SDK does not appear to work on arm, disable for now +#macos_sdk_file="MacOSX10.12.sdk.tgz" +#macos_deployment_target="10.12" diff --git a/substrate/run.sh b/substrate/run.sh index d23718ea..a3b14cc6 100755 --- a/substrate/run.sh +++ b/substrate/run.sh @@ -232,7 +232,6 @@ if [ "${target_os}" = "linux" ] && [ -n "${forced_arch}" ]; then if [ "${target_arch}" = "386" ]; then export CFLAGS="${CFLAGS} -m32 -march=${forced_arch}" export LDFLAGS="${LDFLAGS} -m32" - fi info " ** Build host: %s" "${build_host}" @@ -263,7 +262,6 @@ if [[ "${target_os}" = "darwin" ]]; then "--includedir=${embed_dir}/include" "--oldincludedir=${embed_dir}/include" "--enable-rpath" - "--enable-rb_cv_function_name_string=__func__" ) # Set the host system value @@ -864,8 +862,8 @@ if needs_build "${tracker_file}" "ruby"; then unset CFLAGS unset CPPFLAGS unset CXXFLAGS - ./configure --prefix="${embed_dir}" --disable-debug --disable-dependency-tracking --disable-install-doc --disable-install-rdoc \ - --enable-shared --disable-static --with-opt-dir="${embed_dir}" --enable-load-relative --with-sitedir=no \ + ./configure --prefix="${embed_dir}" --disable-debug --disable-install-doc --disable-install-rdoc \ + --disable-install-capi --enable-shared --disable-static --enable-load-relative --with-sitedir=no \ --with-vendordir=no --with-sitearchdir=no --with-vendorarchdir=no --with-openssl-dir="${embed_dir}" \ "${cross_configure[@]}" "${cross_configure_ruby[@]}" || exit make miniruby || exit