From a559ba4d2437fc789169a6442e3ee6989341a742 Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Sun, 5 Oct 2025 01:12:50 +0900 Subject: [PATCH 1/2] fix(r/sedonadb): Add -Wno-pedantic to avoid compile error --- r/sedonadb/src/Makevars.in | 7 ++++++- r/sedonadb/src/Makevars.win.in | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/r/sedonadb/src/Makevars.in b/r/sedonadb/src/Makevars.in index d74be2d0..54f55d17 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 93b065d8..b0b801b0 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 From e42eb1cbf75928829dd34499efb6f2578d2f3c88 Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Sun, 5 Oct 2025 01:13:06 +0900 Subject: [PATCH 2/2] Remove outdated command --- r/sedonadb/src/Makevars.win.in | 5 ----- 1 file changed, 5 deletions(-) diff --git a/r/sedonadb/src/Makevars.win.in b/r/sedonadb/src/Makevars.win.in index b0b801b0..163c6221 100644 --- a/r/sedonadb/src/Makevars.win.in +++ b/r/sedonadb/src/Makevars.win.in @@ -52,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)" && \