diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 99fa9040..4cbdca58 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,12 +18,12 @@ jobs: SIMD: 'AVX2' STATIC: 1 MPI: 0 - BUILD_TYPE: RelWithDebInfo + BUILD_TYPE: Release sse41: SIMD: 'SSE4_1' STATIC: 1 MPI: 0 - BUILD_TYPE: RelWithDebInfo + BUILD_TYPE: Release # sse2: # SIMD: 'SSE2' # STATIC: 1 @@ -33,7 +33,7 @@ jobs: SIMD: 'AVX2' STATIC: 0 MPI: 1 - BUILD_TYPE: RelWithDebInfo + BUILD_TYPE: Release asan: SIMD: 'AVX2' STATIC: 0 @@ -102,19 +102,25 @@ jobs: - script: | mkdir build && cd build export CC=gcc-10 ; export CXX=g++-10; export CUDAHOSTCXX=$CXX; export CUDACXX=/usr/local/cuda/bin/nvcc; - LIBGOMP=/usr/lib/gcc/x86_64-linux-gnu/10; - /usr/local/bin/cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=1 -DHAVE_AVX2=1 \ - -DFORCE_STATIC_DEPS=1 -DCMAKE_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10 -DBUILD_SHARED_LIBS=OFF \ - -DOpenMP_C_FLAGS="-fopenmp -I${LIBGOMP}" -DOpenMP_C_LIB_NAMES=gomp -DOpenMP_CXX_FLAGS="-fopenmp -I${LIBGOMP}" -DOpenMP_CXX_LIB_NAMES=gomp -DOpenMP_gomp_LIBRARY=${LIBGOMP}/libgomp.a \ + LIBGCC=/usr/lib/gcc/x86_64-linux-gnu/10; + /usr/local/bin/cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=0 -DENABLE_WERROR=1 -DHAVE_AVX2=1 \ + -DFORCE_STATIC_DEPS=1 -DATOMIC_LIB_OVERRIDE=${LIBGCC}/libatomic.a \ + -DOpenMP_C_FLAGS="-fopenmp -I${LIBGCC}" -DOpenMP_C_LIB_NAMES=gomp -DOpenMP_CXX_FLAGS="-fopenmp -I${LIBGCC}" -DOpenMP_CXX_LIB_NAMES=gomp -DOpenMP_gomp_LIBRARY=${LIBGCC}/libgomp.a \ -DENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" .. - cmake --build . -j$(nproc --all) + cmake --build . -j$(nproc --all) -v # fail if GLIBC_PRIVATE or too new GLIBC is present if readelf -Ws src/foldseek | grep -q GLIBC_PRIVATE; then + echo "Error: binary contains private glibc symbols" exit 1 fi LIBC_V=$(readelf -V src/foldseek | awk '$3 ~ /^GLIBC_/ { print $3 }' | sort -V | tail -n1) if [[ "$LIBC_V" > "GLIBC_2.29" ]]; then - exit 1 + echo "Error: glibc too new" + exit 1 + fi + if readelf -d src/foldseek | grep -q "libatomic.so"; then + echo "Error: libatomic.so is present as a dependency" + exit 1 fi displayName: Build GPU - task: PublishPipelineArtifact@0 @@ -151,7 +157,7 @@ jobs: displayName: Install Toolchain - script: | mkdir build && cd build - LIBGOMP=/usr/lib/gcc-cross/aarch64-linux-gnu/9 + LIBGOMP=/usr/lib/gcc-cross/${CPREF}-linux-gnu/9 CC=${CPREF}-linux-gnu-gcc CXX=${CPREF}-linux-gnu-g++ \ cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DHAVE_TESTS=1 -DFORCE_STATIC_DEPS=1 \ -DRust_CARGO_TARGET=${CPREF}-unknown-linux-gnu \ diff --git a/util/build_osx.sh b/util/build_osx.sh index a02134ad..d65e0d35 100755 --- a/util/build_osx.sh +++ b/util/build_osx.sh @@ -50,7 +50,7 @@ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DHAVE_TESTS=0 -DHAVE_MPI=0 -DHAVE_AVX2=1 \ -DCMAKE_OSX_ARCHITECTURES=x86_64 \ - -DCMAKE_C_FLAGS="-arch x86_64" -DCMAKE_CXX_FLAGS="-arch x86_64" \ + -DCMAKE_C_FLAGS="-arch x86_64" -DCMAKE_CXX_FLAGS="-arch x86_64" -DCMAKE_ASM_FLAGS="-arch arm64" \ -DBUILD_SHARED_LIBS=OFF -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \ -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I${LIBOMP_AMD64}" -DOpenMP_C_LIB_NAMES=omp -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I${LIBOMP_AMD64}" -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY=${LIBOMP_AMD64}/libomp.a \ -DRust_CARGO_TARGET=x86_64-apple-darwin -DGGML_METAL=OFF \ @@ -98,7 +98,7 @@ fi lipo \ -create \ - -arch x86_64 "$BUILD/build_avx2/src/${BINARY_NAME}" \ + -arch x86_64 "$BUILD/build_avx2/src/${BINARY_NAME}" \ -arch arm64 "$BUILD/build_arm64/src/${BINARY_NAME}" \ -output "$BUILD/${BINARY_NAME}"