diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index 3597eefe..9e33e5b9 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -30,6 +30,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.13 + with: + cmake-version: '3.16.x' - name: Build native libraries run: make clean-native native-all env: diff --git a/Makefile b/Makefile index adba9cad..4156e568 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc snappy.cc SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(SNAPPY_VERSION) SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC)) SNAPPY_GIT_REPO_URL:=https://github.com/google/snappy -SNAPPY_GIT_REV:=537f4ad6240e586970fe554614542e9717df7902 # 1.1.8 +# Change this variable to use a specific git commit +SNAPPY_GIT_REV:=$(SNAPPY_VERSION) SNAPPY_UNPACKED:=$(TARGET)/snappy-extracted.log SNAPPY_GIT_UNPACKED:=$(TARGET)/snappy-git-extracted.log SNAPPY_CMAKE_CACHE=$(SNAPPY_OUT)/CMakeCache.txt @@ -79,6 +80,7 @@ $(SNAPPY_GIT_UNPACKED): @mkdir -p $(SNAPPY_SRC_DIR) git clone $(SNAPPY_GIT_REPO_URL) $(SNAPPY_SRC_DIR) git --git-dir=$(SNAPPY_SRC_DIR)/.git --work-tree=$(SNAPPY_SRC_DIR) checkout -b local/snappy-$(SNAPPY_VERSION) $(SNAPPY_GIT_REV) + cd $(SNAPPY_SRC_DIR) && git submodule update --init touch $@ $(SNAPPY_CMAKE_CACHE): $(SNAPPY_GIT_UNPACKED) diff --git a/Makefile.common b/Makefile.common index fd46ff20..def82d14 100755 --- a/Makefile.common +++ b/Makefile.common @@ -258,7 +258,7 @@ Mac-x86_SNAPPY_FLAGS := Mac-x86_64_CXX := c++ -arch $(OS_ARCH) Mac-x86_64_STRIP := strip -x -Mac-x86_64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.7 -fvisibility=hidden -stdlib=libc++ -std=c++11 +Mac-x86_64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.7 -fvisibility=hidden -stdlib=libc++ -std=c++11 -ftemplate-depth=1024 Mac-x86_64_LINKFLAGS := -dynamiclib Mac-x86_64_LIBNAME := libsnappyjava.dylib Mac-x86_64_SNAPPY_FLAGS := diff --git a/src/main/resources/org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib b/src/main/resources/org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib index 5ed69f15..35a8fc8a 100755 Binary files a/src/main/resources/org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib and b/src/main/resources/org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib differ