griddb / python_client

GridDB Python Client
Apache License 2.0
51 stars 64 forks source link

MacOS Install griddb-python error #30

Open ogbeks opened 10 months ago

ogbeks commented 10 months ago

I was trying to install griddb-python for my Kafka-stream project but encountered the below error.

Mac OS configuration: macOS Sonoma

`

Collecting griddb-python
Using cached griddb_python-0.7.6.tar.gz (52 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: griddb-python
Building wheel for griddb-python (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [45 lines of output]
running bdist_wheel
The [wheel] section is deprecated. Use [bdist_wheel] instead.
running build
running build_ext
building '_griddb_python' extension
swigging src/griddb.i to src/griddb_wrap.cpp
swig -python -DSWIGWORDSIZE64 -c++ -outdir . -Isrc -o src/griddb_wrap.cpp src/griddb.i
creating build
creating build/temp.macosx-13-x86_64-cpython-311
creating build/temp.macosx-13-x86_64-cpython-311/src
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineT ools/SDKs/MacOSX13.sdk -Iinclude -Isrc -I/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/Ag gregationResult.cpp -o build/temp.macosx-13-x86_64-cpython-311/src/AggregationResult.o -std=c++0x
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineT ools/SDKs/MacOSX13.sdk -Iinclude -Isrc -I/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/Co ntainer.cpp -o build/temp.macosx-13-x86_64-cpython-311/src/Container.o -std=c++0x
src/Container.cpp:22:84: warning: field 'mContainer' will be initialized after field 'mContainerInfo' [-Wreorder-ctor]
Container::Container(GSContainer container, GSContainerInfo containerInfo) : mContainer(container),
^~~~~
mContainerInfo(NULL)
src/Container.cpp:34:26: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compar e]
for (int i = 0; i< containerInfo->columnCount; i++) {
~^ ~~~~~~
src/Container.cpp:53:26: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compar e]
for (int i = 0; i< mContainerInfo->columnCount;i++) {
~^ ~~~~~~~
src/Container.cpp:367:27: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compa re]
for (int i = 0; i < mContainerInfo->columnCount; i++) {
~ ^ ~~~~~~~
4 warnings generated.
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineT ools/SDKs/MacOSX13.sdk -Iinclude -Isrc -I/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/Co ntainerInfo.cpp -o build/temp.macosx-13-x86_64-cpython-311/src/ContainerInfo.o -std=c++0x
src/ContainerInfo.cpp:89:48: error: non-constant-expression cannot be narrowed from type 'int' to 'size_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
mContainerInfo = {containerName, type, propsCount, columnInfoList, rowKeyAssigned};
^~~~~~
src/ContainerInfo.cpp:89:48: note: insert an explicit cast to silence this issue
mContainerInfo = {containerName, type, propsCount, columnInfoList, rowKeyAssigned};
^~~~~~
static_cast( )
src/ContainerInfo.cpp:105:30: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-c ompare]
for(int i = 0; i < mContainerInfo.columnCount; i++) {
~ ^ ~~~~~~
src/ContainerInfo.cpp:227:30: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-c ompare]
for(int i = 0; i < mContainerInfo.columnCount; i++) {
~ ^ ~~~~~~
src/ContainerInfo.cpp:240:31: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-c ompare]
for (int i = 0; i < columnInfoList.size; i++) {
~ ^ ~~~~~~~
3 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for griddb-python
Running setup.py clean for griddb-python
Failed to build griddb-python
ERROR: Could not build wheels for griddb-python, which is required to install pyproject.toml-based projects

`

ogbeks commented 10 months ago

Following the comment on [https://github.com/griddb/python_client/issues/28](Issue #28), I installed the library https://github.com/griddb/python_client/releases/download/0.8.5/griddb_python-0.8.5-cp310-cp310-macosx_10_15_x86_64.whl on my mac and got a new error

​​ImportError: dlopen(/Users/my-name/Documents/kafka/newenv/lib/python3.10/site-packages/_griddb_python.cpython-310-darwin.so, 0x0002): Library not loaded: /usr/local/lib/libgridstore.0.dylib Referenced from: <931A383B-B5B6-3D53-826E-B6ADD74A312A> /Users/my-name/Documents/kafka/newenv/lib/python3.10/site-packages/_griddb_python.cpython-310-darwin.so Reason: tried: '/usr/local/lib/libgridstore.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libgridstore.0.dylib' (no such file), '/usr/local/lib/libgridstore.0.dylib' (no such file), '/usr/lib/libgridstore.0.dylib' (no such file, not in dyld cache)

Please I will appreciate assistant in resolving this error.

knonomura commented 6 months ago

Thank you for your report. I'll check it.

We have confirmed building of our library with Catalina(10.15) for MacOS. If possible, could you try this environment ?