[macOS] Installation fails with Clang: `Error in read.table(file = file, header = header, sep = sep, quote = quote, : no lines available in input`
Closed this issue · 2 comments
While for me locally Icens
builds fine with GCC, on CI with Clang it fails, both Bioconductor release version and the latest master:
---> Configuring R-Icens
DEBUG: Preferred compilers: clang macports-clang-16 macports-clang-15 macports-clang-14 macports-clang-13 macports-clang-12 macports-clang-11 macports-clang-10 macports-clang-9.0
DEBUG: Using compiler 'MacPorts Clang 15'
DEBUG: Executing proc-pre-org.macports.configure-configure-0
DEBUG: Active variants check for source-type install considers depends_fetch depends_extract depends_lib depends_build depends_run: R-CRAN-recommended clang-15 R
DEBUG: Executing proc-pre-org.macports.configure-configure-1
DEBUG: compilers.enforce_c list:
DEBUG: compilers.enforce_fortran list:
DEBUG: compilers.enforce_some_fortran list:
DEBUG: Executing org.macports.configure (R-Icens)
DEBUG: Environment:
CC='/opt/local/bin/clang-mp-15'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_R_R-Icens/R-Icens/work/.CC_PRINT_OPTIONS'
CFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
CXX='/opt/local/bin/clang++-mp-15'
CXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
F90FLAGS='-pipe -Os'
FCFLAGS='-pipe -Os'
FFLAGS='-pipe -Os'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='13.0'
OBJC='/opt/local/bin/clang-mp-15'
OBJCFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
OBJCXX='/opt/local/bin/clang++-mp-15'
OBJCXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
DEBUG: system: cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_R_R-Icens/R-Icens/work/Icens" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes
Executing: cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_R_R-Icens/R-Icens/work/Icens" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘Icens’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* re-saving .R files as .rda
Warning in file(file, "rt") :
file("") only supports open = "w+" and open = "w+b": using the former
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
Execution halted
Command failed: cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_R_R-Icens/R-Icens/work/Icens" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes
Exit code: 1
Error: Failed to configure R-Icens: configure failure: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: configure failure: command execution failed
while executing
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_Users_runner_work_macports-ports_macports-ports_ports_R_R-Icens/R-Icens/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port R-Icens failed
According to the output produced by your CI, the command that failed is /opt/local/bin/R CMD build . --no-manual --no-build-vignettes
. Supposedly the command was run from within the Icens source tree.
But:
- We don't know where you got the Icens source tree from.
- We don't know what version of R you are using.
- You're not using the same
R CMD build
options as we do:--keep-empty-dirs
and--no-resave-data
(see).
FWIW here is the output of R CMD build --keep-empty-dirs --no-resave-data
on my laptop:
hpages@XPS15:~$ git clone https://github.com/Bioconductor/Icens
Cloning into 'Icens'...
remote: Enumerating objects: 379, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 379 (delta 32), reused 45 (delta 24), pack-reused 326
Receiving objects: 100% (379/379), 73.39 KiB | 1.03 MiB/s, done.
Resolving deltas: 100% (232/232), done.
hpages@XPS15:~$ R CMD build --keep-empty-dirs --no-resave-data Icens
* checking for file ‘Icens/DESCRIPTION’ ... OK
* preparing ‘Icens’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a ‘data/datalist’ file should be added
* building ‘Icens_1.75.0.tar.gz’
Output of R CMD INSTALL
:
hpages@XPS15:~$ R CMD INSTALL Icens_1.75.0.tar.gz
* installing to library ‘/home/hpages/R/R-4.4.r85510/site-library’
* installing *source* package ‘Icens’ ...
** using staged installation
** R
** data
** inst
** 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
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Icens)
Using R Under development (unstable) (2023-11-11 r85510) on Ubuntu 23.10:
hpages@XPS15:~$ R --version
R Under development (unstable) (2023-11-11 r85510) -- "Unsuffered Consequences"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
Note that Icens contains no native code hence there's nothing to compile so not sure how the specific compiler would matter when running R CMD build
on the package.
Plus Icens has no configure script so it's not clear why you get a "configure failure".
What do you get when you run R CMD build --keep-empty-dirs --no-resave-data
manually on the package source tree? What's your version of R? Are you on an intel Mac, arm64 Mac, or powerpc Mac?
Thanks,
H.
@hpages Thank you, passing --no-resave-data
helped, it installs fine on CI now. (I mentioned clang just for the sake of providing info, since for w/e reason I did not get an error locally, where I used gcc.)
Closing the issue since it is fixed now.