You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a repository containing a Rust crate and separate R (using extendr) and Python bindings for it.
The project's layout is this:
.
├── fastcore # the Rust crate
├── py/navis-fastcore # Python bindings for `fastcore`
└── R/nat.fastcore # R bindings for `fastcore`
The project uses the concept of Rust "workspaces" so that the Rust code in R/nat.fastcore and py/navis-fastcore knows to look for the fastcore dependency in the parent directory.
The whole thing compiles just fine locally via rextendr::document. For user installs, the folks from @extendr (tagging in case they like to chime in) suggest usingremotes::install_github which unfortunately fails:
>remotes::install_github("schlegelp/fastcore-rs", subdir="R/nat.fastcore")
DownloadingGitHubreposchlegelp/fastcore-rs@HEAD
── RCMDbuild ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
checkingforfile ‘/private/var/folders/d1/ql9nlj6j4gndbkzbgrwbfkq80000gn/T/RtmpfGM9jr/remotes12a556a6e71cd/schlegelp-fastcore-rs-fec485f/R/nat.fastcore/✔ checkingforfile ‘/private/var/folders/d1/ql9nlj6j4gndbkzbgrwbfkq80000gn/T/RtmpfGM9jr/remotes12a556a6e71cd/schlegelp-fastcore-rs-fec485f/R/nat.fastcore/DESCRIPTION’
─ preparing ‘nat.fastcore’:
✔ checkingDESCRIPTIONmeta-information
─ cleaningsrc
─ checkingforLFline-endingsinsourceandmakefilesandshellscripts
─ checkingforemptyorunneededdirectories
─ building ‘nat.fastcore_0.0.0.9000.tar.gz’
*installing*source*package ‘nat.fastcore’ ...**usingstagedinstallation**libsusingCcompiler: ‘Appleclangversion15.0.0 (clang-1500.3.9.4)’
usingSDK: ‘MacOSX14.4.sdk’
rm-Rfnat.fastcore.so./rust/target/release/libnat_fastcore.aentrypoint.oclang-archarm64-I"/Library/Frameworks/R.framework/Resources/include"-DNDEBUG-I/opt/R/arm64/include-fPIC-falign-functions=64-Wall-g-O2-centrypoint.c-oentrypoint.o# 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" ]; then \
exportCARGO_HOME=/private/var/folders/d1/ql9nlj6j4gndbkzbgrwbfkq80000gn/T/RtmpR18qIM/R.INSTALL16b8154334f73/nat.fastcore/src/.cargo; \
fi&& \
exportPATH="/Users/philipps/projects/elastix-5/bin:/Users/philipps/.pyenv/shims:/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:/Users/philipps/.cargo/bin:/Users/philipps/.cargo/bin"&& \
cargobuild--lib--release--manifest-path=./rust/Cargo.toml--target-dir./rust/targeterror:failedtoparsemanifestat`/private/var/folders/d1/ql9nlj6j4gndbkzbgrwbfkq80000gn/T/RtmpR18qIM/R.INSTALL16b8154334f73/nat.fastcore/src/rust/Cargo.toml`Causedby:errorinheriting`fastcore`fromworkspacerootmanifest's `workspace.dependencies.fastcore`Caused by: failed to find a workspace rootmake: *** [rust/target/release/libnat_fastcore.a] Error 101ERROR: compilation failed for package ‘nat.fastcore’* removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/nat.fastcore’Warning message:In i.p(...) : installation of package ‘/var/folders/d1/ql9nlj6j4gndbkzbgrwbfkq80000gn/T//RtmpfGM9jr/file12a551c528764/nat.fastcore_0.0.0.9000.tar.gz’ had non-zero exit status
The error message suggests that Rust's cargo build can't find the root folder with the fastcore Rust crate.
Correct me if I'm wrong but it looks like install_remotes first clones the whole repository (I can still find remnants of it in a temporary folder) but then moves only the subdir somewhere else before building the R library, at which point the fastcore crate is not where it's expected anymore.
I appreciate the setup is rather complicated and I'm half expecting this to simply not be possible with install_github but I thought it's worth asking if you could think of a fix/workaround.
Hi.
I have a repository containing a Rust crate and separate R (using
extendr
) and Python bindings for it.The project's layout is this:
The project uses the concept of Rust "workspaces" so that the Rust code in
R/nat.fastcore
andpy/navis-fastcore
knows to look for thefastcore
dependency in the parent directory.The whole thing compiles just fine locally via
rextendr::document
. For user installs, the folks from @extendr (tagging in case they like to chime in) suggest usingremotes::install_github
which unfortunately fails:The error message suggests that Rust's
cargo build
can't find the root folder with thefastcore
Rust crate.Correct me if I'm wrong but it looks like
install_remotes
first clones the whole repository (I can still find remnants of it in a temporary folder) but then moves only thesubdir
somewhere else before building the R library, at which point thefastcore
crate is not where it's expected anymore.I appreciate the setup is rather complicated and I'm half expecting this to simply not be possible with
install_github
but I thought it's worth asking if you could think of a fix/workaround.(CC @jefferis)
The text was updated successfully, but these errors were encountered: