From f17675788942d220057ff01d4c5b781db4662cb0 Mon Sep 17 00:00:00 2001 From: Anton Alkin Date: Sun, 2 Jun 2024 13:27:26 +0900 Subject: [PATCH] Revert "Bump ONNXRuntime and flatbuffers (#5452)" This reverts commit 31f875e0cbab2e87786f23528c18e990baefcb9d. --- flatbuffers.sh | 8 +++++++- onnxruntime.sh | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/flatbuffers.sh b/flatbuffers.sh index caadaaa481..297a31e064 100644 --- a/flatbuffers.sh +++ b/flatbuffers.sh @@ -1,5 +1,5 @@ package: flatbuffers -version: v23.5.26 +version: v1.12.0 source: https://github.com/google/flatbuffers requires: - zlib @@ -22,6 +22,12 @@ cmake "$SOURCEDIR" \ make ${JOBS:+-j $JOBS} make install +# Work around potentially faulty CMake (missing `install` for binaries) +mkdir -p "$INSTALLROOT/bin" +for bin in flathash flatc; do + [ -e "$INSTALLROOT/bin/$bin" ] || cp -p "$bin" "$INSTALLROOT/bin/" +done + # Modulefile mkdir -p "$INSTALLROOT/etc/modulefiles" alibuild-generate-module --bin --lib > "$INSTALLROOT/etc/modulefiles/$PKGNAME" diff --git a/onnxruntime.sh b/onnxruntime.sh index b33f7f6dac..459e20e5a0 100644 --- a/onnxruntime.sh +++ b/onnxruntime.sh @@ -1,10 +1,11 @@ package: ONNXRuntime version: "%(tag_basename)s" -tag: v1.18.0 -source: https://github.com/microsoft/onnxruntime +tag: v1.12.1-alice1 +source: https://github.com/alisw/onnxruntime.git requires: - protobuf - re2 + - flatbuffers - boost build_requires: - CMake @@ -14,6 +15,16 @@ build_requires: --- #!/bin/bash -e +pushd $SOURCEDIR + git submodule update --init -- cmake/external/date + git submodule update --init -- cmake/external/onnx + git submodule update --init -- cmake/external/eigen + git submodule update --init -- cmake/external/nsync + git submodule update --init -- cmake/external/SafeInt + git submodule update --init -- cmake/external/json + git submodule update --init -- cmake/external/pytorch_cpuinfo +popd + mkdir -p $INSTALLROOT cmake "$SOURCEDIR/cmake" \ @@ -31,9 +42,8 @@ cmake "$SOURCEDIR/cmake" ${PROTOBUF_ROOT:+-DProtobuf_INCLUDE_DIR=$PROTOBUF_ROOT/include} \ ${PROTOBUF_ROOT:+-DProtobuf_PROTOC_EXECUTABLE=$PROTOBUF_ROOT/bin/protoc} \ ${RE2_ROOT:+-DRE2_INCLUDE_DIR=${RE2_ROOT}/include} \ - ${BOOST_ROOT:+-DBOOST_INCLUDE_DIR=${BOOST_ROOT}/include} \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-unknown-warning -Wno-unknown-warning-option -Wno-error=unused-but-set-variable" \ - -DCMAKE_C_FLAGS="$CFLAGS -Wno-unknown-warning -Wno-unknown-warning-option -Wno-error=unused-but-set-variable" + ${FLATBUFFERS_ROOT:+-DFLATBUFFERS_INCLUDE_DIR=${FLATBUFFERS_ROOT}/include} \ + ${BOOST_ROOT:+-DBOOST_INCLUDE_DIR=${BOOST_ROOT}/include} cmake --build . -- ${JOBS:+-j$JOBS} install