Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_tri breaks build on Cygwin #2463

Closed
marcintustin opened this issue Sep 25, 2013 · 3 comments
Closed

_tri breaks build on Cygwin #2463

marcintustin opened this issue Sep 25, 2013 · 3 comments

Comments

@marcintustin
Copy link

When building on Cygwin, the below error occurs. The solution is to rename the _C variable to something else, e.g. _CO (consistently).

This is also reported on stackoverflow: http://stackoverflow.com/questions/18560249/matplotlib-error-while-installing-pyspeckit

building 'matplotlib._tri' extension

gcc -fno-strict-aliasing -ggdb -O2 -pipe -fdebug-prefix-map=/home/jt/rel/python-2.7.3-1/python-2.7.3-1/build=/usr/src/debug/python-2.7.3-1 -fdebug-prefix-map=/home/jt/rel/python-2.7.3-1/python-2.7.3-1/src/Python-2.7.3=/usr/src/debug/python-2.7.3-1 -DNDEBUG -g -fwrapv -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__tri_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/include -I. -I/cygdrive/c/Users/marcin/Documents/codeprojects/stats/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c lib/matplotlib/tri/_tri.cpp -o build/temp.cygwin-1.7.22-i686-2.7/lib/matplotlib/tri/_tri.o

In file included from /cygdrive/c/Users/marcin/Documents/codeprojects/stats/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:0,

from /cygdrive/c/Users/marcin/Documents/codeprojects/stats/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,

from /cygdrive/c/Users/marcin/Documents/codeprojects/stats/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,

from lib/matplotlib/tri/_tri.h:68,

from lib/matplotlib/tri/_tri.cpp:8:

/cygdrive/c/Users/marcin/Documents/codeprojects/stats/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

In file included from lib/matplotlib/tri/_tri.cpp:8:0:

lib/matplotlib/tri/_tri.h:821:33: error: expected unqualified-id before numeric constant

lib/matplotlib/tri/_tri.cpp: In constructor �±RandomNumberGenerator::RandomNumberGenerator(long unsigned int)�²:

lib/matplotlib/tri/_tri.cpp:2180:28: error: expected identifier before numeric constant

lib/matplotlib/tri/_tri.cpp:2180:28: error: expected �±{�² before numeric constant

lib/matplotlib/tri/_tri.cpp: At global scope:

lib/matplotlib/tri/_tri.cpp:2180:28: error: expected unqualified-id before numeric constant

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /cygdrive/c/Users/marcin/Documents/codeprojects/stats/bin/python2.7 -c "import setuptools;__file__='/cygdrive/c/Users/marcin/Documents/codeprojects/stats/build/matplotlib/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-MYTsWr-record/install-record.txt --single-version-externally-managed --install-headers /cygdrive/c/Users/marcin/Documents/codeprojects/stats/include/site/python2.7 failed with error code 1 in /cygdrive/c/Users/marcin/Documents/codeprojects/stats/build/matplotlib
Storing complete log in /home/marcin/.pip/pip.log
(stats)
@WeatherGod
Copy link
Member

Interesting. It is this very same thing that broke on Solaris as well. Is
there some sort of C++ spec about _C?

@ianthomas23
Copy link
Member

In C++, identifiers that begin with an underscore and are followed by an uppercase letter are reserved. This was my mistake, I shouldn't have used such identifiers in _tri.h and _tri.cpp. I'll submit a PR to correct this shortly...

@mdboom
Copy link
Member

mdboom commented Sep 30, 2013

Closed by #2464.

@mdboom mdboom closed this as completed Sep 30, 2013
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Feb 26, 2014
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 12, 2014
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants