[R-pkg-devel] Win-builder not finding binaries provided by LinkingTo: cargo?
I think this is the pertinent error:
make: cargo: Command not found
That is, make is assuming that the cargo utility is installed and available on the PATH, but that doesn't appear to be true on the CRAN winbuilder machine. The salso package (https://cran.r-project.org/package=salso) explicitly requires cargo to be already available, per SystemRequirements: SystemRequirements: Cargo (>= 1.42.0) for installation from sources: see file INSTALL so you probably need to do something similar. I'd also recommend downloading the 'salso' package to see how they resolve this, or contacting the 'salso' maintainer to see what steps they took to ensure their package could build on CRAN. Best, Kevin On Tue, Apr 6, 2021 at 12:10 PM David Norris
<david at precisionmethods.guru> wrote:
For version 0.2-2 of my ?precautionary? package, I have added fast numerical routines implemented in Rust. In my DESCRIPTION file, I am ?LinkingTo: cargo (>= 0.1.28)?, but fail incoming check on Win-builder as follows: https://win-builder.r-project.org/incoming_pretest/precautionary_0.2-2_20210406_142130/Windows/00install.out * installing *source* package 'precautionary' ... ** using staged installation ** libs *** arch - i386 rm -Rf precautionary.dll ./rust/target/i686-pc-windows-gnu/release/libprecautionary.a entrypoint.o d:/Compiler/rtools40/mingw32/bin/gcc -I"D:/RCompile/recent/R/include" -DNDEBUG -I'd:/RCompile/CRANpkg/lib/4.1/cargo/include' -I"d:/Compiler/gcc-4.9.3/local330/include" -pedantic -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c entrypoint.c -o entrypoint.o cargo build --target=i686-pc-windows-gnu --lib --release --manifest-path=./rust/Cargo.toml make: cargo: Command not found make: *** [Makevars.win:11: rust/target/-pc-windows-gnu/release/libprecautionary.a] Error 127 ERROR: compilation failed for package 'precautionary' * removing 'd:/RCompile/CRANincoming/R-devel/lib/precautionary' As I understand the intention of package cargo https://CRAN.R-project.org/package=cargo, it aims to solve precisely this problem. Other platforms check my package just fine. Is the solution to be found in configuration of Win-builder, in my Makevars.win, or elsewhere? I have taken my Makevars.win straight from https://github.com/extendr/helloextendr/blob/main/src/Makevars.win as follows: TARGET = $(subst 64,x86_64,$(subst 32,i686,$(WIN)))-pc-windows-gnu LIBDIR = ./rust/target/$(TARGET)/release STATLIB = $(LIBDIR)/libprecautionary.a PKG_LIBS = -L$(LIBDIR) -lprecautionary -lws2_32 -ladvapi32 -luserenv all: C_clean $(SHLIB): $(STATLIB) $(STATLIB): cargo build --target=$(TARGET) --lib --release --manifest-path=./rust/Cargo.toml C_clean: rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) clean: rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) rust/target [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel