This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/main by this push:
new 7f91135 fix(r/sedonadb): Add -Wno-pedantic to avoid compile error
(#181)
7f91135 is described below
commit 7f911353335bd2fb51148aadb39a858a5ec12ffd
Author: Hiroaki Yutani <[email protected]>
AuthorDate: Sun Oct 5 11:46:41 2025 +0900
fix(r/sedonadb): Add -Wno-pedantic to avoid compile error (#181)
---
r/sedonadb/src/Makevars.in | 7 ++++++-
r/sedonadb/src/Makevars.win.in | 12 ++++--------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/r/sedonadb/src/Makevars.in b/r/sedonadb/src/Makevars.in
index d74be2d..54f55d1 100644
--- a/r/sedonadb/src/Makevars.in
+++ b/r/sedonadb/src/Makevars.in
@@ -30,6 +30,11 @@ PKG_LIBS = -L$(LIBDIR) -lsedonadbr @PKG_LIBS@
CARGO_BUILD_ARGS = --lib --profile $(PROFILE) $(FEATURE_FLAGS)
--manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)
+# "-Wno-pedantic" is to override the "-pedantic" flag passed by pkgbuild, which
+# makes the compilation of aws-lc-sys fail. Hopefully, such C code will be
fixed
+# on upstream so that we can remove this.
+CFLAGS_TWEAKED = $(CFLAGS) -Wno-pedantic
+
all: $(SHLIB) clean_intermediate
$(SHLIB): $(STATLIB)
@@ -40,7 +45,7 @@ $(STATLIB):
# therefore is only used if cargo is absent from the user's PATH.
export PATH="$(PATH):$(HOME)/.cargo/bin" && \
export CC="$(CC)" && \
- export CFLAGS="$(CFLAGS)" && \
+ export CFLAGS="$(CFLAGS_TWEAKED)" && \
export AWS_LC_SYS_CMAKE_BUILDER=1 && \
export RUSTFLAGS="$(RUSTFLAGS)" && \
if [ "$(TARGET)" != "wasm32-unknown-emscripten" ]; then \
diff --git a/r/sedonadb/src/Makevars.win.in b/r/sedonadb/src/Makevars.win.in
index 93b065d..163c622 100644
--- a/r/sedonadb/src/Makevars.win.in
+++ b/r/sedonadb/src/Makevars.win.in
@@ -37,9 +37,10 @@ CARGO_LINKER = x86_64-w64-mingw32.static.posix-gcc.exe
# cf. https://stackoverflow.com/a/68979087
PKG_CONFIG_SYSROOT_DIR = /x86_64-w64-mingw32.static.posix/
-# TODO: should $(CFLAGS) be included here?
-# Do not pass -pedantic
-CFLAGS_TWEAKED = $(subst -pedantic,,$(ALL_CPPFLAGS))
+# "-Wno-pedantic" is to override the "-pedantic" flag passed by pkgbuild, which
+# makes the compilation of aws-lc-sys fail. Hopefully, such C code will be
fixed
+# on upstream so that we can remove this.
+CFLAGS_TWEAKED = $(CFLAGS) -Wno-pedantic
all: $(SHLIB) clean_intermediate
@@ -51,11 +52,6 @@ $(STATLIB):
# in actual, but we need this tweak to please the compiler.
mkdir -p $(LIBDIR)/libgcc_mock && touch
$(LIBDIR)/libgcc_mock/libgcc_eh.a
- # AWS_LC_SYS_CFLAGS are not ideal: It would be better to use the
- # CMake builder but this incurs path length errors on at least one
Windows builder.
- # The AWS_LC_SYS_CMAKE_BUILDER environment variable can still be set at
a
- # higher level on Windows environments that support it.
-
export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$(CARGO_LINKER)" && \
export LIBRARY_PATH="$${LIBRARY_PATH};$(LIBDIR)/libgcc_mock" && \
export PKG_CONFIG_SYSROOT_DIR="$(PKG_CONFIG_SYSROOT_DIR)" && \