[R-SIG-Mac] Compiling Cairo package

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Wed Dec 29 00:17:51 CET 2021


Erich,

can you, please, send me the full output and the exact setup you used? I suspect you may be using XQuartz 2.8.0 or higher which has broken pkg-config files - latest XQuartz requires a patch to make any compilation against it work (see https://github.com/R-macos/recipes/blob/master/other/tcltk/pkgconfig.patch for what we do to compile Tk).

From what I can see the only line that has actually any effect at all is

Sys.setenv(C_INCLUDE_PATH="/opt/X11/include")

so all the others are likely not needed, but I'm not sure of your setup so can't test.

Cheers,
Simon



> On Dec 27, 2021, at 4:00 AM, Erich Neuwirth <erich.neuwirth using univie.ac.at> wrote:
> 
> Duncan’s suggestion did not work
> So I tried
> 
> Sys.setenv(LD_LIBRARY_PATH="/opt/X11:/opt/X11/lib")
> system("export LD_LIBRARY_PATH")
> Sys.setenv(C_INCLUDE_PATH="/opt/X11/include")
> system("export C_INCLUDE_PATH")
> Sys.getenv()
> 
> and then simply doing
> 
> install.packages(“Cairo”)
> worked.
> 
> 
>> On 26.12.2021, at 12:36, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>> 
>> 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
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list