Skip to content
Prev 9510 / 15075 Next

library not found for -lX11

On Nov 28, 2012, at 7:38 PM, Jakson Alves de Aquino wrote:

            
The issue is not Mac specific at all. A couple points: you cannot assume X11 because R can be built with or without X11 - in fact most recent OS X comes without X11 so requiring it may limit the availability of your package. If you really require X11 you'll have to declare that in your DESCRIPTION file. Furthermore, R doesn't expose X11 flags to packages so you'll have to write a configure test to determine proper X1 flags for your package. Just adding -lX11 to Makevars doesn't work. See the autoconf documentation - there are typically tests for X11 that can be re-used (R uses them, too). This may also require special flags depending on the configuration (autoconf provides --x-libraries and --x-includes for that). I don't know what you really need - ideally, you should make any X11 code conditional on the availability of X11 --  I don't know whether that is a basic requirement for your package or not, so how to proceed from here may depend on that.

Cheers,
Simon