Hi,
I am a Newbie for R. I just installed R-base on my notebook with
openSuSE 11. However, I always got compilation errors in installing
add-on packages. For example, when installing "igraph" I got the
following error:
___________________________________________________________________
* Installing *source* package 'igraph' ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for fmemopen... yes
checking for open_memstream... yes
checking for rintf... yes
checking for finite... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for xml2-config... none
checking for __gmpz_add in -lgmp... no
configure: creating ./config.status
config.status: creating src/config.h
config.status: creating R/config.R
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c adjlist.c -o
adjlist.o
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c arpack.c -o arpack.o
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c array.c -o array.o
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c atlas.c -o atlas.o
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c attributes.c -o
attributes.o
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c basic_query.c -o
basic_query.o
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R
-I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK
-DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c bfgs.c -o bfgs.o
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
igraph.h:435: warning: inline function ?igraph_es_type? declared but
never defined
igraph.h:233: warning: inline function ?igraph_vs_type? declared but
never defined
g++ -I/usr/lib/R/include -I/usr/local/include -DUSING_R -fpic -g -O2
-c bliss.cc -o bliss.o
In file included from bliss_graph.hh:27,
from bliss.cc:19:
bliss_kstack.hh: In constructor ?igraph::KStack<Type>::KStack(int)?:
bliss_kstack.hh:74: error: there are no arguments to ?malloc? that
depend on a template parameter, so a declaration of ?malloc? must be
available
bliss_kstack.hh:74: error: (if you use ?-fpermissive?, G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
bliss_kstack.hh: In member function ?void
igraph::KStack<Type>::init(int)?:
bliss_kstack.hh:84: error: there are no arguments to ?malloc? that
depend on a template parameter, so a declaration of ?malloc? must be
available
In file included from bliss_graph.hh:28,
from bliss.cc:19:
bliss_kqueue.hh: In member function ?void
igraph::KQueue<Type>::init(unsigned int)?:
bliss_kqueue.hh:73: error: there are no arguments to ?malloc? that
depend on a template parameter, so a declaration of ?malloc? must be
available
make: *** [bliss.o] Error 1
chmod: cannot access `/usr/lib/R/library/igraph/libs/*': No such file or
directory
ERROR: compilation failed for package 'igraph'
** Removing '/usr/lib/R/library/igraph'
The downloaded packages are in
/tmp/RtmpU0Z5C3/downloaded_packages
Updating HTML index of packages in '.Library'
Warning message:
In install.packages("igraph") :
installation of package 'igraph' had non-zero exit status
____________________________________________________________________
It says "no argument to 'malloc'". Any idea on what's
wrong here?
Thanks in advance.
Wanding
Prof Brian Ripley
2008-Jun-27 10:49 UTC
[R] igraph (was Compilation error during package installation)
Please discuss this with the package maintainer (see the posting guide). He will need lots of details you have omitted, including the precise OS and the C++ compiler used. BTW, this illustrates a common problem with packages using C++, which people often test only under one compiler, and until recently (4.3.x) g++ has been notoriously lax in reporting non-conformance to ISO C++. There are about 30 CRAN packages that fail to install under the Sun C++ compiler, but igraph did at one point recently (there is now a problem with the use of C headers in C++ code). On Thu, 26 Jun 2008, wanding ZHOU wrote:> Hi, > > I am a Newbie for R. I just installed R-base on my notebook with > openSuSE 11. However, I always got compilation errors in installing > add-on packages. For example, when installing "igraph" I got the > following error: > ___________________________________________________________________ > * Installing *source* package 'igraph' ... > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for g++... g++ > checking whether we are using the GNU C++ compiler... yes > checking whether g++ accepts -g... yes > checking for fmemopen... yes > checking for open_memstream... yes > checking for rintf... yes > checking for finite... yes > checking how to run the C preprocessor... gcc -E > checking for grep that handles long lines and -e... /usr/bin/grep > checking for egrep... /usr/bin/grep -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking sys/times.h usability... yes > checking sys/times.h presence... yes > checking for sys/times.h... yes > checking for xml2-config... none > checking for __gmpz_add in -lgmp... no > configure: creating ./config.status > config.status: creating src/config.h > config.status: creating R/config.R > config.status: creating src/Makevars > ** libs > > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c adjlist.c -o > adjlist.o > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c arpack.c -o arpack.o > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c array.c -o array.o > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c atlas.c -o atlas.o > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c attributes.c -o > attributes.o > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c basic_query.c -o > basic_query.o > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include -DUSING_R > -I. -g -O2 -DPACKAGE_VERSION=\"0.5\" -DINTERNAL_ARPACK > -DINTERNAL_LAPACK -DINTERNAL_BLAS -fpic -g -O2 -c bfgs.c -o bfgs.o > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > igraph.h:435: warning: inline function ?igraph_es_type? declared but > never defined > igraph.h:233: warning: inline function ?igraph_vs_type? declared but > never defined > g++ -I/usr/lib/R/include -I/usr/local/include -DUSING_R -fpic -g -O2 > -c bliss.cc -o bliss.o > In file included from bliss_graph.hh:27, > from bliss.cc:19: > bliss_kstack.hh: In constructor ?igraph::KStack<Type>::KStack(int)?: > bliss_kstack.hh:74: error: there are no arguments to ?malloc? that > depend on a template parameter, so a declaration of ?malloc? must be > available > bliss_kstack.hh:74: error: (if you use ?-fpermissive?, G++ will accept > your code, but allowing the use of an undeclared name is deprecated) > bliss_kstack.hh: In member function ?void > igraph::KStack<Type>::init(int)?: > bliss_kstack.hh:84: error: there are no arguments to ?malloc? that > depend on a template parameter, so a declaration of ?malloc? must be > available > In file included from bliss_graph.hh:28, > from bliss.cc:19: > bliss_kqueue.hh: In member function ?void > igraph::KQueue<Type>::init(unsigned int)?: > bliss_kqueue.hh:73: error: there are no arguments to ?malloc? that > depend on a template parameter, so a declaration of ?malloc? must be > available > make: *** [bliss.o] Error 1 > chmod: cannot access `/usr/lib/R/library/igraph/libs/*': No such file or > directory > ERROR: compilation failed for package 'igraph' > ** Removing '/usr/lib/R/library/igraph' > > The downloaded packages are in > /tmp/RtmpU0Z5C3/downloaded_packages > Updating HTML index of packages in '.Library' > Warning message: > In install.packages("igraph") : > installation of package 'igraph' had non-zero exit status > ____________________________________________________________________ > > It says "no argument to 'malloc'". Any idea on what's wrong here? > > Thanks in advance. > > Wanding > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595