octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building pytave on windows


From: Mike Miller
Subject: Re: Building pytave on windows
Date: Tue, 9 May 2017 07:51:37 -0700
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, May 09, 2017 at 15:33:54 +0530, Abhinav Tripathi wrote:
> Reading through earlier conversations on the mailing list, I have reached
> upto a point.. And now I am getting the following error:
[…]
> In file included from
> c:\octave\octave-4.2.0\lib\gcc\x86_64-w64-mingw32\4.9.4\include\c++\complex:44:0,
>                  from oct-py-types.h:27,
>                  from oct-py-error.cc:33:
> c:\octave\octave-4.2.0\lib\gcc\x86_64-w64-mingw32\4.9.4\include\c++\cmath:1123:11:
> error: '::hypot' has not been declared
>    using ::hypot;
>            ^

I think this is a bug in the Python header files, which are probably not
extensively tested against building Python extensions under MinGW, even
less so using a GCC with C++11 support.

Python's pyconfig.h does the following on Windows systems

    #if defined(__GNUC__) && defined(_WIN32)
    …
    #define hypot _hypot
    …
    #endif /* GNUC */

Try adding a `#undef hypot` immediately after every `#include
<Python.h>`. You may have to add this to every .cc file.

If that fixes the error we can add something to work around this.

There are some others looking at fixing this in Python upstream

  https://bugs.python.org/issue11566
  https://github.com/python/cpython/pull/880

> To get around python extra libs problem, do "export PYTHON_EXTRA_LIBS=-g"
> as suggested by Mike earlier

I had forgotten about this issue, can you report it on the tracker?

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]