Closed juanfcocontreras closed 3 years ago
Are you using setup.py to compile it?
Hello @v-makouz
Thanks for your prompt answer. Actually, I'm trying to compile another app which depends on pyodbc, and that is the command invocation that uses:
https://github.com/OSGeo/homebrew-osgeo4mac/issues/732
Installing collected packages: pyodbc
Created temporary directory: /private/tmp/pip-record-l39_7s7t
Running setup.py install for pyodbc: started
Running command /usr/local/Cellar/qgis-res/3.4.4/libexec/vendor/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-2dxzty3a/pyodbc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-l39_7s7t/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/qgis-res/3.4.4/libexec/vendor/bin/../include/site/python3.7/pyodbc
running install
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.macosx-10.12-x86_64-3.7
creating build/temp.macosx-10.12-x86_64-3.7/src
clang -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/include/darwin -DPYODBC_VERSION=4.0.26 -UMAC_OS_X_VERSION_10_7 -I/usr/local/include -I/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/buffer.cpp -o build/temp.macosx-10.12-x86_64-3.7/src/buffer.o -Wno-write-strings -Wno-deprecated-declarations
In file included from src/buffer.cpp:12:
src/pyodbc.h:151:21: error: unknown type name 'BYTE'
bool pyodbc_realloc(BYTE** pp, size_t newlen);
^
1 error generated.
error: command 'clang' failed with exit status 1
Running setup.py install for pyodbc: finished with status 'error'
Now I was trying to compile only pyodbc with the same command invocation to test if I got the same error, and the result is the same.
Normally BYTE is defined in /usr/local/include/sqltypes.h
, which I believe installs as part of unixODBC, can you check if the definition is there?
Yes, definition is missing!
That file belongs to libiodbc-3.52.12. Actually unixodbc-2.3.7, which I have installed, contains the BYTE definition!
I'm going to remove libiodbc and try again.
Thank you so much! Please, close this issue.
Environment
Issue
This is my first time using pyodbc, but I can't compile it. I've also tried previous version (4.0.25) with the same error. I have unixodbc installed (Homebrew). Any idea?