-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heck installation issue: rhub issue macos (R-devel) #5
Comments
This issue is also on CRAN. It can be fixed by bumping the version of libR-sys. Check: https://www.r-project.org/nosvn/R.check/r-oldrel-macos-x86_64/heck-00check.html [patch.crates-io]
libR-sys = { git = "https://github.com/extendr/libR-sys", rev = "8649204b2490f3aa3732d56f4d84af7f042e5f05" } I am referencing a specific commit here in arcpbf that is after this fix went in. @CGMossa, do you think we can publish a patched version of libR-sys so this comes from crates.io? |
I've made a new release. |
I am getting the following error when I add libR-sys to the [patch.crates-io]
libR-sys = { git = "https://github.com/extendr/libR-sys", rev = "8649204b2490f3aa3732d56f4d84af7f042e5f05" } > rextendr::document()
✔ Saving changes in the open files.
ℹ Generating extendr wrapper functions for package: heck.
ℹ Re-compiling heck (debug build)
── R CMD INSTALL ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─ installing *source* package ‘heck’ ...
** using staged installation
** libs
using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using SDK: ‘MacOSX14.4.sdk’
rm -Rf heck.so ./rust/target/release/libheck.a entrypoint.o /Users/dyfanjones/Documents/Packages/heck/src/.cargo /Users/dyfanjones/Documents/Packages/heck/src/vendor
clang -arch arm64 -I"/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c entrypoint.c -o entrypoint.o
if [ -f ./rust/vendor.tar.xz ]; then \
tar xf rust/vendor.tar.xz && \
mkdir -p /Users/dyfanjones/Documents/Packages/heck/src/.cargo && \
cp rust/vendor-config.toml /Users/dyfanjones/Documents/Packages/heck/src/.cargo/config.toml; \
fi
# In some environments, ~/.cargo/bin might not be included in PATH, so we need
# to set it here to ensure cargo can be invoked. It is appended to PATH and
# therefore is only used if cargo is absent from the user's PATH.
if [ "true" != "true" ]; then \
export CARGO_HOME=/Users/dyfanjones/Documents/Packages/heck/src/.cargo; \
fi && \
export PATH="/Users/dyfanjones/Library/r-miniconda-arm64/condabin:/Users/dyfanjones/Library/r-miniconda-arm64/envs/r-reticulate/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/usr/local/munki:/Applications/quarto/bin:/Users/dyfanjones/.cargo/bin:/usr/ucb:/Library/TeX/texbin:/usr/texbin:/Applications/RStudio.app/Contents/Resources/app/bin/postback:/Users/dyfanjones/.cargo/bin" && \
cargo build -j 2 --offline --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target && \
echo `cargo --version` && echo `rustc --version`;
Compiling extendr-api v0.7.0
error[E0425]: cannot find function, tuple struct or tuple variant `Rf_isValidString` in this scope
--> /Users/dyfanjones/Documents/Packages/heck/src/vendor/extendr-api/src/robj/rinternals.rs:358:18
|
358 | unsafe { Rf_isValidString(self.get()).into() }
| ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `Rf_isBlankString`
|
::: /Users/dyfanjones/Documents/Packages/heck/src/./rust/target/release/build/libR-sys-54899a8164457f5c/out/bindings.rs:1297:5
|
1297 | pub fn Rf_isBlankString(arg1: *const ::std::os::raw::c_char) -> Rboolean;
| ------------------------------------------------------------------------ similarly named function `Rf_isBlankString` defined here
error[E0425]: cannot find function, tuple struct or tuple variant `Rf_isValidStringF` in this scope
--> /Users/dyfanjones/Documents/Packages/heck/src/vendor/extendr-api/src/robj/rinternals.rs:363:18
|
363 | unsafe { Rf_isValidStringF(self.get()).into() }
| ^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `Rf_isBlankString`
|
::: /Users/dyfanjones/Documents/Packages/heck/src/./rust/target/release/build/libR-sys-54899a8164457f5c/out/bindings.rs:1297:5
|
1297 | pub fn Rf_isBlankString(arg1: *const ::std::os::raw::c_char) -> Rboolean;
| ------------------------------------------------------------------------ similarly named function `Rf_isBlankString` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `extendr-api` (lib) due to 2 previous errors
make: *** [rust/target/release/libheck.a] Error 101
ERROR: compilation failed for package ‘heck’
─ removing ‘/private/var/folders/sp/scbzkbwx6hbchmylsx0y52k80000gn/T/RtmpYROWtd/devtools_install_7c4deac4773/heck’
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, …`:
! System command 'R' failed
---
Exit status: 1
stdout & stderr: <printed>
---
Type .Last.error to see the more details. Updated [package]
name = 'heck'
version = '0.1.0'
edition = '2021'
[lib]
crate-type = ['staticlib']
name = 'heck'
[dependencies]
extendr-api = '0.7.0'
heck = "0.5.0"
[patch.crates-io]
libR-sys = { git = "https://github.com/extendr/libR-sys", rev = "8649204b2490f3aa3732d56f4d84af7f042e5f05" } I am guessing I am missing something :) |
Did you re-vendor the dependencies? Typically, jsut to be safe, I will delete everything that starts with |
Aye indeed. I wonder if it is a mac arm issue 🤔 |
I can try and check it out later today |
I have MacOS with Arm and was able to build. Is this issue on R-hub or on your own machine? |
I'd like to know the r version available at r_home |
Ah yeah, I think we now have a restriction of R >= 4.1, is that right? Should go in rextendr defaults. |
@DyfanJones I can reproduce by putting
There is an extendr-api PR to address this: extendr/extendr#842 |
Hmmm I am not sure why my mac isn't building it correctly. I might need to do a 2 stage release. First release the cran requirements (so the package doesn't get taken down) and then circle back to try and sort out my mac. |
Hello @DyfanJones. Do you mind trying "everything" again? We just made a patch release to extendr, so the current version is 0.7.1 for extendr-api, extendr-engine, extendr-macros, and even libR-sys. If you use Also, is your Mac an Intel mac? |
@CGMossa I have a Mac M1 (arm64). It looks all good through my rhub checks :D https://github.com/DyfanJones/heck/actions/runs/10725077185 Thanks @CGMossa @JosiahParry for replying and fixing the issue. I will close this now and release the package shortly :) |
The text was updated successfully, but these errors were encountered: