[R-SIG-Mac] Cairo device

John Maindonald john.maindonald at anu.edu.au
Thu Jun 3 16:26:55 CEST 2010


Thanks.

I have now upgraded to R-2.11.1 (the latest binary). 

My GTK is from GTK_2.18.5-X11.pkg

Cairo() still gives 
> Cairo()
Error in Cairo() : Graphics API version mismatch

> sessionInfo()
R version 2.11.1 (2010-05-31) 
x86_64-apple-darwin9.8.0 

locale:
[1] C

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] playwith_0.9-45      gWidgetsRGtk2_0.0-65 gWidgets_0.0-41     
[4] cairoDevice_2.10     lattice_0.18-8      

loaded via a namespace (and not attached):
[1] RGtk2_2.12.18  gridBase_0.4-3 tools_2.11.1  
Warning message:
'DESCRIPTION' file has 'Encoding' field and re-encoding is not possible 

You are saying that I need the version of cairoDevice that is
compiled under R 2.12.0?

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
http://www.maths.anu.edu.au/~johnm

On 03/06/2010, at 5:58 PM, Prof Brian Ripley wrote:

> On Thu, 3 Jun 2010, John Maindonald wrote:
> 
>> I have been trying to invoke cairoDevice on the Mac.
>> Is there something wrong with my setup that is causing
>> the API version mismatch?
> 
> The message indicates that the cairoDevice package was compiled under a different version of R from the one you are using. (E.g. R 2.12.0 will require API version 7, but cairoDevice will not currently compile under pre-2.12.0: if you try the version compiled under 2.11.x you do get this message.)
> 
> Did you compile this from the sources, or if not, exactly what file are you using?  The current CRAN binary download works for me with 2.11.1 (i386 and x86_64).
> 
> It will only work if you have the appropriate Gtk2 package installed.
> I am fairly sure the one my system is picking up is GTK_2.18.5-X11.pkg
> 
> I would make sure that you have R 2.11.1 and only that installed, then try again.
> 
>> 
>> Under R64, I get:
>> 
>>> library(cairoDevice)
>>> Cairo()
>> Error in Cairo() : Graphics API version mismatch
>> 
>>> sessionInfo()
>> R version 2.11.0 (2010-04-22)
>> x86_64-apple-darwin9.8.0
>> 
>> locale:
>> [1] C
> 
> Not BTW a good idea: there's no need to cripple R's handling of data in this way.
> 
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>> 
>> other attached packages:
>> [1] cairoDevice_2.10
>> 
>> Under R32 (maybe cairoDevice is not expected to work under R32), I get:
>> 
>>> library(cairoDevice)
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>> unable to load shared library '/Library/Frameworks/R.framework/Resources/library/cairoDevice/libs/i386/cairoDevice.so':
>> dlopen(/Library/Frameworks/R.framework/Resources/library/cairoDevice/libs/i386/cairoDevice.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/2.10/Resources/lib/libR.dylib
>> Referenced from: /Library/Frameworks/R.framework/Resources/library/cairoDevice/libs/i386/cairoDevice.so
>> Reason: image not found
>> Error: package/namespace load failed for 'cairoDevice'
>>> sessionInfo()
>> R version 2.11.0 (2010-04-22)
>> i386-apple-darwin9.8.0
>> 
>> locale:
>> [1] en_AU.UTF-8/en_AU.UTF-8/C/C/en_AU.UTF-8/en_AU.UTF-8
>> 
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>> 
>> loaded via a namespace (and not attached):
>> [1] grid_2.11.0        lattice_0.18-8     lme4_0.999375-32
>> [4] Matrix_0.999375-39 nlme_3.1-96
>> 
>> John Maindonald             email: john.maindonald at anu.edu.au
>> phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
>> Centre for Mathematics & Its Applications, Room 1194,
>> John Dedman Mathematical Sciences Building (Building 27)
>> Australian National University, Canberra ACT 0200.
>> http://www.maths.anu.edu.au/~johnm
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list