msg131067 - (view) |
Author: Ralf Schmitt (schmir) |
Date: 2011-03-15 23:39 |
The following program
#include <Python.h>
#include <cmath>
results in the following error when compiled with g++ and -std=gnu++0x:
$ g++ -std=gnu++0x -c t.cc -I /c/Python27/Include
In file included from c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/cmath:629:0,
from t.cc:2:
c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/tr1_impl/cmath:203:11: error: '::hypot' has not been declared
The problem is, that pyconfig.h has the following define:
#define hypot _hypot
It should probably just be removed when using gcc.
|
msg172674 - (view) |
Author: Petri Lehtinen (petri.lehtinen) * |
Date: 2012-10-11 18:59 |
Cannot reproduce, and cannot find the define in pyconfig.h. It's in PC/pyconfig.h, but shouldn't affect compiling with gcc.
|
msg172675 - (view) |
Author: Ralf Schmitt (schmir) |
Date: 2012-10-11 19:02 |
Sorry, if I haven't been clear enough. This happens on windows when compiling extensions with "g++ -std=gnu++0x ..."
|
msg172683 - (view) |
Author: Petri Lehtinen (petri.lehtinen) * |
Date: 2012-10-11 19:44 |
On MinGW? I'm not a Windows user, but IIRC building extensions with gcc on MinGW has many problems and isn't officially supported.
|
msg172684 - (view) |
Author: Ralf Schmitt (schmir) |
Date: 2012-10-11 19:52 |
yes, mingw. it may have some problems and this is one of them!
|
msg174157 - (view) |
Author: Václav Šmilauer (eudoxos) * |
Date: 2012-10-29 22:45 |
I would like to second Ralf here. I am having the same issue with mingw's gcc 4.7 and -std=c++11.
|
msg174197 - (view) |
Author: Mark Dickinson (mark.dickinson) * |
Date: 2012-10-30 10:16 |
I think there's something generally smelly about the way hypot is handled; this isn't the only hypot-related build issue that's turned up. I'm wondering whether the code can be reworked to deal with hypot in the same way that functions like log1p, etc. are dealt with in the math module---i.e., define a _Py_hypot wrapper function, and use that everywhere internally. One difference is that log1p is only used in cmath and math, while hypot is also needed in the Python core.
|
msg174198 - (view) |
Author: Václav Šmilauer (eudoxos) * |
Date: 2012-10-30 10:19 |
Just for the record: a workaround (mentioned at http://boost.2283326.n4.nabble.com/Boost-Python-Compile-Error-s-GCC-via-MinGW-w64-td3165793.html#a3166760) is to always include <cmath> before <Python.h>.
|
msg174366 - (view) |
Author: Mark Dickinson (mark.dickinson) * |
Date: 2012-10-31 20:33 |
Is this also an issue for Python 3.x?
|
msg174397 - (view) |
Author: Martin v. Löwis (loewis) * |
Date: 2012-11-01 10:41 |
In general, including standard library headers before including Python.h is not recommended, since it may break binary compatibility across object files. So the proposed work-around may also cause harm.
|
msg175568 - (view) |
Author: Václav Šmilauer (eudoxos) * |
Date: 2012-11-14 13:17 |
Martin, I know it is not a proper fix. OTOH, Python is not the only project which "recommends" its header be included as first.
I don't know if it is an issue for Python 3.x; will try to test that. This bug, though, is clearly reported about Python 2.7, which IS in bug-fix mode.
|
msg201101 - (view) |
Author: Heinrich Kießling (pokulo) |
Date: 2013-10-24 08:56 |
uning python 3.3 mingw4.8 both -std=gnu++0x and -std=c++11 cause still the same error.
|
msg272475 - (view) |
Author: Kay Hayen (Kay.Hayen) |
Date: 2016-08-11 18:48 |
This also affects Python2.7.12 on Windows with latest MinGW. I think something similar needs to be added for GCC version check:
/* VS 2010 and above already defines hypot as _hypot */
#if _MSC_VER < 1600
#define hypot _hypot
#endif
Not sure which gcc version first had that, but 6.1 definitely does.
Yours,
Kay
|
msg290754 - (view) |
Author: Matthew McCormick (thewtex) * |
Date: 2017-03-28 19:49 |
I have created a pull request for this issue,
https://github.com/python/cpython/pull/880
that addresses extension builds for both MinGWPy and the Microsoft Visual C++ Compiler for Python 2.7.
|
msg332293 - (view) |
Author: Steve Dower (steve.dower) * |
Date: 2018-12-21 15:35 |
The change in PR 880 looks fine to me. I dislike defining names without a Py prefix in public headers.
And PRs are not where we do general discussion or ping for attention. Make sure the nosy list includes the relevant experts (in this case probably me) and post on the issue. Posting on python-dev is also okay, though linking the bug is preferable to the PR.
|
msg332295 - (view) |
Author: Terry J. Reedy (terry.reedy) * |
Date: 2018-12-21 16:17 |
What current 3.x versions have this issue? This issue was opened against 2.7. This was changed to 3.3 in 2013 (3.3 should have just been added with control-click). I reverted to 2.7 and tentatively added 3.8, but this needs to be checked.
The PR is against 2.7, though not so marked in the title. (I will fix this.) Since the move to GitHub, we usually fix on master first and then backport.
Something is not right with the PR 880 linkage. For me, anyway, Steve's reference is actually linked to 10880 (closed).
|
msg332301 - (view) |
Author: Matthew McCormick (thewtex) * |
Date: 2018-12-21 21:02 |
> What current 3.x versions have this issue? This issue was opened against 2.7.
Yes, this is just for 2.7.
|
msg332436 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:04 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332437 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:05 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332438 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:06 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332439 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:06 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332440 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:07 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332441 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:07 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332442 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:08 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332443 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:09 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332444 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:09 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332445 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:10 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332446 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:11 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332447 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:12 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332448 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:12 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332449 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:13 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332450 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:13 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332451 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:14 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332452 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:15 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
msg332453 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:18 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332454 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-12-24 14:18 |
New changeset c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f by Miss Islington (bot) in branch '3.7':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f
|
msg332455 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-12-24 14:19 |
New changeset c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f by Miss Islington (bot) in branch '3.7':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/c046d6b6187e4de98a29e67ccbfd9b1b8790ee2f
|
msg332460 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 14:54 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332475 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 16:06 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332476 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 16:06 |
New changeset 000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f by INADA Naoki (Matt McCormick) in branch '2.7':
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
https://github.com/python/cpython/commit/000b8093a13f1c5bfe4b65a4dc1b23e0db553a8f
|
msg332477 - (view) |
Author: Inada Naoki (methane) * |
Date: 2018-12-24 16:06 |
New changeset 87667c54c6650751c5d7bf7b9e465c8c4af45f71 by INADA Naoki (Matt McCormick) in branch 'master':
bpo-11566: Extension build errors on Windows for _hypot (GH-11283)
https://github.com/python/cpython/commit/87667c54c6650751c5d7bf7b9e465c8c4af45f71
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:14 | admin | set | github: 55775 |
2018-12-24 16:06:59 | methane | set | messages:
+ msg332477 |
2018-12-24 16:06:37 | methane | set | messages:
+ msg332476 |
2018-12-24 16:06:13 | methane | set | messages:
+ msg332475 |
2018-12-24 14:54:38 | methane | set | messages:
+ msg332460 |
2018-12-24 14:19:31 | miss-islington | set | nosy:
+ miss-islington messages:
+ msg332455
|
2018-12-24 14:19:05 | miss-islington | set | nosy:
+ miss-islington messages:
+ msg332454
|
2018-12-24 14:18:46 | methane | set | messages:
+ msg332453 |
2018-12-24 14:15:19 | methane | set | messages:
+ msg332452 |
2018-12-24 14:14:40 | methane | set | messages:
+ msg332451 |
2018-12-24 14:13:46 | methane | set | messages:
+ msg332450 |
2018-12-24 14:13:24 | methane | set | messages:
+ msg332449 |
2018-12-24 14:12:35 | methane | set | messages:
+ msg332448 |
2018-12-24 14:12:17 | methane | set | messages:
+ msg332447 |
2018-12-24 14:11:57 | methane | set | messages:
+ msg332446 |
2018-12-24 14:10:07 | methane | set | messages:
+ msg332445 |
2018-12-24 14:09:35 | methane | set | messages:
+ msg332444 |
2018-12-24 14:09:10 | methane | set | messages:
+ msg332443 |
2018-12-24 14:08:24 | methane | set | messages:
+ msg332442 |
2018-12-24 14:07:51 | methane | set | messages:
+ msg332441 |
2018-12-24 14:07:29 | methane | set | messages:
+ msg332440 |
2018-12-24 14:07:17 | miss-islington | set | pull_requests:
+ pull_request10530 |
2018-12-24 14:06:54 | methane | set | messages:
+ msg332439 |
2018-12-24 14:06:37 | methane | set | messages:
+ msg332438 |
2018-12-24 14:05:59 | methane | set | messages:
+ msg332437 |
2018-12-24 14:04:52 | methane | set | nosy:
+ methane messages:
+ msg332436
|
2018-12-24 14:00:05 | thewtex | set | pull_requests:
+ pull_request10529 |
2018-12-22 01:42:25 | methane | set | status: open -> closed stage: resolved resolution: fixed versions:
+ Python 3.7, Python 3.8 |
2018-12-21 21:31:26 | kayhayen | set | nosy:
- Kay.Hayen
|
2018-12-21 21:02:16 | thewtex | set | messages:
+ msg332301 versions:
- Python 3.8 |
2018-12-21 16:17:53 | terry.reedy | set | nosy:
+ terry.reedy
messages:
+ msg332295 versions:
+ Python 2.7, Python 3.8, - Python 3.3 |
2018-12-21 15:35:23 | steve.dower | set | nosy:
+ steve.dower messages:
+ msg332293
|
2018-03-20 10:54:27 | jdemeyer | set | nosy:
+ jdemeyer
|
2017-03-28 19:49:47 | thewtex | set | nosy:
+ thewtex messages:
+ msg290754
|
2017-03-28 19:48:57 | thewtex | set | pull_requests:
+ pull_request780 |
2016-08-16 06:22:00 | petri.lehtinen | set | nosy:
- petri.lehtinen
|
2016-08-15 13:24:01 | pas | set | nosy:
+ pas
|
2016-08-11 18:48:54 | Kay.Hayen | set | nosy:
+ Kay.Hayen messages:
+ msg272475
|
2013-10-24 09:54:49 | tim.golden | set | nosy:
- tim.golden
|
2013-10-24 08:56:56 | pokulo | set | nosy:
+ pokulo
messages:
+ msg201101 versions:
+ Python 3.3, - Python 2.7 |
2012-11-14 13:17:31 | eudoxos | set | messages:
+ msg175568 |
2012-11-01 10:41:27 | loewis | set | messages:
+ msg174397 |
2012-10-31 20:33:35 | mark.dickinson | set | messages:
+ msg174366 |
2012-10-30 10:19:42 | eudoxos | set | messages:
+ msg174198 |
2012-10-30 10:16:11 | mark.dickinson | set | messages:
+ msg174197 |
2012-10-30 09:33:59 | mark.dickinson | set | nosy:
+ mark.dickinson
|
2012-10-29 22:45:34 | eudoxos | set | nosy:
+ eudoxos messages:
+ msg174157
|
2012-10-11 19:52:28 | schmir | set | messages:
+ msg172684 |
2012-10-11 19:44:59 | petri.lehtinen | set | nosy:
+ loewis, tim.golden, brian.curtin messages:
+ msg172683 components:
+ Windows, - None
|
2012-10-11 19:02:20 | schmir | set | status: pending -> open
messages:
+ msg172675 |
2012-10-11 18:59:48 | petri.lehtinen | set | status: open -> pending nosy:
+ petri.lehtinen messages:
+ msg172674
|
2011-03-15 23:39:14 | schmir | create | |