cyberdelia / atomic

An atomic class that guarantees atomic updates to its contained value.
https://atomic.readthedocs.org
MIT License
24 stars 5 forks source link

Problem installing on windows #12

Open literadix opened 7 years ago

literadix commented 7 years ago

Hello,

I couldn't install atomic under windows. The problem came from the fact that the verzechnis pycache was included in the distribution and only compiled under Linux. The problem was solved after deleting the directory in the installation archive.

schuhschuh commented 6 years ago

I seem to have a different issue installing this package on Windows 10. Piggybacking this issue as the initial issue refers to installation errors on Windows and provides a trivial solution for that case.

Trying to install from sources gives:

C:\Users\Andreas\Develop\Libs\atomic>python setup.py install
_cffi__x54f1bcaexf914a2ce.c
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(210): warning C4013: '__atomic_store' undefined; assuming extern returning int
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(210): error C2065: '__ATOMIC_SEQ_CST': undeclared identifier
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(213): warning C4013: '__atomic_add_fetch' undefined; assuming extern returning int
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(213): error C2065: '__ATOMIC_SEQ_CST': undeclared identifier
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(216): warning C4013: '__atomic_sub_fetch' undefined; assuming extern returning int
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(216): error C2065: '__ATOMIC_SEQ_CST': undeclared identifier
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(219): warning C4013: '__atomic_exchange_n' undefined; assuming extern returning int
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(219): error C2065: '__ATOMIC_SEQ_CST': undeclared identifier
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(222): warning C4013: '__atomic_compare_exchange_n' undefined; assuming extern returning int
atomic\__pycache__\_cffi__x54f1bcaexf914a2ce.c(222): error C2065: '__ATOMIC_SEQ_CST': undeclared identifier

The atomic\__pycache__ directory was created by this process and didn't exist after git clone (obviously).

schuhschuh commented 6 years ago

Seems __ATOMIC_SEQ_CST is GCC specific? I'm using MSVS 2017 (MSVC v19).

DiracFermi1411 commented 1 month ago

Seems __ATOMIC_SEQ_CST is GCC specific? I'm using MSVS 2017 (MSVC v19).

I tried compiling the package using MinGW64 but it still throws the same error.