[R-SIG-Mac] rgl revisions to allow dual install

stefano iacus jago at mclink.it
Mon Dec 11 13:22:01 CET 2006


I forgot to mention, no problem with x11 tcltk.
stefano

On 11/dic/06, at 21:12, stefano iacus wrote:

> Duncan,
> I see now. On PPC you should use
>
>     file.exists(system.file("libs/ppc", "aglrgl.so", package ="rgl"))
>
> and, under intel,
>
>     file.exists(system.file("libs/i386", "aglrgl.so", package ="rgl"))
>
> instead of just
>
>     file.exists(system.file("libs", "aglrgl.so", package ="rgl"))
>
> i.e.
>     file.exists(system.file(file.path("libs",.Platform$r_arch),
> "aglrgl.so", package ="rgl"))
>
>
> And yes, you have to explicitly set the DISPLAY var under the shell
> unless you use xterm.
>
> I have only one doubt, which I'm going to verify: if you override the
> DYLD_LIBRARY_PATH var there should be potential problems with tcltk
> which is still x11.
>
> stefano
>
>
>
> On 11/dic/06, at 20:49, Duncan Murdoch wrote:
>
>> On 12/10/2006 8:51 PM, stefano iacus wrote:
>>> It builds fine on PCC and apparently the two libs are in the
>>> installed directory.
>>> The only problem is that both on X11 term and on R.app always the
>>> X11 .dll is taken, so no AGL for me any more.
>>> I don't see any conditionals on .Platform$GUI in the loading of the
>>> library though.
>>
>> It's in the .onLoad function in zzz.R:
>>
>>    if ( .Platform$OS.type == "unix" ) {
>>      unixos <- system("uname",intern=TRUE)
>>      if ( unixos == "Darwin" ) {
>>        # For MacOS X we have to remove /usr/X11R6/lib from the
>> DYLD_LIBRARY_PATH
>>        # because it would override Apple's OpenGL framework
>>
>> Sys.putenv("DYLD_LIBRARY_PATH"=gsub("/usr/X11R6/lib","",Sys.getenv
>> ("DYLD_LIBRARY_PATH")))
>>        if ( .Platform$GUI == "AQUA" &&
>>             file.exists(system.file("libs", "aglrgl.so", package =
>> "rgl"))) {
>>          initValue <- 1
>>          rgl <<- "aglrgl"
>>        }
>>      }
>>    }
>>
>> Does the lib get a different name or sit somewhere else on that
>> system?
>>   I have the file.exists test in case someone has configured not to
>> build the AGL version, but maybe the filename is wrong.  Do you  
>> know a
>> safe test to see if the lib exists?
>>
>> On 12/10/2006 8:56 PM, stefano iacus wrote:
>>> and, for the standard  shell (i.e. not under xterm), I can open and
>>> plot on a  x11() device but during  demo(rgl)
>>>
>>>> rgl.open()
>>> Error in rgl.open() : rgl.open failed
>>>> rgl.open
>>
>> The initialization is currently done in .onLoad, and if it fails, no
>> additional attempts are made.  I'll see if it's safe to try again.
>>
>> By the way, did you manually set DISPLAY before you opened the x11
>> device?  I get an error in the standard shell when I try that, but
>> Sys.putenv fixes it.
>>
>> Duncan Murdoch
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>
> _______________________________________________
> 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