[SciPy-user] weave and compilers other than GCC 2.95?
eric jones
eric at enthought.com
Tue Aug 27 18:38:40 EDT 2002
Doh! Hit the send button to soon on my last email...
Anyway, regaring blitz and MIPS. Blitz++ is about as torturous of a C++
compiler test as there is. It uses template expression and all kinds of
other gory tricks to make the compiler generate efficient code from
easy-to-read expressions. I would be very surprised if the MIPS
compiler could handle anything at all with blitz code in it.
A possible solution for you is actually to build the blitz stuff with
gcc. I have put a keyword argument in the inline() function to allow
you to select a compiler on the Windows platform. If compiler='gcc' is
set, then mingw (gcc) is used instead of MSVC. I don't think the
mechanism will work on Unix yet, but it is just a matter of "hooking it
up." I expect using gcc on SGI would work fine. My recollection is
that gcc compiled extensions work just fine with a MIPS compiled python.
eric
> -----Original Message-----
> From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]
On
> Behalf Of eric jones
> Sent: Tuesday, August 27, 2002 5:29 PM
> To: scipy-user at scipy.net
> Subject: RE: [SciPy-user] weave and compilers other than GCC 2.95?
>
> > > Hey Steve,
> > >
> > > Your in new territory here. The only compilers I have used are
> > > gcc-2.95.3 and MSVC.
> >
> > OK. The problem is less severe than I first feared. I have managed
> > to kill most of the error messages by adding "typename" keywords,
> > changing templates like the following
> >
> > template <class T> bool operator==(const SeqBase<T>::iterator&
left,
> > const SeqBase<T>::iterator& right);
> >
> > to
> >
> > template <class T> bool operator==(const typename
> SeqBase<T>::iterator&
> > left,
> > const typename
> SeqBase<T>::iterator& right);
> >
> > I'm still trying to figure out what to do about
> > random_access_iterator, apparently a non-standard STL class that can
> > be replaced somehow with std::iterator.
>
> No clue on this.
>
> >
> > Also: the code includes the deprecated <strstream> header. At the
> > moment, this only elicits a warning that I'm ignoring.
>
> OK. If this is in CXX, it'll automatically be gone in the new
version.
> If it is injected by weave, we'll remove it for the new version.
>
> >
> >
> > > The second issue is that distutils doesn't automatically handle
> building
> > > C++ libraries. Weave uses a hack that replaces gcc with g++ if
gnu
> is
> > > used.
> >
> > Ah, I didn't notice that. I thought you were relying on the fact
that
> > SGI "cc" (like gcc) will detect the language based on the input file
> > extension (.c or .cxx, etc). I was actually rather surprised to
learn
> > that SGI's compiler does that.
>
> Right gcc does also. The problem comes at the link step. Using gcc to
> link doesn't include the stdc++ (or equivalent) library. Linking with
> g++ does.
>
> >
> > > g++ links in the correct libraries for cout, etc. while gcc
> > > doesn't. I'm betting your hitting a similar problem.
> >
> > The messages about "cout" were my own fault (blush) -- they came
from
> > the code I was trying to weave.
>
> Ahh. I'm guessing you needed std::cout.
>
> >
> > > One temporary fix
> > > might be to try libraries=['stdc++'] as an inline() keyword
> argument.
> > >
> > > > #error directive: This header file requires the -LANG:std
> option
> > >
> > > Yikes! This looks like something we'll just have to hard code
when
> MIPS
> > > is detected. Or maybe if we build with the MIPS c++ compiler (is
it
> > > different than the c compiler on this platform?) this flag will
> > > automatically be set. I can't imagine a C++ compiler having to
have
> a
> > > flag set to use the std namespace files.
> >
> > Guess again. :-( The MIPS C++ compiler is named "CC"; but yes, you
> > need -LANG:std to get something closer to current standards. At
least
> > with MIPSpro 7.30 compilers (which, admittedly are a few years old).
>
> I think that is the latest though, correct?
>
> >
> >
> > > With the change to SCXX, inline() should theoretically
> > > work everywhere. blitz() on the other hand... I think that is
still
> > > relegated to the world of gcc.
> >
> > Uh, oh. What about inline( ... type_converters = converters.blitz
> ...)?
>
> I'm betting there is bad news here. Blitz++ works
> >
> >
> > -Steve
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user at scipy.net
> > http://www.scipy.net/mailman/listinfo/scipy-user
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list