Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-10-28 10:27:45

Dear Boosters and uBlas developers

After upgrading one of my PowerMacs to MacOS X 10.3 I can no longer use
the Apple version of gcc-3.1 for my codes but needed to switch to a
more recent gcc build.

I had the following problems:

Apple-gcc 3.3: crashes with more than 2GB memory usage after one hour
of compiling some complex graph library stuff while on other machines
or using other compilers only 400 MB are needed. Compiling with -O0
works but is clearly not optimal :-)

FSF gcc-3.3.1: I used this next but some of the BGL codes crashed the
compiler with an internal compiler error

FSF gcc-3.3.2: I tried this next, and get much further but have the two
problems which I will report below.

When compiling the attached test program I get errors like:

In file included from
                  from test.C:1:
/Users/troyer/src/boost/boost/numeric/ublas/traits.hpp: In static member
    function `static long double boost::numeric::ublas::type_traits<long
    double>::abs(const long double&)':
/Users/troyer/src/boost/boost/numeric/ublas/traits.hpp:299: error:
    undeclared (first use here)

The origin is in boost/config/platform/macos.hpp:

# ifndef __APPLE_CC__

// GCC strange "ignore std" mode works better if you pretend everything
// is in the std namespace, for the most part.

# endif

I see no reason for this #define in boost/config/platform/macos.hpp and
wonder why it is there. Indeed, if I compile using g++ -D__APPLE_CC__
the test program compiles but does not link:

> /usr/local/bin/c++ -D__APPLE_CC__ -I/Users/troyer/src/boost test.C
/usr/bin/ld: Undefined symbols:
boost::numeric::ublas::row_major, (unsigned long)0,
boost::numeric::ublas::unbounded_array<unsigned long>,
boost::numeric::ublas::unbounded_array<double> >::zero_

Has anybody observed a similar problem (maybe on another platform) and
can provide a fix or workaround?

Best regards



Boost list run by bdawes at, gregod at, cpdaniel at, john at