fastr
fastr copied to clipboard
quadprog install package errors - incorrect looking f2c-wrapper invocation
Attempting to install the quadprog package. A dependency. I get the below. Notice the... -c -o solve.QP.compact.o solve.QP.compact.f This is out of order isn't it? Shouldn't it be... -c file.c -o file.o
R> install.packages("quadprog",quiet=FALSE,verbose=TRUE,keep_output=TRUE) Installing package into ‘/Users/mjh/Documents/R/fastr’ (as ‘lib’ is unspecified) system (cmd0): /Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/bin/R CMD INSTALL Content type 'application/octet-stream' length 33651 bytes (32 KB) foundpkgs: quadprog, /var/folders/dh/91wmrk0n6lzfmr4tjhjmcfp40000gn/T/Rtmpm5Skaa/downloaded_packages/quadprog_1.5-5.tar.gz files: /var/folders/dh/91wmrk0n6lzfmr4tjhjmcfp40000gn/T/Rtmpm5Skaa/downloaded_packages/quadprog_1.5-5.tar.gz
- installing source package ‘quadprog’ ... ** package ‘quadprog’ successfully unpacked and MD5 sums checked ** using staged installation ** libs "/Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/bin/f2c-wrapper" "/usr/local/bin/gfortran" -fno-optimize-sibling-calls -fPIC -O2 -c aind.f -o aind.o Running f2c transformation, the log will be in ./aind.f2c.log "/Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/llvm/native/bin/graalvm-native-clang" -I"/Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/include" -DNDEBUG -O2 -DFASTR -DNO_GNUR -fPIC -O2 -DFASTR -DNO_GNUR -c init.c -o init.o "/Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/bin/f2c-wrapper" "/usr/local/bin/gfortran" -fPIC -O2 -msse2 -mfpmath=sse -c -o solve.QP.compact.o solve.QP.compact.f Running f2c transformation, the log will be in ./solve.f2c.log clang: error: no such file or directory: './solve.c' clang: error: no input files rm: ./solve.c: No such file or directory make: *** [solve.QP.compact.o] Error 1 ERROR: compilation failed for package ‘quadprog’
- removing ‘/Users/mjh/Documents/R/fastr/quadprog’
The downloaded source packages are in ‘/private/var/folders/dh/91wmrk0n6lzfmr4tjhjmcfp40000gn/T/Rtmpm5Skaa/downloaded_packages’ Warning message: In install.packages("quadprog", quiet = FALSE, verbose = TRUE, keep_output = TRUE) : installation of package ‘quadprog’ had non-zero exit status
Hello,
yes this indeed looks like the f2c wrapper did not work properly. This was also reported here: #135. If you change FC
in etc/Makeconf
to point to just gfortran
(without the f2c wrapper), then this will get compiled directly by gfortran. The downside is that, unless you change it back, FastR would not try compiling Fotran code with F2C anymore and you would potentially miss on being able to run the newly installed packages in the LLVM mode (--R.BackEnd=llvm
) if they happen to contain Fortran code.
Hello, thanks for the reply.
I had seen #135 but not noticed that it also concerned f2c wrapper. However, the error seems different. #135 actually seems a compilation error. While here the invocation seems a bit off. I was thinking maybe the extra dotted levels - solve.QP.compact - are confusing some parsing somewhere. But so far looking around some have not figured out where that parsing might be done. Some of the invocation obviously comes from Makeconf but what adds on the -c -o solve.QP.compact.o solve.QP.compact.f bit? My preference would be to use FastR as intended. I can look at it some if I can figure out where to look. Although, not real familiar with this sort of code.
OK, I think I was sort of on the right track but the problem wasn't handling the multi-level name in f2c producing the "-c -o ..." but rather the handling of the extra dotted file extension in f2c-wrapper. I think here...
target_dir=$(dirname "$output_file") target_file=$(basename "$source_file") #target_file_no_ext=${target_file%%.} target_file_no_ext="${target_file%.}"
Replacing the commented with the single % I googled for removing the extension seems to work.
installing to /Users/mjh/Documents/R/fastr/00LOCK-quadprog/00new/quadprog/libs ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path
- DONE (quadprog) 1): succeeded '/Users/mjh/HalfPipe/halfpipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/bin/R CMD INSTALL -l '/Users/mjh/Documents/R/fastr' /var/folders/dh/91wmrk0n6lzfmr4tjhjmcfp40000gn/T/Rtmp0ehydb/downloaded_packages/quadprog_1.5-5.tar.gz'
Thanks for identifying the issue. I verified the wrong pattern was the crux of the problem.