Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Cannot install in Python3: error: ‘_BUFRFile_BUFRFileEntryObject’ has no member named ‘ob_type’ #16

Open
gerritholl opened this issue Jan 19, 2016 · 0 comments

Comments

@gerritholl
Copy link
Member

bufr fails to install in my configuration due to errors involving … has no member named ‘ob_type’. I believe this is a Python2→Python3 problem, so it boils down to supporting Python3. Below is the output I get trying to build bufr:

$ python3.5 setup.py build
/home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/setuptools/dist.py:285: UserWarning: Normalizing '0.2-6' to '0.2.post6'
  normalized_version,
running build
running build_py
running build_ext
building 'bufr/_BUFRFile' extension
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/numpy/core/include/ -fPIC -I/home/users/gholl/venv/stable-3.5/include -I/home/users/gholl/include/python3.5m -c bufr/_BUFRFile.c -o build/temp.linux-x86_64-3.5/bufr/_BUFRFile.o -O3 -g -fstack-protector-all -D_FORTIFY_SOURCE=2
In file included from /home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777,
                 from /home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from bufr/_BUFRFile.c:23:
/home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
bufr/_BUFRFile.c: In function ‘BUFRFileEntry_dealloc’:
bufr/_BUFRFile.c:144: error: ‘_BUFRFile_BUFRFileEntryObject’ has no member named ‘ob_type’
bufr/_BUFRFile.c: In function ‘BUFRFileEntry_str’:
bufr/_BUFRFile.c:179: warning: implicit declaration of function ‘PyString_FromFormat’
bufr/_BUFRFile.c:179: warning: implicit declaration of function ‘PyInt_AsLong’
bufr/_BUFRFile.c:180: warning: implicit declaration of function ‘PyString_AsString’
bufr/_BUFRFile.c:180: warning: return makes pointer from integer without a cast
bufr/_BUFRFile.c: At top level:
bufr/_BUFRFile.c:185: warning: missing braces around initializer
bufr/_BUFRFile.c:185: warning: (near initialization for ‘_BUFRFile_BUFRFileEntryType.ob_base.ob_base’)
bufr/_BUFRFile.c:187: warning: initialization makes integer from pointer without a cast
bufr/_BUFRFile.c:190: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:205: warning: initialization makes pointer from integer without a cast
bufr/_BUFRFile.c:206: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:213: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:214: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:221: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:223: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c: In function ‘BUFRFile_dealloc’:
bufr/_BUFRFile.c:323: error: ‘_BUFRFile_BUFRFileObject’ has no member named ‘ob_type’
bufr/_BUFRFile.c: In function ‘BUFRFile_init’:
bufr/_BUFRFile.c:350: warning: passing argument 1 of ‘fopen’ makes pointer from integer without a cast
/usr/include/stdio.h:282: note: expected ‘const char * __restrict__’ but argument is of type ‘int’
bufr/_BUFRFile.c: In function ‘BUFRFile_read’:
bufr/_BUFRFile.c:545: warning: assignment makes pointer from integer without a cast
bufr/_BUFRFile.c:551: warning: assignment makes pointer from integer without a cast
bufr/_BUFRFile.c:557: warning: implicit declaration of function ‘PyInt_FromLong’
bufr/_BUFRFile.c:557: warning: assignment makes pointer from integer without a cast
bufr/_BUFRFile.c: At top level:
bufr/_BUFRFile.c:730: warning: missing braces around initializer
bufr/_BUFRFile.c:730: warning: (near initialization for ‘_BUFRFile_BUFRFileType.ob_base.ob_base’)
bufr/_BUFRFile.c:732: warning: initialization makes integer from pointer without a cast
bufr/_BUFRFile.c:735: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:750: warning: initialization makes pointer from integer without a cast
bufr/_BUFRFile.c:751: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:758: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:759: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:766: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:768: warning: initialization from incompatible pointer type
bufr/_BUFRFile.c:773: warning: function declaration isn’t a prototype
bufr/_BUFRFile.c: In function ‘init_BUFRFile’:
bufr/_BUFRFile.c:777: warning: ‘return’ with no value, in function returning non-void
bufr/_BUFRFile.c:780: warning: ‘return’ with no value, in function returning non-void
bufr/_BUFRFile.c:783: warning: implicit declaration of function ‘Py_InitModule3’
bufr/_BUFRFile.c:783: warning: assignment makes pointer from integer without a cast
bufr/_BUFRFile.c:785: warning: ‘return’ with no value, in function returning non-void
error: command 'gcc' failed with exit status 1
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant