[R-SIG-Mac] Compiling Cairo package

Erich Neuwirth er|ch@neuw|rth @end|ng |rom un|v|e@@c@@t
Sun Dec 26 16:00:05 CET 2021


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 699 bytes
Desc: Message signed with OpenPGP
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20211226/34cb5275/attachment.sig>


More information about the R-SIG-Mac mailing list