Thanks Rob, that's a very good trick to know.

Duncan's suggestion about using configure.args="--disable-cocoa" worked for me 
- I have an rgl installation that works interactively.  Now however, when I try 
to install a source package that uses rgl, I get the following (also sent to 
Duncan separately).  Does this ring any bells?  I'm not sure what the install 
process is doing with dependent packages that is different, but obviously it 
doesn't like something.  Thank you.  Bryan

* installing *source* package ‘ChemoSpec’ ...
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Warning: replacing previous import ‘panel.lines’ when loading ‘lattice’
** help
*** installing help indices
** building package indices
** installing vignettes
   ‘ChemoSpec.Rnw’ 
** testing if installed package can be loaded
*** arch - i386
********
********  Loading Bryan's .Rprofile
********
Loading required package: brew
********
********  Completed Bryan's .Rprofile GET TO WORK!
********
Warning: replacing previous import ‘panel.lines’ when loading ‘lattice’
Error : .onLoad failed in loadNamespace() for 'rgl', details:
  call: library.dynam(dll, pkg, lib.loc = lib)
  error: shared object ‘rgl.so’ not found
Error: loading failed
Execution halted
*** arch - x86_64
********
********  Loading Bryan's .Rprofile
********
Loading required package: brew
********
********  Completed Bryan's .Rprofile GET TO WORK!
********
Warning: replacing previous import ‘panel.lines’ when loading ‘lattice’
ERROR: loading failed for ‘i386’
* removing ‘/Users/bryanhanson/Library/R/3.0/library/ChemoSpec’
* restoring previous ‘/Users/bryanhanson/Library/R/3.0/library/ChemoSpec’


On Feb 5, 2013, at 10:35 AM, Robert J Goedman <goed...@icloud.com> wrote:

> Bryan,
> 
> I've seen that issue a couple of times as well. Trying to install rgl 
> 0.93.934 from R-Forge using R.app, I get (in the R.app console):
> 
> ...
> mv AGL/* .
> MAKINGAGL=TRUE /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB  -o 
> aglrgl.so *.cpp *.c \
>               osx/*.mm osx/*.cpp
> mv: rename AGL/* to ./*: No such file or directory
> make: [aglrgl.so] Error 1 (ignored)
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG 
> -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/usr/local/include   -g -O2 -fPIC  -g 
> -O2  -c x11gui.cpp -o x11gui.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG 
> -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/usr/local/include   -g -O2 -fPIC  -g 
> -O2  -c x11lib.cpp -o x11lib.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG 
> -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/usr/local/include   -fPIC   -c 
> osx/osxgui.mm -o osx/osxgui.o
> osx/osxgui.mm:9:2: error: #error Cocoa backend reguires FreeType font reneder
> make[1]: *** [osx/osxgui.o] Error 1
> make: *** [aglrgl.so] Error 1
> 
> The downloaded source packages are in
>       
> ‘/private/var/folders/fl/jchvcqm92rd7bjh6hzkd1cqc0000gn/T/RtmpgyhrHG/downloaded_packages’
> ERROR: compilation failed for package ‘rgl’
> * removing ‘/Users/rob/Library/R/3.0/library/rgl’
> * restoring previous ‘/Users/rob/Library/R/3.0/library/rgl’
>> 
> 
> On my system the following trick works. Make sure to keep a copy of the RGL 
> package you want to install (typically the version is in the directory 
> containing the downloaded packages, as printed at the end of the install 
> process in the R.app console). Notice that these are removed if you quit 
> R.app! So just keep R.app running.
> 
> I then use, in a terminal window:
> 
> cd 
> /private/var/folders/fl/jchvcqm92rd7bjh6hzkd1cqc0000gn/T/RtmpgyhrHG/downloaded_packages
> R_ARCH=/X86_64 R CMD INSTALL rgl_0.93.924.tar.gz
> 
> Towards the end of the build/install I get:
> 
> ...
> installing to /Users/rob/Library/R/3.0/library/rgl/libs/X86_64
> ** R
> ** demo
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** testing if installed package can be loaded
> Warning in rgl.init(initValue) : RGL: unable to open X11 display
> Warning in fun(libname, pkgname) : error in rgl_init
> 
> * DONE (rgl)
> 
> These last 2 warning messages only show up if XQuartz.app is not running. 
> 
> Testing in R.app:
> 
> library(rgl)
> demo(rgl)
> 
> works (at least on my system!). 
> 
> Regards,
> Rob J. Goedman
> goed...@icloud.com
> 
> 
> 
> 
> On Feb 5, 2013, at 5:25 AM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
> 
>> On 13-02-05 8:07 AM, Bryan Hanson wrote:
>>> Thanks for taking the time to look at this carefully Duncan.  I don't see 
>>> the warning you mention, and I don't see the string R_pretty0 in the log 
>>> either.  I'm appending right here in case there is something else you want 
>>> to look at.  I restarted my computer but the result is the same.  I'm on 
>>> OSX OS X 10.8.2 (12C60). Thanks, Bryan
>> 
>> Okay, now you're getting a different error than you described before. This 
>> one I think you can fix:  you need Freetype, and rgl needs to be able to 
>> find it when you do the install.  Normally it does that using the 
>> freetype-config utility, but you're not finding that:
>> 
>> [deletions]
>>> checking for freetype-config... no
>> 
>> I thought (from online readings) that Freetype should be available in a 
>> standard OSX install, so I'm not sure why it's not working for you.  You can 
>> disable the Cocoa (native) support by configuring with the configure option
>> 
>> install.packages("rgl", ..., configure.args="--disable-cocoa")
>> 
>> and then you should be able to get the install to complete, but it might be 
>> better to figure out why freetype-config isn't working for you.
>> 
>> Duncan Murdoch
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to