[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2020-06-25 Thread STINNER Victor
STINNER Victor added the comment: Atomic functions are no longer part of the public C API: code was moved to pycore_atomic.h internal C API. I close the issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-11-02 Thread Josh Cullum
Josh Cullum added the comment: Interestingly, I get the error with Python 3.6.3 build from source, where I include the path to the g++ binary. Python builds without the g++ option, but then _Tkinter fails to build - see issue31817 -- nosy: +jpc2350

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread STINNER Victor
STINNER Victor added the comment: I don't think that CPython can be built by g++. If you consider that it should, please open a new issue since it's a different use case. -- ___ Python tracker

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread Melroy van den Berg
Melroy van den Berg added the comment: Yea I'm building Python 3.6.1 from source, using gcc and --with-cxx-main=correct/location/to/g++ flag. So the warning message appears during ./configure about that it can't find g++. I didn't try to patch it using the attachments of this issue. Since I

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread STINNER Victor
STINNER Victor added the comment: See the following commit of bpo-25150: commit 6df29ada02d22c43a8d439a70b820cb1ceacca42 Author: Victor Stinner Date: Fri Sep 18 15:06:34 2015 +0200 Issue #25150: Hide the private _Py_atomic_xxx symbols from the public

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread STINNER Victor
STINNER Victor added the comment: > ./Include/pyatomic.h:37:5: error: 'atomic_int' does not name a type I don't understand how you got this error. The line 37 of pyatomic.h is only compiled when you build Python itself. At least, since Python 3.5.1 and Python 3.6.0. Did you try to build

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread STINNER Victor
STINNER Victor added the comment: Oh, wait, I read your message backward. You said that the fix doesn't work? Hum, how can I reproduce the issue? What is your use case? -- resolution: fixed -> status: closed -> open ___ Python tracker

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread Melroy van den Berg
Melroy van den Berg added the comment: Ow sorry, I though it was already fixed in the latest stable version of 3.x. Since is issue is from 2015. -- ___ Python tracker

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread STINNER Victor
STINNER Victor added the comment: > I'm using Python 3.6.1. It's not fixed! Thanks for the confirmation of the fix ;-) -- ___ Python tracker ___

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-07-06 Thread Melroy van den Berg
Melroy van den Berg added the comment: I also got this problem with gcc/g++ version 4.9.3. ./Include/pyatomic.h:37:5: error: 'atomic_int' does not name a type I'm using Python 3.6.1. It's not fixed! -- nosy: +Melroy van den Berg versions: +Python 3.6 -Python 3.5

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2016-06-30 Thread Martin Ritter
Martin Ritter added the comment: For me compiling 3.5.2 on GCC 5.2.0 fails when I supply --with-cxx-main=g++ with the same "error: ‘_Atomic’ does not name a type" messages. I'm guessing that --with-cxx-main is probably outdated(?) but at least it worked with 3.5.0 -- nosy: +Martin

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: With the pystate_cplusplus.patch I was able to compile both min_example.tar.gz and my actual extension. So I with your patch, it does work. Thank you. Cool! I applied this simple patch instead of trying to write an ugly glue in pyatomic.h between C and C++.

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb05b6d7aacd by Victor Stinner in branch 'default': Issue #23644: Fix issues with C++ when compiling Python extensions https://hg.python.org/cpython/rev/cb05b6d7aacd -- ___ Python tracker

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: Once this is fixed, maybe issue 8027 can be fixed as well in 3.5.0. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23644 ___

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: @Joshua: Can you please try to compile your extension with Py_LIMITED_API defined? Ex: #define Py_LIMITED_API 0x0303 at the top of your C file, or g++ -DPy_LIMITED_API=0x0303. It fails in that case, because SWIG is using functions that are not

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: For third-party code, pyatomic.h is only needed by PyThreadState_GET() in pystate.h. Maybe we should hide completly pyatomic.h. Currently, pyatomic.h is not really used if Py_LIMITED_API is defined. pystate_cplusplus.patch: disable completly pyatomic.h on

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Hum, I'm lost with the problem with C++ :-( What is your use case? Do you want to compile CPython with C++? Or compile a third-party extension with C++ and this extension includes Python.h which includes pyatomic.h. For third-party code, pyatomic.h is only

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: @Joshua: Can you please try to compile your extension with Py_LIMITED_API defined? Ex: #define Py_LIMITED_API 0x0303 at the top of your C file, or g++ -DPy_LIMITED_API=0x0303. And can you also please try to patch Python with pystate_cplusplus.patch?

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: Hum, I'm lost with the problem with C++ :-( What is your use case? Do you want to compile CPython with C++? Or compile a third-party extension with C++ and this extension includes Python.h which includes pyatomic.h. My use case is I have C++ code that I

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-16 Thread STINNER Victor
STINNER Victor added the comment: using namespace std; Doing this in a header is ugly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23644 ___

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-16 Thread STINNER Victor
STINNER Victor added the comment: #define _Atomic(T) std::atomicT This looks better to me :-) Can you please write a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23644 ___

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-16 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: using namespace std; Doing this in a header is ugly. If you put it in the: #ifdef __cplusplus extern C { #endif then it would only apply till the end of the pyatomic header, and not to anything that includes it. Something like: #ifdef __cplusplus

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-16 Thread Leonardo Bianconi
Leonardo Bianconi added the comment: @haypo For adding compatibility for atomics based on @Joshua.J.Cogliati change, I propose: #ifndef Py_LIMITED_API #ifndef Py_ATOMIC_H #define Py_ATOMIC_H #include dynamic_annotations.h #include pyconfig.h #if defined(HAVE_STD_ATOMIC) #ifdef __cplusplus

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-16 Thread Leonardo Bianconi
Leonardo Bianconi added the comment: #define _Atomic(T) std::atomicT Does not work, since there are definitions like memory_order_relaxed that are in std. I tested the other one, and it works fine: #ifdef __cplusplus extern C { #if defined(HAVE_STD_ATOMIC) using namespace std; #endif #endif

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-16 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: So use std::memory_order_relaxed, std::memory_order_acquire etc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23644 ___

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: If I change the header to: #ifndef Py_LIMITED_API #ifndef Py_ATOMIC_H #define Py_ATOMIC_H #include dynamic_annotations.h #include pyconfig.h #ifdef __cplusplus extern C { #endif #if defined(HAVE_STD_ATOMIC) #ifdef __cplusplus #include atomic using

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23644 ___