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.dun...@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@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac