-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi ! this project looks very interesting and I wanted to test it, so I followed the suggestions and installed rustup and have version 1.86 of rustc and cargo.
I get an error that says the crate std is not included.
here is the compile error:
remotes::install_github("ixpantia/structr")
Downloading GitHub repo ixpantia/structr@HEAD
Running R CMD build...
- checking for file 'C:\Users\Marti\AppData\Local\Temp\Rtmp6DQq97\remotes19860644ce0\ixpantia-structr-2acc0bb/DESCRIPTION' ... OK
- preparing 'structr':
- checking DESCRIPTION meta-information ... OK
- cleaning src
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'structr_0.1.0.9000.tar.gz'
Installing package into ‘C:/Users/Marti/AppData/Local/R/win-library/4.5’
(as ‘lib’ is unspecified) - installing source package 'structr' ...
** this is package 'structr' version '0.1.0.9000'
** using staged installation
Using cargo 1.86.0 (adf9b6ad1 2025-02-28)
Using rustc 1.86.0 (05f9846f8 2025-03-31)
Building for CRAN.
Writingsrc/Makevars.win.
tools/config.Rhas finished.
** libs
using C compiler: 'gcc.exe (GCC) 14.2.0'
gcc -I"C:/PROGRA1/R/R-451.0/include" -DNDEBUG -I"C:/rtools45/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu2x -mfpmath=sse -msse2 -mstackrealign -c entrypoint.c -o entrypoint.o
mkdir -p ./rust/target/libgcc_mock
touch ./rust/target/libgcc_mock/libgcc_eh.a
if [ "" != "true" ]; then
if [ -f ./rust/vendor.tar.xz ]; then
tar xf rust/vendor.tar.xz &&
mkdir -p /c/Users/Marti/AppData/Local/Temp/Rtmp8OjGEK/R.INSTALLf70308443bb/structr/src/.cargo &&
cp rust/vendor-config.toml /c/Users/Marti/AppData/Local/Temp/Rtmp8OjGEK/R.INSTALLf70308443bb/structr/src/.cargo/config.toml;
fi;
fi
Build the project using Cargo with additional flags
export CARGO_HOME=/c/Users/Marti/AppData/Local/Temp/Rtmp8OjGEK/R.INSTALLf70308443bb/structr/src/.cargo &&
export LIBRARY_PATH=";/c/Users/Marti/AppData/Local/Temp/Rtmp8OjGEK/R.INSTALLf70308443bb/structr/src/./rust/target/libgcc_mock" &&
RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --target=x86_64-pc-windows-gnu --lib --release --manifest-path=rust/Cargo.toml --target-dir=./rust/target
Compiling proc-macro2 v1.0.95
Compiling unicode-ident v1.0.18
Compiling version_check v0.9.5
Compiling autocfg v1.4.0
Compiling quote v1.0.40
Compiling syn v2.0.100
Compiling num-traits v0.2.19
Compiling ahash v0.8.11
Compiling serde v1.0.219
Compiling once_cell v1.21.3
error[E0463]: can't find crate for std
|
= note: the x86_64-pc-windows-gnu target may not be installed
= help: consider downloading the target with rustup target add x86_64-pc-windows-gnu
For more information about this error, try rustc --explain E0463.
error: could not compile once_cell (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
make: *** [Makevars.win:22: rust/target/x86_64-pc-windows-gnu/release/libstructr.a] Error 101
ERROR: compilation failed for package 'structr'
- removing 'C:/Users/Marti/AppData/Local/R/win-library/4.5/structr'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/Marti/AppData/Local/Temp/Rtmp6DQq97/file1987c9f30/structr_0.1.0.9000.tar.gz’ had non-zero exit status
system("rustc --explain E0463")
A crate was declared but cannot be found.
Erroneous code example:
extern crate foo; // error: can't find crate
You need to link your code to the relevant crate in order to be able to use it
(through Cargo or the -L option of rustc, for example).
Common causes
- The crate is not present at all. If using Cargo, add it to
[dependencies]
in Cargo.toml. - The crate is present, but under a different name. If using Cargo, look for
package =under[dependencies]in Cargo.toml.
Common causes for missing std or core
- You are cross-compiling for a target which doesn't have
stdprepackaged.
Consider one of the following:- Adding a pre-compiled version of std with
rustup target add - Building std from source with
cargo build -Z build-std - Using
#![no_std]at the crate root, so you won't needstdin the first
place.
- Adding a pre-compiled version of std with
- You are developing the compiler itself and haven't built libstd from source.
You can usually build it withx.py build library/std. More information
about x.py is available in the rustc-dev-guide.