ci: issue with linking unixodbc when building OTP on macos arm64

This commit is contained in:
Ivan Dyachkov 2022-12-22 14:46:56 +01:00
parent 0baeb6866b
commit 780d715dfb
1 changed files with 9 additions and 1 deletions

View File

@ -59,11 +59,19 @@ runs:
fi fi
git clone --depth 1 --branch OTP-${{ inputs.otp }} https://github.com/emqx/otp.git "$OTP_SOURCE_PATH" git clone --depth 1 --branch OTP-${{ inputs.otp }} https://github.com/emqx/otp.git "$OTP_SOURCE_PATH"
cd "$OTP_SOURCE_PATH" cd "$OTP_SOURCE_PATH"
if [ "$(arch)" = arm64 ]; then
export LDFLAGS="-L$(brew --prefix unixodbc)/lib"
export CC="/usr/bin/gcc -I$(brew --prefix unixodbc)/include"
fi
./configure --disable-dynamic-ssl-lib --with-ssl=$(brew --prefix openssl@1.1) --disable-hipe --disable-jit --prefix="$OTP_INSTALL_PATH" ./configure --disable-dynamic-ssl-lib --with-ssl=$(brew --prefix openssl@1.1) --disable-hipe --disable-jit --prefix="$OTP_INSTALL_PATH"
make -j$(nproc) make -j$(nproc)
rm -rf "$OTP_INSTALL_PATH" rm -rf "$OTP_INSTALL_PATH"
make install make install
- name: build ${{ inputs.profile }} if [ "$(arch)" = arm64 ]; then
unset LDFLAGS
unset CC
fi
- name: build
env: env:
HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_UPGRADE: 1 HOMEBREW_NO_INSTALL_UPGRADE: 1