[Cppunit-devel] gcc-3.4.4 fails to compile cppunit-1.10.2 example
Brought to you by:
blep
From: Graham M. CCN-1. <ga...@la...> - 2005-07-18 20:10:14
|
I just got cppunit-1.10.2 and gcc-3.4.4. I successfully built gcc-3.4.4. The gnu organization requests information about successful builds, which I'm sending to you for reference. 772: config.guess i686-pc-linux-gnu 778: ../bin/gcc -v Reading specs from /home/projects/nisac/current-third-party/lib/gcc/i686-pc-linux-gnu/ 3.4.4/specs Configured with: ./configure --prefix=/home/projects/nisac/current-third-party --x-includes=/usr/X11R6/include --x-lib=/usr/X11R6/lib Thread model: posix gcc version 3.4.4 782: cat /etc/issue Red Hat Enterprise Linux WS release 3 (Taroon Update 5) Kernel \r on an \m 783: uname -a Linux localhost.localdomain 2.4.21-32.0.1.EL #1 Tue May 17 18:01:37 EDT 2005 i686 i686 i386 GNU/Linux 784: rpm -q glibc glibc-2.3.2-95.33 cppunit compiled without error with gcc-3.4.4 after configuring as follows (pwd was the directory where I built gcc). 807 export CC=`pwd`/bin/gcc 809 export CXX=`pwd`/bin/g++ 811 export CPPFLAGS="-I `pwd`/include" configure --prefix=/home/projects/nisac/current-third-party --with-gnu-ld CC="$CC" CXX="$CXX" CPPFLAGS="$CPPFLAGS" Although the 'make' succeeded, 'make check' failed as shown below. (All the other tests compiled and ran successfully.) make[1]: Entering directory `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples' Making check in hierarchy make[2]: Entering directory `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples/ hierarchy' make hierarchy make[3]: Entering directory `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples/ hierarchy' if /home/projects/nisac/current-third-party/bin/g++ -DHAVE_CONFIG_H -I. -I. -I../../config -I../../include -I../../include -I /home/projects/nisac/current-third-party/include -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" \ -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ else rm -f ".deps/main.Tpo"; exit 1; \ fi In file included from main.cpp:6: ChessTest.h: In member function `void ChessTest<GAMECLASS>::testNumberOfPieces()': ChessTest.h:19: error: `m_game' undeclared (first use this function) ChessTest.h:19: error: (Each undeclared identifier is reported only once for each function it appears in.) ChessTest.h:19: error: no matching function for call to `CppUnit::Asserter::failIf(<type error>, CppUnit::Message&, CppUnit::SourceLine&)' ../../include/cppunit/Asserter.h:66: note: candidates are: static void CppUnit::Asserter::failIf(bool, const CppUnit::Message&, const CppUnit::SourceLine&) ../../include/cppunit/Asserter.h:77: note: static void CppUnit::Asserter::failIf(bool, std::string, const CppUnit::SourceLine&) make[3]: *** [main.o] Error 1 make[3]: Target `hierarchy' not remade because of errors. I tried cppunit-1.10.2 under gcc-3.3.2. With that compiler, cppunit successfully compiled and ran all tests. The test code that fails under gcc-3.4.4 looks okay to me, but I'm not an expert. Is the failure due to a bug in the compiler, or to some non-conformant code in the test that gcc previously accepted? Thanks. ----------- Graham Mark Simulation Science CCS-5, MS M997 Los Alamos National Laboratory 505-667-8147 |