#40 5.7.2 build error under Mac OS X 10.4.8


I've run into a build error under Mac OS X 10.4.8 (both Intel and PPC):

Making all in c++
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../include -I../../include -I../../libltdl -g -O2 -MT plstream.lo -MD -MP -MF ".deps/plstream.Tpo" -c -o plstream.lo plstream.cc; \ then mv -f ".deps/plstream.Tpo" ".deps/plstream.Plo"; else rm -f ".deps/plstream.Tpo"; exit 1; fi
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../include -I../../include -I../../libltdl -g -O2 -MT plstream.lo -MD -MP -MF .deps/plstream.Tpo -c plstream.cc -fno-common -DPIC -o .libs/plstream.o
plstream.cc: In member function 'virtual void cxx_pltr2::xform(PLFLT, PLFLT, PLFLT&, PLFLT&) const':
plstream.cc:101: error: 'cerr' was not declared in this scope
make[3]: *** [plstream.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


g++ --version
powerpc-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
Copyright (C) 2005 Free Software Foundation, Inc.

Note: There is no such error under Mac OS X 10.3.9.


  • Hazen Babcock

    Hazen Babcock - 2007-01-30

    Logged In: YES
    Originator: NO

    Perhaps the g++ version that you are using 10.4.8 is more picky than it used to be? I have no trouble (on 10.4.8) with g++ --version: powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026).

    Also we (highly) recommend using the cmake build system.


  • Marius

    Marius - 2007-01-30

    Logged In: YES
    Originator: YES

    No doubt, g++ 4.0.1 seems more picky than g++ 4.0.0, but it is also more stable and the current default installed by XCode. In building hundreds of ports this is the first error due to g++ 4.0.1.

    I tried cmake, but gave up rather quickly. The cmake documentation is rather terse in terms giving hints of how to pass ./configure style options. It picks up octave when I want to build without it (I normally build with and w/o octave support), but it can't find fonts and thus disables freetype...

  • Werner Smekal

    Werner Smekal - 2007-02-02
    • status: open --> closed-works-for-me
  • Werner Smekal

    Werner Smekal - 2007-02-02

    Logged In: YES
    Originator: NO


    I tried to reproduce this error on Mac OS X 10.4.8 PPC, newest XCode installed, g++ 4.0.1 (Build 5367), but failed to do so. plstream.cc is compiled without problem both with the CMake Build System and the Autotools Build System. The error reported is also kind of obscure, because it says that "cerr" is not declared, but it is declared in <iostream> which gets included. You could try to change it to std::cerr and see if it works, but than you should find out why USE_NAMESPACE isn't set.
    Anyway, in my opinion this is no problem of the pickyness of 4.0.1, but a misconfiguration of your compiler. The correct header gets included and the std namespace is imported - than cerr must be known. I would suggest to uninstall XCode with the perl script and reinstall it. I'll close this bug, since it works for me and Hazen.
    Also the autotools build system is deprecated and we can't give much support here, since we don't use it anymore. I really urge you to get accustomed to cmake - it is really worth the effort. You can turn octave off with the command line option -DENABLE_octave=OFF - visit our wiki: http://www.miscdebris.net/plplot_wiki for more information.


Log in to post a comment.