library not found for -lX11
On Nov 28, 2012, at 7:38 PM, Jakson Alves de Aquino wrote:
Hi, I submitted a package to CRAN: http://cran.r-project.org/web/packages/vimcom/index.html It builds on Linux without warnings, but there is the following error on Mac OS X: ld: library not found for -lX11 collect2: ld returned 1 exit status make: *** [vimcom.so] Error 1 ERROR: compilation failed for package 'vimcom' The complete log is here: http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/vimcom-00install.html I know that I have to edit the src/Makevars file, but I don't know what I should put there and I don't have access to any machine running Mac OS X to make tests. Any help will be appreciated.
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
Thanks, -- Jakson Alves de Aquino Federal University of Cear? Social Sciences Department www.lepem.ufc.br/aquino.php
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac