[R-SIG-Mac] Compiling Cairo package

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Sun Dec 26 12:36:03 CET 2021


On 26/12/2021 6:04 a.m., Erich Neuwirth wrote:
> I am trying to compile Cairo.
> I get the following error
> 
> xlib-backend.c:34:10: fatal error: 'X11/Intrinsic.h' file not found
> #include <X11/Intrinsic.h>      /*->    Xlib.h  Xutil.h Xresource.h .. */
> 
> I have X11/Intrinsic.h in /opt/X11/include
> 
> I tried
> 
> Sys.setenv(LD_LIBRARY_PATH="/opt/X11:/opt/X11/lib")
> Sys.getenv("LD_LIBRARY_PATH")
> system("export LD_LIBRARY_PATH”)
> 
> and compiled again, but I get the same error.
> 
> What do I need to do so Intrinsic.h is found by the compiler?

Usually the location of include files is set at configure time.  For R, 
I use

   ../R-devel-src/configure --with-x --x-includes=/opt/X11/include 
--x-libraries=/opt/X11/lib

It's not clear to me whether Cairo is the R package or an external 
library, but if it's the R package, you might try

   install.packages("Cairo", type = "source", configure.args = 
"--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib")

Duncan Murdoch



More information about the R-SIG-Mac mailing list