Skip to content

Commit

Permalink
fix: ensure report rustc version if pre-built binary will be used (#1234
Browse files Browse the repository at this point in the history
)
  • Loading branch information
eitsupi authored Sep 17, 2024
1 parent c417c32 commit fa98ad7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cleanup.win
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

. ./configure
. ./cleanup
10 changes: 5 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ LIBNAME="libr_polars.a"
LIBR_POLARS_DEFAULT_PATH="$(pwd)/tools/${LIBNAME}"
LIBR_POLARS_PATH=${LIBR_POLARS_PATH:-${LIBR_POLARS_DEFAULT_PATH}}

# -z noexecstack added to avoid following error on Ubuntu:
# /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /usr/local/lib/R/site-library/polars/libs/polars.so)`
# https://stackoverflow.com/questions/73435637/how-can-i-fix-usr-bin-ld-warning-trap-o-missing-note-gnu-stack-section-imp/73468271#73468271
#
# not used on macOS
ADDITIONAL_PKG_LIBS_FLAG="-lrt -z noexecstack"
ADDITIONAL_PKG_LIBS_FLAG="-lrt"

export PATH="$PATH:$HOME/.cargo/bin"

Expand Down Expand Up @@ -72,6 +68,8 @@ check_bin_lib() {
echo ""
echo "---------------------- [LIBRARY BINARY FOUND] ----------------------"
echo "The library was found at <${LIBR_POLARS_PATH}>. No need to build it."
echo ""
echo "Note: rustc version: $(command -v rustc >/dev/null && rustc -V || echo 'Not found')"
echo "--------------------------------------------------------------------"
echo ""
sed -e "s|@RUST_TARGET@||" -e "s|@ADDITIONAL_PKG_LIBS_FLAG@|${ADDITIONAL_PKG_LIBS_FLAG}|" src/Makevars.in >src/Makevars
Expand All @@ -91,6 +89,8 @@ check_bin_lib() {
echo "The library was not found at <${LIBR_POLARS_PATH}>,"
echo "but was found at <${LIBR_POLARS_DEFAULT_PATH}>."
echo "No need to build it."
echo ""
echo "Note: rustc version: $(command -v rustc >/dev/null && rustc -V || echo 'Not found')"
echo "--------------------------------------------------------------------"
echo ""
sed -e "s|@RUST_TARGET@||" -e "s|@ADDITIONAL_PKG_LIBS_FLAG@|${ADDITIONAL_PKG_LIBS_FLAG}|" src/Makevars.in >src/Makevars
Expand Down

0 comments on commit fa98ad7

Please sign in to comment.