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

Cairo requires libXt development files #31

Open
glin opened this issue Sep 25, 2019 · 4 comments
Open

Cairo requires libXt development files #31

glin opened this issue Sep 25, 2019 · 4 comments

Comments

@glin
Copy link
Contributor

glin commented Sep 25, 2019

The Cairo R package has an additional dependency on libXt development headers (libxt-dev on Ubuntu or libXt-devel on CentOS), which isn't declared in the SystemRequirements: https://cran.r-project.org/web/packages/Cairo/index.html

Without libXt, Cairo installations will fail from missing an X11/Intrinsic.h file:

xlib-backend.c:34:74: fatal error: X11/Intrinsic.h: No such file or directory
 #include <X11/Intrinsic.h>      /*->    Xlib.h  Xutil.h Xresource.h .. */
                                                                          ^
compilation terminated.
make: *** [xlib-backend.o] Error 1
ERROR: compilation failed for package 'Cairo'

https://github.com/cran/Cairo/blob/34248669a392e7d33a5ac23f3784c6eb57f4dcac/src/xlib-backend.c#L34

There's been some discussion on removing X Intrinsics as a dependency for Cairo? but I don't think it's happened yet: https://lists.cairographics.org/archives/cairo/2014-August/025521.html

Since Cairo is a fairly common dependency for R packages, we should address this as soon as we add support for CRAN package overrides. Or consider adding libXt dev to the cairo rule as a temporary stopgap.

@zhijunyuu
Copy link

I have exactly the same issue as you, could you share how did you solve the problem ?

@pitkant
Copy link

pitkant commented Sep 20, 2022

As this issue is still open and I had exactly the same problem as of 2022, I would like to point out that tips from the following SO question helped me install Cairo (on Ubuntu 20.4.5 LTS, rocker/r-ver:4.2.1): https://stackoverflow.com/questions/23642353/error-message-installing-cairo-package-in-r

Basically adding libcairo2-dev libxt-dev xvfb xauth xfonts-base libgtk2.0-dev to RUN apt-get update && apt-get install. Note that not all of those might be necessary to successfully installing Cairo but I included them all to be on the safe side.

Also seems to affect RHEL #104

@glin
Copy link
Contributor Author

glin commented Sep 20, 2022

Yup, looks like the Cairo R package still requires libXt even though it's not declared. At this point, we might as well add libXt to the Cairo rule to work around this just because Cairo is so heavily used and depended on. There are a few other Cairo-using packages like httpgd/gdtools that don't need libXt, but getting Cairo working probably make it a worthy tradeoff.

@glin
Copy link
Contributor Author

glin commented Sep 21, 2022

I asked about this in the Cairo issue tracker: s-u/Cairo#39. libXt was apparently unneeded and removed from Cairo!

So we'll just wait for the next release of Cairo on CRAN and then close this issue. If the CRAN release takes too long, we could also still add libXt as a temporary stopgap.

@glin glin mentioned this issue Sep 21, 2022
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

3 participants