Opened 12 years ago

Closed 12 years ago

#35845 closed defect (fixed)

R-framework package 'agl' has undeclared dependencies

Reported by: Polyergic (Shad Sterling) Owned by: kjellpk (Kjell Konis)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: cooljeanius (Eric Gallager)
Port: R-framework R-app

Description

After installing R-framework and R-app, within either the R command install.packages("rgl") yields a failure to compile:

In file included from Texture.hpp:14,
                 from scene.h:18,
                 from ABCLineSet.hpp:4,
                 from ABCLineSet.cpp:1:
opengl.hpp:24:19: error: GL/gl.h: No such file or directory
opengl.hpp:25:20: error: GL/glu.h: No such file or directory
make: *** [ABCLineSet.o] Error 1
ERROR: compilation failed for package ‘rgl’

After some googling, it turns out that after installing the port 'mesa' the R command succeeds in the terminal interface to R-framework, but not in the R-app interface:

mkdir -p AGL
mv AGL/* .
MAKINGAGL=TRUE /opt/local/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)
/opt/local/bin/llvm-g++-4.2 -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/local/include   -pipe -O2 -m64 -fPIC  -pipe -O2 -m64  -c x11gui.cpp -o x11gui.o
/opt/local/bin/llvm-g++-4.2 -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/local/include   -pipe -O2 -m64 -fPIC  -pipe -O2 -m64  -c x11lib.cpp -o x11lib.o
/opt/local/bin/llvm-g++-4.2 -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/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
ERROR: compilation failed for package ‘rgl’

Attachments (1)

Portfile.diff (2.1 KB) - added by kjellpk (Kjell Konis) 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to kjell.konis@…

comment:2 Changed 12 years ago by kjellpk (Kjell Konis)

Maintainer here - does it work if you install the freetype port? Unfortunately, R packages that have non R dependencies need those installed manually. The funny thing here is I'm pretty sure that the rgl package works on the official R binary release. I'll check and see. If I can, I'll add a fix to the R-framework port. (I am on vacation now so it'll probably be a while for that though).

comment:3 Changed 12 years ago by Polyergic (Shad Sterling)

Freetype was already installed.

Recently updated macports & outdated ports; texlive-bin @2012_3+x11 gave a notice that “XeTeX is built without support for Apple Type Services for Unicode Imaging (ATSUI) or Apple Advanced Typography (AAT). To enable it, build texlive-bin with the +atsui variant. Note that this will force texlive and all of its dependencies to be built 32-bit.” (I'd rather keep everything 64-bit), and I followed the recommendation from TeXShop @2.47_0 that Lion users replace it with TeXShop3 @3.11_0.

After the updates, installing rgl still appears to succeed in the terminal, and fails with the same error in R-app. I tried downloading RStudio, and it appears to succeed within RStudio. Is R-app starting R-framework in a different environment? Could it just be a wrong setting?

I don't mind having to install dependencies manually, but I would prefer an error message like “R package 'rgl' requires external library 'mesa', which must be installed outside of R. If you're not sure how to do this, see http://r-project.org/doc/deps#macports.” I was installing rgl because Rcmdr depends on it, and I am able to run Rcmdr from terminal or Rstudio, so I don't expect the problem with R-app to prevent me from getting things done.

comment:4 Changed 12 years ago by bcbarnes@…

I ran into this problem today while trying to install the igraph package via the R.app interface (OS X 10.8, latest Xcode/etc). Note, in the R.app GUI I was specifying to install dependencies and to install at "user level" from CRAN (sources).

MAKINGAGL=TRUE /opt/local/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)
/opt/local/bin/g++-mp-4.7 -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/local/include   -pipe -O2 -m64 -fPIC  -pipe -O2 -m64  -c x11gui.cpp -o x11gui.o
/opt/local/bin/g++-mp-4.7 -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/local/include   -pipe -O2 -m64 -fPIC  -pipe -O2 -m64  -c x11lib.cpp -o x11lib.o
I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/local/include   -fPIC   -c osx/osxgui.mm -o osx/osxgui.o
make[1]: I/opt/local/Library/Frameworks/R.framework/Resources/include: No such file or directory
make[1]: [osx/osxgui.o] Error 1 (ignored)
/opt/local/bin/g++-mp-4.7 -I/opt/local/Library/Frameworks/R.framework/Resources/include -I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -DHAVE_PNG_H -DRGL_USE_COCOA -Iext -I/opt/local/include   -pipe -O2 -m64 -fPIC  -pipe -O2 -m64  -c osx/osxlib.cpp -o osx/osxlib.o
/opt/local/bin/g++-mp-4.7 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/lib -o aglrgl.so ABCLineSet.o BBoxDeco.o Background.o Color.o Disposable.o Light.o LineSet.o LineStripSet.o Material.o PlaneSet.o PointSet.o PrimitiveSet.o QuadSet.o RenderContext.o Shape.o SphereMesh.o SphereSet.o SpriteSet.o String.o Surface.o TextSet.o Texture.o Viewpoint.o api.o assert.o callbacks.o device.o devicemanager.o fps.o ftgl.o geom.o glErrors.o glgui.o gui.o init.o par3d.o pixmap.o render.o rglmath.o rglview.o scene.o select.o win32gui.o win32lib.o x11gui.o x11lib.o gl2ps.o osx/osxgui.o osx/osxlib.o -lpng -framework Cocoa none -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
g++-mp-4.7: error: osx/osxgui.o: No such file or directory
g++-mp-4.7: error: none: No such file or directory
make[1]: *** [aglrgl.so] Error 1
make: *** [aglrgl.so] Error 1
ERROR: compilation failed for package ‘rgl’

There is some discussion of rgl problems elsewhere, too: http://www.mentby.com/Group/r-sig-mac/rgl-broken-with-2151.html http://www.mentby.com/Group/r-sig-mac/r-rgl-package-broke-with-r-2142.html

for what it's worth, the igraph install ran at r terminal completed and the library(igraph) command succeeded after I restarted R.app. I do have mesa/freetype/etc installed via macports.

Changed 12 years ago by kjellpk (Kjell Konis)

Attachment: Portfile.diff added

comment:5 Changed 12 years ago by kjellpk (Kjell Konis)

It looks like the problem arose because the OBJC environment stuff was not correctly copied from the configure environment to $RHOME/etc/Makeconf. The attached patch fixes this problem by directly setting the incorrect variables in post-destroot.

If you want to install packages that have a configure script using R.app you need to use Sys.setenv (within R) to add your MacPorts installation to your path, otherwise configure can't find MacPorts provided components. If you run R in Terminal then R will inherit your environment, including the path. Packages installed this way should work fine (famous last words?) from R.app as well.

Also, I removed tcltk from default variants because loading the newest version of tcltk causes R to crash. See bug #37107.

comment:6 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:7 Changed 12 years ago by larryv (Lawrence Velázquez)

Port: R-framework, R-appR-framework R-app
Resolution: fixed
Status: newclosed

Fixed in r103614, although setting OBJCXX to /usr/bin/g++ doesn’t seem quite kosher to me. Are you sure that shouldn’t be ${configure.cxx} or something?

Note: See TracTickets for help on using tickets.