[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Does GCC 2.96 have trouble building SWIG 3.1.17?

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2003-02-19 23:13:41 CET

Hi, I'm trying to build SWIG 3.1.17 on RedHat 7.0, using GCC 2.96. I
think what I'm encountering is a GCC problem, not a SWIG problem, but
wanted to know if anyone else had seen it (and maybe knows a
workaround), before I upgrade GCC. Google seems to know nothing about
this, which makes me wonder if my tool chain is broken in some rare
and special way :-).

The compiler runs out of memory while trying to compile s-exp.cxx:

   g++ -I./../Include -I./../DOH/Include -I./../Preprocessor \
       -I./../Swig -I../Include -g -O2 -c -o s-exp.o s-exp.cxx

   Cannot allocate 3272671200 bytes after allocating 54630972 bytes
   make[1]: *** [s-exp.o] Error 1
   make[1]: Leaving directory `/home/kfogel/src/SWIG-1.3.17/Source/Modules1.1'
   make: *** [Modules1.1] Error 2

There is a long wait (half an hour or so) before the "cannot allocate"
error. A full configuration and build transcript is given at the end
of this mail.

Does this problem look familiar to anyone?

(Btw, I was able to build fine on a Debian box, using GCC 2.95.4.)

Please send any replies to me, as I'm not on the swig@cs list.

Thanks,
-Karl Fogel <kfogel@collab.net>

SWIG-1.3.17/$ ./configure
checking MACHDEP... linux2
checking for gcc... gcc
checking for C compiler default output... 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 ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for ar... ar
checking for autoconf... autoconf
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking SO... .so
checking LDSHARED... gcc -shared
checking CXXSHARED... gcc -shared
checking TRYLINKINGWITHCXX... CXXSHARED= g++ -shared
checking CCSHARED... -fpic
checking for bison... bison -y
checking RPATH... -Xlinker -rpath $(exec_prefix)/lib -Xlinker -rpath .
checking LINKFORSHARED... -Xlinker -export-dynamic

Checking for installed packages.
Note : None of the following packages are required to compile SWIG

checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for t_open in -lnsl... no
checking for gethostbyname in -linet... no
checking for socket in -lsocket... no
checking for swill_init in -lswill... no
checking for main in -lieee... yes
checking for crypt in -lcrypt... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for Tcl configuration... found /usr/lib/tclConfig.sh
checking for Tcl header files... -I/usr/include
checking for Tcl library... -L/usr/lib -ltcl8.3${TCL_DBGX}
checking for NONE/bin/python... no
checking for python... python
checking for Python prefix... /usr/local
checking for Python exec-prefix... /usr/local
checking for Python version... python2.2
checking for Python header files... -I/usr/local/include/python2.2 -I/usr/local/lib/python2.2/config
checking for Python library... /usr/local/lib/python2.2/config
checking for perl... perl
checking for Perl5 header files... /usr/lib/perl5/5.6.0/i386-linux/CORE
checking for Perl5 library... perl
checking for java... java
checking for javac... javac
checking for java include file jni.h... /usr/local/j2sdk1.4.1/include
checking for java include file jni_md.h... /usr/local/j2sdk1.4.1/include/linux
checking for guile-config... no
checking for mzc... no
checking for ruby... no
checking for Ruby header files... could not figure out how to run ruby
checking for php... php
checking for PHP4 header files... not found
checking for Ocaml compiler... checking for ocamlc... no
checking for Ocaml interpreter... checking for ocaml... no
checking for Ocaml header files... not found
checking for pike... no
checking for Pike header files... not found
configure: creating ./config.status
config.status: creating Examples/Makefile
config.status: creating Examples/guile/Makefile
config.status: creating Examples/GIFPlot/Makefile
config.status: creating Examples/GIFPlot/Lib/Makefile
config.status: creating Makefile
config.status: creating Runtime/Makefile
config.status: creating Source/Include/swigver.h
config.status: creating Source/CParse/Makefile
config.status: creating Source/Modules1.1/Makefile
config.status: creating Source/Preprocessor/Makefile
config.status: creating Source/Swig/Makefile
configure: configuring in Source/DOH
configure: running /bin/sh './configure' --prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking MACHDEP... linux2
checking for gcc... gcc
checking for C compiler default output... 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 ANSI C... none needed
checking for ranlib... ranlib
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Doh/Makefile
configure: configuring in Tools
configure: running /bin/sh './configure' --prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... 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 ANSI C... none needed
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... 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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
configure: creating ./config.status
configure: configuring in Examples/GIFPlot
configure: running /bin/sh './configure' --prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking MACHDEP... linux2
checking for gcc... gcc
checking for C compiler default output... 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 ANSI C... none needed
checking for ranlib... ranlib
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Lib/Makefile
SWIG-1.3.17/$ make
cd ~/src/SWIG-1.3.17/
make
sed 's|@-swig_lib-@|/usr/local/lib/swig1.3|g;s|@-exec_prefix-@|/usr/local|g;s|@-release_suffix-@||g' Source/Include/swigconfig.h.in > Source/Include/swigconfig.h
make[1]: Entering directory `/home/kfogel/src/SWIG-1.3.17/Source/Modules1.1'
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o main.o main.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o module.o module.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o emit.o emit.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o overload.o overload.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o lang.o lang.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o typepass.o typepass.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o allocate.o allocate.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o browser.o browser.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o contract.o contract.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o swigmain.o swigmain.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o tcl8.o tcl8.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o python.o python.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o perl5.o perl5.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o guile.o guile.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o ruby.o ruby.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o mzscheme.o mzscheme.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o java.o java.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o php4.o php4.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o ocaml.o ocaml.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o xml.o xml.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o pike.o pike.cxx
g++ -I./../Include -I./../DOH/Include -I./../Preprocessor -I./../Swig -I../Include -g -O2 -c -o s-exp.o s-exp.cxx

   [hang here, compiling s-exp.cxx, for half an hour or so]

Cannot allocate 3272671200 bytes after allocating 54630972 bytes
make[1]: *** [s-exp.o] Error 1
make[1]: Leaving directory `/home/kfogel/src/SWIG-1.3.17/Source/Modules1.1'
make: *** [Modules1.1] Error 2

Compilation exited abnormally with code 2 at Wed Feb 19 13:38:20

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 19 23:46:56 2003

This is an archived mail posted to the Subversion Dev mailing list.