[R-SIG-Mac] library not found for -lX11

Berend Hasselman bhh at xs4all.nl
Thu Nov 29 17:49:53 CET 2012


On 29-11-2012, at 17:16, Jakson Alves de Aquino wrote:

> On Thu, Nov 29, 2012 at 10:26 AM, Prof Brian Ripley
> <ripley at stats.ox.ac.uk> wrote:
>>> On Thu, Nov 29, 2012 at 10:05 AM, Prof Brian Ripley
>>> <ripley at stats.ox.ac.uk> wrote:
>>>> 
>>>> But those paths should not be used unconditionally (as you have).
>>>> They are not right for most x86_64 Linux, Solaris, ... and they
>>>> might not even be right on Mac OS X (depending on the X
>>>> installation).
>>> 
>>> Sorry, but I don't known how to find the correct path at compile
>>> time.
>> 
>> Use a configure script: see 'Writing R Extensions' (and see how R
>> itself does it).
> 
> Thanks for the suggestion! I adapted the code from cairoDevice
> package. It was just a matter of replacing gtk with x11 and I hope
> that now it will build on any unix that have X installed.
> 
>    https://github.com/jalvesaq/VimCom/

Using Mac OS X 10.6.8 and R version 2.15.2 (2012-10-26)

Experiment 1
----------------
[.../vimcom]: R CMD check vimcom-master
* using log directory '/Users/berendhasselman/Documents/Programming/R/pkgsrc/vimcom/vimcom-master.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: x86_64-apple-darwin9.8.0 (64-bit)
* using session charset: UTF-8
* checking for file 'vimcom-master/DESCRIPTION' ... OK
* this is package 'vimcom' version '0.9-5'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Package suggested but not available: 'knitr'

The suggested packages are required for a complete check.
Checking can be attempted without them by setting the environment
variable _R_CHECK_FORCE_SUGGESTS_ to a false value.

Experiment 2
----------------
[.../vimcom]: export _R_CHECK_FORCE_SUGGESTS_=0
[.../vimcom]: R CMD check vimcom-master
* using log directory '/Users/berendhasselman/Documents/Programming/R/pkgsrc/vimcom/vimcom-master.Rcheck'
* using R version 2.15.2 (2012-10-26)
* using platform: x86_64-apple-darwin9.8.0 (64-bit)
* using session charset: UTF-8
* checking for file 'vimcom-master/DESCRIPTION' ... OK
* this is package 'vimcom' version '0.9-5'
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Package suggested but not available for checking: 'knitr'
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package 'vimcom' can be installed ... ERROR
Installation failed.
See '/Users/berendhasselman/Documents/Programming/R/pkgsrc/vimcom/vimcom-master.Rcheck/00install.out' for details.

Contents .../00install.out

* installing *source* package 'vimcom' ...
checking for pkg-config... no
ERROR: Cannot find pkg-config.
ERROR: configuration failed for package 'vimcom'
* removing '/Users/berendhasselman/Documents/Programming/R/pkgsrc/vimcom/vimcom-master.Rcheck/vimcom'


Install experiment
-------------------------
[.../vimcom]: R CMD INSTALL vimcom-master
* installing to library '/Users/berendhasselman/Library/R/2.15/library'
* installing *source* package 'vimcom' ...
checking for pkg-config... no
ERROR: Cannot find pkg-config.
ERROR: configuration failed for package 'vimcom'
* removing '/Users/berendhasselman/Library/R/2.15/library/vimcom'

pkg-config is not available standard on Mac OS X.
It is probably available on the Mac binary package machine.

I don't think you may assume that an X11 installation on Mac OS X has been registered with pkg-config or how you call that.

Your method is not foolproof.
Experts will have to enlighten you.

Berend



More information about the R-SIG-Mac mailing list