Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install error on Ubuntu 22.04.4 using GitHub Actions for R CMD check #41

Open
isaactpetersen opened this issue Apr 28, 2024 · 7 comments

Comments

@isaactpetersen
Copy link

isaactpetersen commented Apr 28, 2024

I'm using GitHub Actions to check my package for CRAN via R CMD check. However, the R CMD check fails on Ubuntu due to inability to install textshaping. R CMD check succeeds on Windows or Mac. The operating system version for Ubuntu is 22.04.4. Here is the error:

-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/tmp/Rtmp3Zqy7b/RLIBS_4b7336119045/textshaping’
Warning in install.packages(package_name, ...) :
  installation of package ‘textshaping’ had non-zero exit status

This error seems similar to ones in prior reported issues:

Here is my workflow file: https://github.com/DevPsyLab/petersenlab/blob/main/.github/workflows/R-CMD-check.yaml

Here is a link to a failed job: https://github.com/DevPsyLab/petersenlab/actions/runs/8869922824/job/24351131206

I'm attaching the log output in the following text file: 00check.log

Any help would be greatly appreciated. If I need to run addition Linux code in the workflow file, it'd be helpful to know what to add and where. Thanks in advance!

@MislavSag
Copy link

Same for me

@Robinlovelace
Copy link

Same here

@Robinlovelace
Copy link

Also fails to install previous versions, upstream changes in Ubuntu to blame?

remotes::install_version("textshaping", "0.3.5")

@Robinlovelace
Copy link

Solution:

sudo apt install libharfbuzz-dev libfribidi-dev

Would save people time if that were documented in the README and error messages on fail.

@thomasp85
Copy link
Member

These are not new requirements nor has anything changed in textshaping to cause these to suddenly not install so I suspect it must be something upstream that I have no control over. FWIW, all these system dependencies are clearly stated in the DESCRIPTION file and lack of any of them will cause an install error message indicating the issue so I don't think textshaping should do more

@Robinlovelace
Copy link

Fair, I did notice a message saying to install these later. This issue can probably be closed.

@bernhardkaindl
Copy link

@isaactpetersen, @thomasp85, @Robinlovelace,

Normally, build configurations are written in a way that turns a failure to find a requirement into a fatal error at the time of configuration before the actual compilation of the project occurs.

That is the case for example with GNU autotools and CMake (there you add the flag REQUIRED) when you look for required dependencies. That results in an obvious explanatory fatal error on behalf of the build tool before compilation starts.

An automated check for spack/spack#47008 ran into a similar issue with the same error message:

We prepared harfbuzz and fribidi in this build, but it appears that in addition, textshaping also depends on pkgconfig to find those libraries, at least in our case. Adding pkgconfig to the required tools to be installed for the build of textshaping fixed the build issue.

Thankfully, due to finding this report, the submitter of the PR during which this error was triggered was able to point me here and that made me guess that missing pkgconfig might be the trigger in the case of this specific case.

However, it would be more favorable, if textshaping could terminate compilation early during the build/configuration phase when the detection fails and also stop with a fatal error if pkgconfig is not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants