Hi devs! This is my first post to the discussion list! Has anyone tried to build numpy with python3.7.0a3? I get the following gcc errors during compile: . . . compiling C sources C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c' gcc: numpy/random/mtrand/mtrand.c numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionSave’: numpy/random/mtrand/mtrand.c:40970:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’? *type = tstate->exc_type; ^~ . . . error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o.d" failed with exit status 1 Version info: ------------- gcc --version: gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 2017040 numpy version: 1.15.0.dev0+d233e1f The same error comes up when building via pip. I don't know enough about the underlying C code to know how to debug this. Any help would be greatly appreciated! Cheers, -- Hannes Breytenbach PhD Candidate South African Astronomical Observatory +27 82 726 9311
Try upgrading cython? On Fri, Dec 15, 2017 at 2:11 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
Hi devs!
This is my first post to the discussion list!
Has anyone tried to build numpy with python3.7.0a3?
I get the following gcc errors during compile:
. . .
compiling C sources C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c' gcc: numpy/random/mtrand/mtrand.c numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionSave’: numpy/random/mtrand/mtrand.c:40970:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’? *type = tstate->exc_type; ^~ . . .
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
Version info: ------------- gcc --version: gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 2017040 numpy version: 1.15.0.dev0+d233e1f
The same error comes up when building via pip. I don't know enough about the underlying C code to know how to debug this. Any help would be greatly appreciated!
Cheers,
-- Hannes Breytenbach
PhD Candidate South African Astronomical Observatory +27 82 726 9311
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
-- Nathaniel J. Smith -- https://vorpus.org
I don't think this is a cython version issue - cloned the latest version from git yesterday... python3.7 -c "import cython; print(cython.__version__)" 0.28a0 ----- Original Message ----- From: "Nathaniel Smith" <njs@pobox.com> To: "Discussion of Numerical Python" <numpy-discussion@python.org> Sent: Friday, December 15, 2017 12:30:48 PM Subject: Re: [Numpy-discussion] building numpy with python3.7 Try upgrading cython? On Fri, Dec 15, 2017 at 2:11 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
Hi devs!
This is my first post to the discussion list!
Has anyone tried to build numpy with python3.7.0a3?
I get the following gcc errors during compile:
. . .
compiling C sources C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c' gcc: numpy/random/mtrand/mtrand.c numpy/random/mtrand/mtrand.c: In function ‘__Pyx__ExceptionSave’: numpy/random/mtrand/mtrand.c:40970:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’? *type = tstate->exc_type; ^~ . . .
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.7m -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.7/numpy/core/src/private -Ibuild/src.linux-x86_64-3.7/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-3.7/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
Version info: ------------- gcc --version: gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 2017040 numpy version: 1.15.0.dev0+d233e1f
The same error comes up when building via pip. I don't know enough about the underlying C code to know how to debug this. Any help would be greatly appreciated!
Cheers,
-- Hannes Breytenbach
PhD Candidate South African Astronomical Observatory +27 82 726 9311
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
-- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion !DSPAM:5a33a46a14261384311406!
On Fri, Dec 15, 2017 at 2:42 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
I don't think this is a cython version issue - cloned the latest version from git yesterday...
python3.7 -c "import cython; print(cython.__version__)" 0.28a0
It is a cython version issue: https://github.com/cython/cython/issues/1955 It's supposed to be fixed though, so I don't know why you it isn't working for you. Are you sure that cython is installed in the same virtualenv as you're using to build numpy? If you were using a numpy sdist then it would make sense because we include the pre-generated .c files in the sdists instead of running cython, but given that you're building from a numpy checkout I dunno. -n -- Nathaniel J. Smith -- https://vorpus.org
I have been building numpy master with CPython master but am also using cython master. My not-pretty script for doing this is: #! /usr/bin/bash set -e TARGET_ENV=bleeding OSPATH=~/source/other_source/ pushd $OSPATH/cpython/ git pull git clean -xfd ./configure make -j 9 ./python -m venv --copies --clear ~/.virtualenvs/$TARGET_ENV popd source ~/.virtualenvs/$TARGET_ENV/bin/activate master_build () { git checkout master git pull git clean -xfd pip install -v . } pushd $OSPATH/cython master_build popd pushd $OSPATH/numpy master_build popd Tom On Fri, Dec 15, 2017 at 5:54 AM Nathaniel Smith <njs@pobox.com> wrote:
On Fri, Dec 15, 2017 at 2:42 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
I don't think this is a cython version issue - cloned the latest version
from git yesterday...
python3.7 -c "import cython; print(cython.__version__)" 0.28a0
It is a cython version issue: https://github.com/cython/cython/issues/1955
It's supposed to be fixed though, so I don't know why you it isn't working for you. Are you sure that cython is installed in the same virtualenv as you're using to build numpy? If you were using a numpy sdist then it would make sense because we include the pre-generated .c files in the sdists instead of running cython, but given that you're building from a numpy checkout I dunno.
-n
-- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
OK, thanks for the link to the issue. I'm not using virtual environments - I built python3.7 (and 2.7) with the `make altinstall` method. I managed to get the numpy build working on 3.7 by removing the `random/mtrand/mtrand.c` file so that it gets (re-)generated during the build using the latest cython version. Thanks for the help! ----- Original Message ----- From: "Nathaniel Smith" <njs@pobox.com> To: "Discussion of Numerical Python" <numpy-discussion@python.org> Sent: Friday, December 15, 2017 12:53:39 PM Subject: Re: [Numpy-discussion] building numpy with python3.7 On Fri, Dec 15, 2017 at 2:42 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
I don't think this is a cython version issue - cloned the latest version from git yesterday...
python3.7 -c "import cython; print(cython.__version__)" 0.28a0
It is a cython version issue: https://github.com/cython/cython/issues/1955 It's supposed to be fixed though, so I don't know why you it isn't working for you. Are you sure that cython is installed in the same virtualenv as you're using to build numpy? If you were using a numpy sdist then it would make sense because we include the pre-generated .c files in the sdists instead of running cython, but given that you're building from a numpy checkout I dunno. -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion !DSPAM:5a33a9d014269019821239!
On Mon, Dec 18, 2017 at 3:20 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
OK, thanks for the link to the issue. I'm not using virtual environments - I built python3.7 (and 2.7) with the `make altinstall` method. I managed to get the numpy build working on 3.7 by removing the `random/mtrand/mtrand.c` file so that it gets (re-)generated during the build using the latest cython version.
Thanks for the help!
Just to be sure, which Cython version is that? Chuck
Hi Chuck I'm using Cython 0.28a0. Hannes ----- Original Message ----- From: "Charles R Harris" <charlesr.harris@gmail.com> To: "Discussion of Numerical Python" <numpy-discussion@python.org> Sent: Tuesday, December 19, 2017 10:01:40 PM Subject: Re: [Numpy-discussion] building numpy with python3.7 On Mon, Dec 18, 2017 at 3:20 AM, Hannes Breytenbach < hannes@saao.ac.za > wrote: OK, thanks for the link to the issue. I'm not using virtual environments - I built python3.7 (and 2.7) with the `make altinstall` method. I managed to get the numpy build working on 3.7 by removing the `random/mtrand/mtrand.c` file so that it gets (re-)generated during the build using the latest cython version. Thanks for the help! Just to be sure, which Cython version is that? Chuck !DSPAM:5a39704114261779167816! _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion !DSPAM:5a39704114261779167816!
Hello, After failing with several attempts to build numpy on python 3.7.0a4, the combo that worked with pip was cython 0.28a0 (current master) numpy 1.15.0.dev0 (current master) in a fresh, clean venv. Older cython (0.27.3 where the aforementioned issue seems to have been solved https://github.com/cython/cython/issues/1955) didn't help. Stable numpy 1.14.0 didn't seem to work even with cython master. This seems to be the same setup that Thomas mentioned, I mostly want to note that anything less doesn't seem to compile yet. András On Wed, Dec 20, 2017 at 9:15 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
Hi Chuck
I'm using Cython 0.28a0.
Hannes
________________________________ From: "Charles R Harris" <charlesr.harris@gmail.com> To: "Discussion of Numerical Python" <numpy-discussion@python.org> Sent: Tuesday, December 19, 2017 10:01:40 PM Subject: Re: [Numpy-discussion] building numpy with python3.7
On Mon, Dec 18, 2017 at 3:20 AM, Hannes Breytenbach <hannes@saao.ac.za> wrote:
OK, thanks for the link to the issue. I'm not using virtual environments - I built python3.7 (and 2.7) with the `make altinstall` method. I managed to get the numpy build working on 3.7 by removing the `random/mtrand/mtrand.c` file so that it gets (re-)generated during the build using the latest cython version.
Thanks for the help!
Just to be sure, which Cython version is that?
Chuck
!DSPAM:5a39704114261779167816! _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
!DSPAM:5a39704114261779167816!
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
On Thu, Jan 18, 2018 at 8:54 AM, Andras Deak <deak.andris@gmail.com> wrote:
Hello,
After failing with several attempts to build numpy on python 3.7.0a4, the combo that worked with pip was cython 0.28a0 (current master) numpy 1.15.0.dev0 (current master) in a fresh, clean venv. Older cython (0.27.3 where the aforementioned issue seems to have been solved https://github.com/cython/cython/issues/1955) didn't help. Stable numpy 1.14.0 didn't seem to work even with cython master. This seems to be the same setup that Thomas mentioned, I mostly want to note that anything less doesn't seem to compile yet.
Where did you get 1.14.0 source? If it was with pip, it was generated using cython 0.26.1. Chuck
On Thursday, January 18, 2018, Charles R Harris <charlesr.harris@gmail.com> wrote:
On Thu, Jan 18, 2018 at 8:54 AM, Andras Deak <deak.andris@gmail.com>
wrote:
Hello,
After failing with several attempts to build numpy on python 3.7.0a4, the combo that worked with pip was cython 0.28a0 (current master) numpy 1.15.0.dev0 (current master) in a fresh, clean venv. Older cython (0.27.3 where the aforementioned issue seems to have been solved https://github.com/cython/cython/issues/1955) didn't help. Stable numpy 1.14.0 didn't seem to work even with cython master. This seems to be the same setup that Thomas mentioned, I mostly want to note that anything less doesn't seem to compile yet.
Where did you get 1.14.0 source? If it was with pip, it was generated using cython 0.26.1. Chuck
Yes, I did with my last attempts (in earlier attempts I did pull earlier versions from github but only before I realized I had to upgrade cython altogether). So that's probably it; sorry, I had no understanding of the workings of pip. I'll retry with cython stable and numpy from source, and only post again if I find something surprising in order to reduce further noise. Thanks, András
participants (5)
-
Andras Deak
-
Charles R Harris
-
Hannes Breytenbach
-
Nathaniel Smith
-
Thomas Caswell