[Rd] R, OSX, should creating SVGs request XQuartz

Simon Urbanek simon.urbanek at r-project.org
Wed Aug 27 15:49:32 CEST 2014


On Aug 27, 2014, at 5:45 AM, Jonathon Love <jon at thon.cc> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> hi,
> 
> on OS X, when you try and use something which depends on X11, and you
> don't have XQuartz installed, you receive an error message, it directs
> you to download XQuartz, and then it euthanizes your process.
> 
> (my guess is that there is a skeleton X11 dylib installed in OS X by
> default, and it is responsible for the error message and the
> euthanasia. once XQuartz is installed, the skeleton dylib is replaced
> with a functioning version)
> 
> in my application, i write SVGs using:
> 
> grDevices::svg( ... )
> 
> this provokes the X11 error message. i was wondering if this is an
> erroneous/unnecessary loading of X11, or if grDevices::svg() does in
> fact rely on X11 functions?
> 

It relies on a library that does: cairo
It doesn't actually call any X11 calls for the SVG backend, but since cairo also supports X11 back-end it has to link against X11. Apple chose to write the stub in such a way that it kicks in when you load X11 even if you don't actually call it.

The only way out would be to compile your own cairographics library and R with disabled X11 support.

Cheers,
Simon



> obviously, if i can avoid making my users install XQuartz if it isn't
> necessary (not to mention avoiding the abrupt euthanizing of my
> program), that would be ideal from my perspective.
> 
> with thanks
> 
> jonathon
> 
> 
> - -- 
> 
> JASP - A Fresh Way to Do Statistics
> http://jasp-stats.org/
> 
> - --
> 
> How happy is he born and taught,
> That serveth not another's will;
> Whose armour is his honest thought,
> And simple truth his utmost skill
> 
> This man is freed from servile bands
> Of hope to rise, or fear to fall:
> Lord of himself, though not of lands,
> And, having nothing, yet hath all.
> 
>  -- Sir Henry Wotton
> 
> 
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
> Comment: GPGTools - https://gpgtools.org
> 
> iQIcBAEBCgAGBQJT/aizAAoJEH277gjmPGDYDH4P/3gRNBLCM81s6psZQRSY9lfe
> jZQ9ZqpjIk68ulyRwl2JxrkHuzCHYbSh6cYRk6N2CBgdxQnfYG0De8dOUHMX6bfh
> 263yROUTcvQ1/jztqNlvhW0MbpnzVtoCkCXvuAzMx9R0CdLzqmUGZUTkdLESPpdE
> 5zOkIRtcO/pMuq92MRl3ucYGsP7T+bXRTLY64ZkFnJT3vpNVPBwcIFYigdoxw9cw
> 8l+PY2iyAn5wyoHbB523GWun5jqgwY1YFnXblftuI5yN5Y1UybOqwfWKnO1367bS
> Bsw8Z4oXidTqblfvchDiyD1V/nfrm6f8BdAdi/sZZYh/jWB2vYNdgdVNGBi/R85O
> inVqZzxZ/KU30sV+HVW+H3d798m9mWwTtOA9hsO+bXYsxwYsVUhwSHaUACxN7bz3
> vXN3C1zq7HvtsOOR+wMpMIrDvTgwx1MKpFUhbA7n8+acqh+nIkNttSS+I6SAA9EO
> gP//lBoFy57a5bU1U2vlmvqtWHfJKeIU3BDSchoLn+WUfTdaccKtfgk898lb+Ciu
> UIKOocWHrE8cIXUdk+7C6GyrVecZa4fe/LAid1NDbDRgK2Bi5vGeYydA+8OGJzlG
> K6m8fpme0mApOopsXrOLURlscY7829/TK9CrM9F+zHD8xm7cs330KHn650aiF0pB
> 2q2TifMU7Kxar1FiY+Uq
> =a93C
> -----END PGP SIGNATURE-----
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



More information about the R-devel mailing list