[R-pkg-devel] Does dependencies up to date on the pretest CRAN infrastructure
Serge
Serge@Iov|e|| @end|ng |rom @tkpp@org
Fri Jan 12 20:30:46 CET 2024
Hello Ivan,
Here the output of Cxxflags on my local computer
> rtkore::CppFlags()
-DIS_RTKPP_LIB -DSTKUSELAPACK
> rtkore::CxxFlags()
-I/home/iovleff/R/x86_64-pc-linux-gnu-library/4.3/rtkore/include
-I/home/iovleff/R/x86_64-pc-linux-gnu-library/4.3/rtkore/projects
and here the code of the functions used internally by CxxFlags() (cpp11 is FALSE by default)
# Provide compiler flags -- i.e. -I/path/to/RTKpp.h
# @keywords internal
.rtkoreCxxFlags <- function(cpp11)
{
path1 <- .rtkore.system.file( "include" )
path2 <- .rtkore.system.file( "projects" )
if (.Platform$OS.type=="windows")
{
path1 <- .asBuildPath(path1);
path2 <- .asBuildPath(path2);
}
paste("-I", path1, " -I", path2, if (cpp11) " -std=c++11 " else "", sep="")
}
###########################
# Adapted from Rcpp package
###########################
# @rdname rtkoreFlags
# @keywords internal
.asBuildPath <- function(path)
{
if (.Platform$OS.type == "windows")
{
path <- normalizePath(path)
if (grepl(' ', path, fixed=TRUE))
path <- utils::shortPathName(path)
path <- gsub("\\\\", "/", path)
}
return(path)
}
Le 12/01/2024 à 20:14, Ivan Krylov a écrit :
> В Fri, 12 Jan 2024 19:09:29 +0100
> Serge <Serge.Iovleff using stkpp.org> пишет:
>
>> I updated the package rtkore one month ago, fixing a compilation
>> problem on windows devel platform.
>>
>> MixAll has a dependency to rtkore. Thus, I suspect that the error
>> reported below is due to the presence of the old version of rtkore on
>> the pretest infrastructure of the CRAN.
>
> <https://win-builder.r-project.org/incoming_pretest/MixAll_1.5.4_20240108_094228/Windows/00install.out>:
>
> /usr/bin/make -C projects/Clustering/src/
> make[2]: Entering directory '/d/temp/RtmpYJkDTJ/R.INSTALL316dc7c0f48e6/MixAll/inst/projects/Clustering/src'
> g++ -std=gnu++17 -I"D:/RCompile/recent/R/include" -DNDEBUG `D:/RCompile/recent/R/bin/Rscript -e "rtkore:::CppFlags()"` -I'D:/RCompile/CRANpkg/lib/4.4/Rcpp/include' -I'D:/RCompile/CRANpkg/lib/4.4/rtkore/include' -I"d:/rtools43/x86_64-w64-mingw32.static.posix/include" `D:/RCompile/recent/R/bin/Rscript -e "rtkore:::CxxFlags()"` -I../inst/projects/ -I../inst/include/ -fopenmp -pedantic -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -I../../../projects/ -I../../../include/ STK_CategoricalParameters.cpp -c -o ../../../bin/STK_CategoricalParameters.o
> /bin/sh: line 1: /x86_64-w64-mingw32.static.posix/bin/g++: Bad address
> make[2]: *** [makefile:54: ../../../bin/STK_CategoricalParameters.o] Error 126
>
> RTools uses Cygwin features to emulate the presence of certain virtual
> paths; /x86_64-w64-mingw32.static.posix/bin/g++ actually exists and is
> transparently mapped to
> d:/rtools43/x86_64-w64-mingw32.static.posix/bin/g++.exe:
>
> User using WINMACHINE MSYS ~
> $ /x86_64-w64-mingw32.static.posix/bin/g++ --version
> g++.exe (GCC) 12.2.0
>
> The "Bad address" here means that /bin/sh got an EFAULT while trying to
> launch g++.exe:
> https://stat.ethz.ch/pipermail/r-package-devel/2023q4/010223.html
>
> Unless there is something extremely weird in the command line arguments
> returned by Rscript -e "rtkore:::CxxFlags()" that causes the process to
> fail to launch (in my opinion, very unlikely, but can you print them
> from your compilation process just in case?), I would be looking for
> problems elsewhere.
>
> In particular, the problem cannot be in having rtkore installed that is
> one version too old, because you only changed Makevars in that version,
> and your package MixAll doesn't use the Makevars from a different
> source package.
>
More information about the R-package-devel
mailing list