Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

troubleshoot build.sh #53484

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 19 additions & 26 deletions recipes/transannot/build.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
#!/bin/bash -ex

mkdir -p build && pushd build

export INCLUDES="-I${PREFIX}/include"
export LIBPATH="-L${PREFIX}/lib"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include"
#!/bin/bash

ARCH_BUILD=""
case $(uname -m) in
aarch64)
ARCH_OPTS="-DHAVE_ARM8=1"
;;
*)
ARCH_OPTS="-DHAVE_SSE4_1=1"
;;
x86_64) ARCH_BUILD="-DHAVE_AVX2=1" ;;
arm64|aarch64) ARCH_BUILD="-DHAVE_ARM8=1" ;;
esac

if [ "$(uname)" == "Darwin" ]; then
export CMAKE_EXTRA="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER -Wno-dev"
else
export CMAKE_EXTRA="-Wno-dev"
fi
CUDA=0
case $(uname -s) in
Linux) CUDA=1 ;;
Darwin) CUDA=0 ;;
esac

cmake -S .. -B . -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DHAVE_TESTS=0 -DHAVE_MPI=0 "${ARCH_OPTS}" \
-DVERSION_OVERRIDE="${PKG_VERSION}" \
"${CMAKE_EXTRA}"
if [ -z "${ARCH_BUILD}" ]; then
echo "Invalid architecture"
exit 1
fi

cmake --build . --target install -j ${CPU_COUNT} -v
popd
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DHAVE_TESTS=0 -DHAVE_MPI=0 ${ARCH_BUILD} -DVERSION_OVERRIDE="${PKG_VERSION}" \
-DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" -DENABLE_CUDA=${CUDA} ..
make -j${CPU_COUNT} ${VERBOSE_CM}
make install
Loading