Re: none

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: none

enrico.sirola-3
Hi Dirk,

>>>>> "Dirk" == edd  <[hidden email]> writes:

[...]

    Dirk> Folks,

    Dirk> Ivan, who runs one of the autobuilders, reminded me that
    Dirk> Alpha has some issues with g++.  So I tried building with
    Dirk> g++-3.0 on my i386 [1]. QuantLib itself (based on 0.2.1)
    Dirk> built just fine; but QuantLib-Python then died with

    Dirk> my_init_posix: changing gcc to g++-3.0 skipping
    Dirk> 'QuantLib.QuantLibc' extension (up-to-date) Testing step
    Dirk> condition options ... ok Testing barrier option pricer
    Dirk> ... ok Testing binary option pricer ... ok Testing cliquet
    Dirk> option pricer ... ok Testing dates ... ok Testing
    Dirk> actual/actual day counters ... ok Testing distributions
    Dirk> ... ok Testing European option pricer ... make: ***
    Dirk> [test-stamp] Illegal instruction

    Dirk> On the Alpha, where 0.2.1 also built using g++-3.0, building
    Dirk> QL-Python ends in

[...]

    Dirk> I am currently struggling trying to tell setup.py to not use
    Dirk> "-g -O2", but without success.

hmmm I had the same problem some time ago and took a look at
/usr/lib/python2.1/distutils/unixcompiler.py. Quoting it:

# XXX Things not currently handled:
#   * optimization/debug/warning flags; we just use whatever's in Python's
#     Makefile and live with it.  Is this adequate?  If not, we might
#     have to have a bunch of subclasses GNUCCompiler, SGICCompiler,

so it seems this feature is not actually available in distutils out of
the box... The flags that has been used to compile python are in
/usr/lib/python2.1/config/Makefile, so it seems that python has been
built with g++ and should (?) be built with g++-3.0
I think one could define his compiler instance in distutils using the
new_compiler factory.
I'll frobnicate a bit on this issue in the next days...
Cheers,
enri


--
Enrico Sirola <[hidden email]>
gpg public key available from wwwkeys.pgp.net
Key fingerprint = B446 7332 ED55 BC68 5FE8  DE0F 98DF EC86 377F E07F


Reply | Threaded
Open this post in threaded view
|

Re: none

Dirk Eddelbuettel
Hi Enrico,

  "Enrico" == enrico sirola <[hidden email]> writes:
  Dirk> I am currently struggling trying to tell setup.py to not use "-g
  Dirk> -O2", but without success.
  Enrico>  hmmm I had the same problem some time ago and took a look at
  Enrico> /usr/lib/python2.1/distutils/unixcompiler.py. Quoting it:
  Enrico>
  Enrico> # XXX Things not currently handled: # * optimization/debug/warning
  Enrico> flags; we just use whatever's in Python's # Makefile and live with
  Enrico> it.  Is this adequate?  If not, we might # have to have a bunch of
  Enrico> subclasses GNUCCompiler, SGICCompiler,
  Enrico>
  Enrico> so it seems this feature is not actually available in distutils out
  Enrico> of the box... The flags that has been used to compile python are in
  Enrico> /usr/lib/python2.1/config/Makefile, so it seems that python has

Thanks for the heads-up. I was just trying to make a good guess as to what
might suppress the floating point error in 'make test' by compiling with a
different g++, compiling with different options, ...  as this has helped on
other cases.

  Enrico> been built with g++ and should (?) be built with g++-3.0 I think
  Enrico> one could define his compiler instance in distutils using the
  Enrico> new_compiler factory.  I'll frobnicate a bit on this issue in the
  Enrico> next days...  

Thanks. We probably need it for ia64 where gcc-3.0, g++-3.0, ... are
preferred.

Dirk

--
Better to have an approximate answer to the right question than a precise
answer to the wrong question.  --  John Tukey as quoted by John Chambers