Search code examples
rgithub-actions

R-CMD-check on Github fails with 'configure' exists but is not executable -- see the 'R Installation and Administration Manual'


I'm developing a R package with compiled code. I have a configure file that should be run during installation. R CMD CHECK works fine on my local Ubuntu machine. However, it fails on all OS checks on GitHub with the error (for Ubuntu):

Run r-lib/actions/check-r-package@v2
Run ## --------------------------------------------------------------------
── R CMD build ─────────────────────────────────────────────────────────────────
* checking for file ‘.../DESCRIPTION’ ... OK
* preparing ‘idps’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
      -----------------------------------
* installing *source* package ‘idps’ ...
** using staged installation
ERROR: 'configure' exists but is not executable -- see the 'R Installation and Administration Manual'
* removing ‘/tmp/RtmpgriSYl/Rinst1bf31f43445d/idps’
      -----------------------------------
ERROR: package installation failed
Error: Error in proc$get_built_file() : Build process failed
Calls: <Anonymous> ... build_package -> with_envvar -> force -> <Anonymous>
Execution halted
Error: Process completed with exit code 1.
Run ## --------------------------------------------------------------------
Show testthat output
Run actions/upload-artifact@v3
Warning: No files were found with the provided path: /home/runner/work/idps/idps/check. No artifacts will be uploaded.

Similar error occurs with the other OS checks. I have tried to make configure file executable, but it did not work. I have also to edit the yaml file and set a TMPDIR, it didn't work as well.

The workflow file is here. The result of R CMD CHECK on all selected OS is here. My question would be how to solve this issue?

EDIT: So far, changing the exceuability of scripts solved the issue for Ubuntu checks:

chmod +x configure cleanup 
git update-index --chmod=+x configure cleanup

Solution

  • Maybe someone will find this useful in the future (probably me as well), so what I did so far:

    1. Changing the executability of scripts solved the issue for Ubuntu & macOS checks as:
    chmod +x configure cleanup
    git update-index --chmod=+x configure cleanup
    
    1. I added modified the R-CMD-Check.yaml by adding this lines to ensure that dependencies are met:
          - name: "[Stage] [macOS] Install required system libs"
            if: runner.os == 'macOS'
            run: brew install fftw
    
          - name: "[Stage] [Windows] Install required system libs"
            if: runner.os == 'Windows'
            run: pacman -Syu mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-fftw --noconfirm