[Insight-developers] Cmake on Linux

William A. Hoffman bill.hoffman@kitware.com
Thu, 13 Dec 2001 22:07:55 -0500


It is crashing on this line:
   fout << "include " << file << "\n";

And all the arguments look good.  The only thing I can figure is this is a 
result of
the crazy Red Hat 2.96 gcc compiler release.  It was never an official gcc 
release, but
some versions of RedHat shipped with it.

You could try compiling without -O2, try this:

In a clean directory:

setenv CXXFLAGS "-g"
../CMake/configure


At 03:08 PM 12/13/2001 -0800, Lydia Ng wrote:
> > Also, what version of cmake are you using?
>
>I did a "cvs update -d" and then executed ../CMake/configure
>
> > Can you run it in the debugger?
>
>sprime:lng:18% gdb /a/homer/users/lng/CMake/CMake-linux/Source/cmake
>GNU gdb 5.0
>Copyright 2000 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General Public License, and you
>are
>welcome to change it and/or distribute copies of it under certain
>conditions.
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB.  Type "show warranty" for
>details.
>This GDB was configured as "i386-redhat-linux"...
>(gdb) run -S/a/homer/users/lng/CMake/CMake/Source/CursesDialog/form
>-O/a/homer/users/lng/CMake/CMake-linux/Source/CursesDialog/form
>-H/a/homer/users/lng/CMake/Cmake -B/a/homer/users/lng/CMake/CMake-linux
>Starting program: /a/homer/users/lng/CMake/CMake-linux/Source/cmake
>-S/a/homer/users/lng/CMake/CMake/Source/CursesDialog/form
>-O/a/homer/users/lng/CMake/CMake-linux/Source/CursesDialog/form
>-H/a/homer/users/lng/CMake/Cmake -B/a/homer/users/lng/CMake/CMake-linux
>MANPATH: Undefined variable.
>
>Program received signal SIGSEGV, Segmentation fault.
>0x400411db in ostream::operator<< () from
>/usr/lib/libstdc++-libc6.2-2.so.3
>Current language:  auto; currently c
>(gdb) bt
>#0  0x400411db in ostream::operator<< () from
>/usr/lib/libstdc++-libc6.2-2.so.3
>#1  0x8097ba2 in cmUnixMakefileGenerator::OutputIncludeMakefile (
>     this=0x81b7cd8, fout=@0x8189a8c, file=0x8189c05 "cmake.depends")
>     at ../../CMake/Source/cmUnixMakefileGenerator.cxx:285
>#2  0x8096e3a in cmUnixMakefileGenerator::OutputMakefile
>(this=0xbffff118,
>     file=0x81899d9 "Makefile")
>     at ../../CMake/Source/cmUnixMakefileGenerator.cxx:278
>#3  0x80955ed in cmUnixMakefileGenerator::GenerateMakefile
>(this=0x81b7cd8)
>     at ../../CMake/Source/cmUnixMakefileGenerator.cxx:127
>#4  0x805afb3 in cmMakefile::GenerateMakefile (this=0xbffff458)
>     at ../../CMake/Source/cmMakefile.cxx:434
>#5  0x804f377 in cmake::Generate (this=0xbffff568, args=@0xbffff638,
>     buildMakefiles=true) at ../../CMake/Source/cmake.cxx:423
>#6  0x8051442 in main (ac=5, av=0xbffff6cc)
>     at ../../CMake/Source/cmakemain.cxx:23
>#7  0x400a2b65 in __libc_start_main (main=0x8051274 <main>, argc=5,
>     ubp_av=0xbffff6cc, init=0x8049d30 <_init>, fini=0x8186264 <_fini>,
>     rtld_fini=0x4000df24 <_dl_fini>, stack_end=0xbffff6c4)
>     at ../sysdeps/generic/libc-start.c:111
>(gdb) quit
>The program is running.  Exit anyway? (y or n) y
>
>
> > -----Original Message-----
> > From: William A. Hoffman [mailto:bill.hoffman@kitware.com]
> > Sent: Thursday, December 13, 2001 3:07 PM
> > To: Lydia Ng
> > Cc: insight-developers@public.kitware.com
> > Subject: Re: [Insight-developers] Cmake on Linux
> >
> >
> > configure seems to be building cmake ok, but the resulting
> > cmake segfaults.
> >
> > Can you run it in the debugger?
> >
> > gdb /a/homer/users/lng/CMake/CMake-linux/Source/cmake
> > gdb) run -S/a/homer/users/lng/CMake/CMake/Source/CursesDialog/form
> > -O/a/homer/users/lng/CMake/CMake-linux/Source/CursesDialog/form
> > -H/a/homer/users/lng/CMake/CMake
> > -B/a/homer/users/lng/CMake/CMake-linux
> >
> >
> > Also, what version of cmake are you using?
> >
> >
> > -Bill
> >
> > At 02:49 PM 12/13/2001 -0800, you wrote:
> >
> > >Anyone else having problems building CMake for Linux?
> > >
> > >I get a segmentation fault when I execute
> > >../CMake/configure
> > >
> > >Here is the error message:
> > >===========================
> > >gmake[2]: Entering directory
> > >`/a/homer/users/lng/CMake/CMake-linux/Source/CursesDialog/form'
> > >/a/homer/users/lng/CMake/CMake-linux/Source/cmake
> > >-S/a/homer/users/lng/CMake/CMake/Source/CursesDialog/form
> > >-O/a/homer/users/lng/CMake/CMake-linux/Source/CursesDialog/form
> > >-H/a/homer/users/lng/CMake/CMake
> > -B/a/homer/users/lng/CMake/CMake-linux
> > >gmake[2]: *** [depend] Segmentation fault (core dumped)
> > >gmake[2]: Leaving directory
> > >`/a/homer/users/lng/CMake/CMake-linux/Source/CursesDialog/form'
> > >gmake[1]: *** [depend_CursesDialog_form] Error 2
> > >gmake[1]: Leaving directory
> > >`/a/homer/users/lng/CMake/CMake-linux/Source'
> > >gmake: *** [depend_Source] Error 2
> > >
> > >
> > >System info:
> > >============
> > >sprime:lng:13% uname -a
> > >Linux sprime 2.4.2 #1 SMP Fri Apr 6 15:37:56 PDT 2001 i686 unknown
> > >sprime:lng:14% gcc -v
> > >Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> > >gcc version 2.96 20000731 (Red Hat Linux 7.0)
> > >sprime:lng:15% gmake -v
> > >GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
> > >Built for i386-redhat-linux-gnu
> > >Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
> > >         Free Software Foundation, Inc.
> > >This is free software; see the source for copying conditions.
> > >There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> > >PARTICULAR PURPOSE.
> > >
> > >Report bugs to <bug-make@gnu.org>.
> > >
> > >
> > >-Lydia
> > >_______________________________________________
> > >Insight-developers mailing list
> > >Insight-developers@public.kitware.com
> > >http://public.kitware.com/mailman/listinfo/insight-developers
> >
> >
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers