[R-pkg-devel] Problems with devtools::build() in R

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed May 17 09:42:49 CEST 2023


Can you build a Fortran program? I.e., does the following work?

cat >hello.f90 <<EOF
program hello
 print *, 'Hello world'
end program
EOF
gfortran -o hello hello.f90 && ./hello

Does `which gfortran` confirm that it's the executable you expect it to
be?

What does `gfortran -print-search-dirs` say about the locations for its
files? (Where does -lgfortran actually live?)

What does your file.path(R.home('etc'), 'Makeconf') say about the
library paths?

(Using `R CMD build` to build the package doesn't help either, right? If
yes, a faster way of reproducing the problem would be to run the
following command:

PKG_CPPFLAGS=-I/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include \
 R CMD SHLIB *cpp

...in the src directory of your package, instead of waiting for R CMD
build to try to install the resulting source package and fail.)

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list