[Insight-developers] Cmake on Linux
Lydia Ng
lng@insightful.com
Thu, 13 Dec 2001 19:20:46 -0800
> You could try compiling without -O2, try this:
>=20
> In a clean directory:
>=20
> setenv CXXFLAGS "-g"
> ../CMake/configure
That worked - thanks.
> -----Original Message-----
> From: William A. Hoffman [mailto:bill.hoffman@kitware.com]
> Sent: Thursday, December 13, 2001 7:08 PM
> To: Lydia Ng
> Cc: insight-developers@public.kitware.com
> Subject: RE: [Insight-developers] Cmake on Linux
>=20
>=20
> It is crashing on this line:
> fout << "include " << file << "\n";
>=20
> And all the arguments look good. The only thing I can figure=20
> is this is a=20
> result of
> the crazy Red Hat 2.96 gcc compiler release. It was never an=20
> official gcc=20
> release, but
> some versions of RedHat shipped with it.
>=20
> You could try compiling without -O2, try this:
>=20
> In a clean directory:
>=20
> setenv CXXFLAGS "-g"
> ../CMake/configure
>=20
>=20
> 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=20
> 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=20
> -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=20
> -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=3D0x81b7cd8, fout=3D@0x8189a8c, file=3D0x8189c05 =
"cmake.depends")
> > at ../../CMake/Source/cmUnixMakefileGenerator.cxx:285
> >#2 0x8096e3a in cmUnixMakefileGenerator::OutputMakefile
> >(this=3D0xbffff118,
> > file=3D0x81899d9 "Makefile")
> > at ../../CMake/Source/cmUnixMakefileGenerator.cxx:278
> >#3 0x80955ed in cmUnixMakefileGenerator::GenerateMakefile
> >(this=3D0x81b7cd8)
> > at ../../CMake/Source/cmUnixMakefileGenerator.cxx:127
> >#4 0x805afb3 in cmMakefile::GenerateMakefile (this=3D0xbffff458)
> > at ../../CMake/Source/cmMakefile.cxx:434
> >#5 0x804f377 in cmake::Generate (this=3D0xbffff568, =
args=3D@0xbffff638,
> > buildMakefiles=3Dtrue) at ../../CMake/Source/cmake.cxx:423
> >#6 0x8051442 in main (ac=3D5, av=3D0xbffff6cc)
> > at ../../CMake/Source/cmakemain.cxx:23
> >#7 0x400a2b65 in __libc_start_main (main=3D0x8051274 <main>, =
argc=3D5,
> > ubp_av=3D0xbffff6cc, init=3D0x8049d30 <_init>,=20
> fini=3D0x8186264 <_fini>,
> > rtld_fini=3D0x4000df24 <_dl_fini>, stack_end=3D0xbffff6c4)
> > 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:
> > > =
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> > > >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:
> > > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > >sprime:lng:13% uname -a
> > > >Linux sprime 2.4.2 #1 SMP Fri Apr 6 15:37:56 PDT 2001=20
> 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,=20
> 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=20
> 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
>=20
>=20