SCM

[#1939] rgl 0.92.879 fails to build

View Trackers | Bugs | Download .csv | Monitor

Date:
2012-04-11 12:32
Priority:
3
State:
Closed
Submitted by:
Max . (max)
Assigned to:
Nobody (None)
Hardware:
Other
Product:
None
Operating System:
Linux
Component:
None
Version:
None
Severity:
critical
Resolution:
Fixed
 
URL:
Summary:
rgl 0.92.879 fails to build

Detailed description
Building rgl fails with the following error message:

trying URL 'http://cran.at.r-project.org/src/contrib/rgl_0.92.879.tar.gz'
Content type 'application/x-gzip' length 1742190 bytes (1.7 Mb)
opened URL
==================================================
downloaded 1.7 Mb

* installing *source* package ‘rgl’ ...
** package ‘rgl’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for gcc... (cached) gcc -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 accepts -g... (cached) yes
checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... libraries , headers
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for glEnd in -lGL... yes
checking for gluProject in -lGLU... yes
checking for freetype-config... yes
configure: using Freetype and FTGL
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c ABCLineSet.cpp -o ABCLineSet.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c BBoxDeco.cpp -o BBoxDeco.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c Background.cpp -o Background.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c Color.cpp -o Color.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c Disposable.cpp -o Disposable.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c Light.cpp -o Light.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c LineSet.cpp -o LineSet.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c LineStripSet.cpp -o LineStripSet.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c Material.cpp -o Material.o
g++ -I/usr/include/R/ -DNDEBUG -DHAVE_PNG_H -I/usr/include/libpng15 -DHAVE_FREETYPE -Iext/ftgl -I/usr/include/freetype2 -Iext -I/usr/local/include -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpic -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c PlaneSet.cpp -o PlaneSet.o
In file included from scene.h:9:0,
from PlaneSet.hpp:4,
from PlaneSet.cpp:1:
types.h: In instantiation of ‘ARRAY<T>::ARRAY(int, SRC*) [with SRC = double; T = float]’:
PlaneSet.cpp:17:32: required from here
types.h:98:5: error: ‘copy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector:61:0,
from scene.h:10,
from PlaneSet.hpp:4,
from PlaneSet.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h:444:5: note: ‘template<class _II, class _OI> _OI std::copy(_II, _II, _OI)’ declared here, later in the translation unit
make: *** [PlaneSet.o] Error 1
ERROR: compilation failed for package ‘rgl’

===============================

sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i686-pc-linux-gnu (32-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

loaded via a namespace (and not attached):
[1] tools_2.15.0

===============================

OS: Arch Linux up-to-date as of Apr. 11 2012.

Followup

Message
Date: 2012-05-08 11:59
Sender: Duncan Murdoch

Dirk Eddelbuettel sent me a patch like the one described by Greg, and I've committed it.
Date: 2012-05-06 19:21
Sender: Braden Harbin

I was able to build on arch linux using the -fpermissive flag as follows, CXXFLAGS+="-fpermissive" ./configure R CMD INSTALL --no-configure . The demos seem to function properly.
Date: 2012-04-21 02:30
Sender: Greg Minshall

sorry, now i see that attachments are for the original bug submitter. i'm loathe to clutter people's screens with 65 lines of context diff, but let me know if i should, or if you'd like me to e-mail the diff to you. cheers.
Date: 2012-04-21 02:09
Sender: Greg Minshall

this is a problem clang also gives. i have a diff that *seems* to correct it (simply swap the order of the copy definitions and the template that references them). since i'm new here, i'm not sure this will work, but i'll try posting it as an "attachment". here's a reference to the reason the compiler is complaining: http://clang.llvm.org/compatibility.html
Date: 2012-04-11 20:46
Sender: Max .

It seems that a number of applications also fail to build properly (http://is.gd/OfZAjr), so I hope that this will be really fixed soon. The gcc version is actually 4.7.0 20120407 (prerelease).
Date: 2012-04-11 20:06
Sender: Max .

Unfortunately I cannot suggest any changes, so I hope that gcc will be fixed to allow building the rgl components.
Date: 2012-04-11 15:32
Sender: Duncan Murdoch

You appear to be using gcc 4.7.0. I built it in 4.6.3, with no errors. I don't know whether the error you saw is a change in the libraries between versions, or something wrong with 4.7.0. If you can suggest a change that works in both I'll put it in; otherwise, I'd suggest going back to gcc 4.6.3.

Attached Files:

Changes:

Field Old Value Date By
ResolutionNone2012-05-08 11:59murdoch
close_dateNone2012-05-08 11:59murdoch
status_idOpen2012-05-08 11:59murdoch
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge