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@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.