You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by "mcgrawia (via GitHub)" <gi...@apache.org> on 2024/03/27 20:09:38 UTC
[I] Installing in Alpine Linux [datasketches-python]
mcgrawia opened a new issue, #43:
URL: https://github.com/apache/datasketches-python/issues/43
Hi datasketch team,
Thank you for the awesome library! My team and I ran into an issue while attempting to install the `datasketches-python` package in an alpine linux docker container. I am a bit stumped as the problem appears to be related to the `prepare_numpy()` function, but as far as I can tell, I am using the same numpy version that was used when building the wheel files for other distributions. At its core, the error seems to be `error: cannot convert 'std::nullptr_t' to 'int' in return`. Does anyone have any tips for how I can resolve this build issue? I've attached the error and a sample Dockerfile below if it helps.
Thanks
**Sample Dockerfile**
```dockerfile
FROM python:3.12-alpine
# install build deps
RUN apk add --no-cache make cmake g++ git
RUN pip3 install --no-cache-dir datasketches~=5.0
```
**Error:**
```
... lots of warnings
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
In file included from /usr/include/c++/13.2.1/cstring:42,
from /tmp/datasketches/include/DataSketches/memory_operations.hpp:27,
from /tmp/datasketches/include/DataSketches/density_sketch_impl.hpp:26,
from /tmp/datasketches/include/DataSketches/density_sketch.hpp:254,
from /tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:33:
/tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp: In function 'int prepare_numpy()':
error seems to be here ->
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/__multiarray_api.h:1558:151: error: cannot convert 'std::nullptr_t' to 'int' in return
1558 | #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
| ^~~~
/tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:101:3: note: in expansion of macro 'import_array'
101 | import_array();
| ^~~~~~~~~~~~
In file included from /tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/nanobind/include/nanobind/nanobind.h:48,
from /tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:22:
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/nanobind/include/nanobind/nb_attr.h: In instantiation of 'struct nanobind::detail::func_data_prelim<0>':
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/nanobind/include/nanobind/nb_func.h:95:38: required from 'PyObject* nanobind::detail::func_create(Func&&, Return (*)(Args ...), std::index_sequence<Is2 ...>, const Extra& ...) [with bool ReturnRef = false; bool CheckGuard = true; Func = bind_density_sketch<double, datasketches::kernel_function_holder>(nanobind::module_&, const char*)::<lambda(const datasketches::density_sketch<double, datasketches::kernel_function_holder, std::allocator<double> >&)>; Return = datasketches::density_sketch<double, datasketches::kernel_function_holder, std::allocator<double> >; Args = {const datasketches::density_sketch<double, datasketches::kernel_function_holder, std::allocator<double> >&}; long unsigned int ...Is = {0}; Extra = {nanobind::scope, nanobind::name, nanobind::is_method}; PyObject = _object; std::index_sequence<Is2 ...> = std::integer_sequence<long unsigned int, 0>]'
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/nanobind/include/nanobind/nb_func.h:207:37: required from 'void nanobind::cpp_function_def(Func&&, const Extra& ...) [with Func = bind_density_sketch<double, datasketches::kernel_function_holder>(nanobind::module_&, const char*)::<lambda(const datasketches::density_sketch<double, datasketches::kernel_function_holder, std::allocator<double> >&)>; Extra = {scope, name, is_method}; typename std::enable_if<is_lambda_v<typename std::remove_reference<_Tp>::type>, int>::type <anonymous> = 0]'
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/nanobind/include/nanobind/nb_class.h:453:25: required from 'nanobind::class_<T, Ts>& nanobind::class_<T, Ts>::def(const char*, Func&&, const Extra& ...) [with Func = bind_density_sketch<double, datasketches::kernel_function_holder>(nanobind::module_&, const char*)::<lambda(const datasketches::density_sketch<double, datasketches::kernel_function_holder, std::allocator<double> >&)>; Extra = {}; T = datasketches::density_sketch<double, datasketches::kernel_function_holder, std::allocator<double> >; Ts = {}]'
/tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:52:9: required from 'void bind_density_sketch(nanobind::module_&, const char*) [with T = double; K = datasketches::kernel_function_holder]'
/tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:127:54: required from here
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/nanobind/include/nanobind/nb_attr.h:192:14: warning: ISO C++ forbids zero-size array [-Wpedantic]
192 | arg_data args[Size];
| ^~~~
gmake[3]: *** [CMakeFiles/python.dir/build.make:230: CMakeFiles/python.dir/src/density_wrapper.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:87: CMakeFiles/python.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/python.dir/rule] Error 2
gmake: *** [Makefile:124: python] Error 2
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 92, in <module>
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 368, in run
self.run_command("build")
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 46, in run
File "<string>", line 78, in build_extension
File "/usr/local/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'python', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for datasketches
Failed to build datasketches
ERROR: Could not build wheels for datasketches, which is required to install pyproject.toml-based projects
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2024011551
Following up on that, one possibility is from https://en.cppreference.com/w/cpp/types/nullptr_t:
> sizeof(std::nullptr_t) is equal to sizeof(void *).
But I'm also a little concerned this may be going down a rather useless rabbit hole.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "mcgrawia (via GitHub)" <gi...@apache.org>.
mcgrawia commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2025881190
Thanks @jmalkin! Appreciate your quick response on this. I will keep an eye out for the next release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "mcgrawia (via GitHub)" <gi...@apache.org>.
mcgrawia commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2024850440
Wow nice find! I spent a few hours looking and couldn't find anything that would explain the difference.. Sounds like the `int*` could be a valid fix? Let me know if there's anything I can do to help. Thanks for looking into it so fast
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "mcgrawia (via GitHub)" <gi...@apache.org>.
mcgrawia commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2045177715
thanks so much @jmalkin! I can confirm the fix is working for the Dockerfile above. Oddly, when I tried to integrate this into our bigger project Dockerfile, which uses `alpine-sdk` for the build dependencies, it seems like a different failure occurs:
```dockerfile
FROM python:3.12-alpine
# install build deps
RUN apk add --no-cache alpine-sdk
RUN pip3 install --no-cache-dir datasketches~=5.0
```
error: `inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time`
```
... warnings
57.97 [100%] Linking CXX shared module /tmp/pip-install-gm_4i67f/datasketches_2a992777b0d04ced877a17bcfc35ec82/build/lib.linux-x86_64-cpython-312/_datasketches.abi3.so
57.97 /usr/include/fortify/stdio.h: In function '__to_xstring.constprop':
57.97 /usr/include/fortify/stdio.h:73:28: error: inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time
57.97 73 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
57.97 | ^
57.97 /usr/include/c++/13.2.1/ext/string_conversions.h:113:32: note: called from here
57.97 113 | const int __len = __convf(__s, __n, __fmt, __args);
57.97 | ^
57.97 make[4]: *** [/tmp/ccfmmEMl.mk:62: /tmp/ccoFhfle.ltrans20.ltrans.o] Error 1
57.97 make[4]: *** Waiting for unfinished jobs....
57.97 lto-wrapper: fatal error: make returned 2 exit status
57.97 compilation terminated.
57.97 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: error: lto-wrapper failed
57.97 collect2: error: ld returned 1 exit status
57.97 gmake[3]: *** [CMakeFiles/python.dir/build.make:338: /tmp/pip-install-gm_4i67f/datasketches_2a992777b0d04ced877a17bcfc35ec82/build/lib.linux-x86_64-cpython-312/_datasketches.abi3.so] Error 1
57.97 gmake[2]: *** [CMakeFiles/Makefile2:87: CMakeFiles/python.dir/all] Error 2
57.97 gmake[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/python.dir/rule] Error 2
57.97 gmake: *** [Makefile:124: python] Error 2
```
But we were able to work around it by just using the packages from the list in the original docker file above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2052647930
Not sure when we'll do another release (not counting it as a priority item at this point) but #47 should mean we produce wheels compatible with musllinux for pypi. Assuming you're using a 64-bit architecture.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "mcgrawia (via GitHub)" <gi...@apache.org>.
mcgrawia commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2052706824
Ok great. Will keep an eye out for the next release. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2025859154
A fix is merged. Not yet sure when we can get a new release out though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2024037276
This ultimately seems to be a more general issue with alpine:
https://github.com/ibmdb/node-ibm_db/issues/894#issuecomment-1351987365
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2031117180
Created a vote thread for the release: https://lists.apache.org/thread/7kbht38ngjmb43qgzflvftr8ld17hv0f
With luck we'll get enough votes and I'll be able to finish everything this coming weekend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2044238715
For the record, I tested that Dockerfile again now that the release is live (I guess I could have done that with the test.pypi repo?) and it worked fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2041970707
Not quite able to get to it. Finishing the release is on the priority list for this coming week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin closed issue #43: Installing in Alpine Linux
URL: https://github.com/apache/datasketches-python/issues/43
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2023959681
I get a lot of nanobind warnings that I believe are complaints that there are no input parameters defined....for methods that don't take input parameters. Haven't looked into that in detail.
I've used docker much less than I should have, but I guess this is a good excuse to do more>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2024065419
Changing the return type of `prepare_numpy()` to `int*` works and seems to work in my regular non-alpine environment. Not yet sure if there are any weird implications of that change though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2045833030
Not gonna pretend I understand this. I launched a shell with python-3.12:alpine and installed alpine-sdk. It has make, g++, and git already. No cmake, but the error isn't "cmake not found" so that seems to be pulled in properly. 🤷
I guess I'll need to look at adding musl builds to the wheel job. Should take less time than cross-compiling for the Mac at least so maybe it won't return us to the multi-hour wheel build jobs!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2024009284
Yes, it's definitely an error. Was just commenting on why you'd see a bunch of other warning output -- I haven't figured out how to suppress those, but I did try to fix warnings that I could control in our code.
Well, so the "good" news is that I managed to recreate the issue. Not sure why yet. I'm thinking it's not happy returning NULL (which is probably a 64bit pointer) as an `int` but I dunno why other distros seem not to complain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "mcgrawia (via GitHub)" <gi...@apache.org>.
mcgrawia commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2023974785
Hi @jmalkin, thanks for the fast reply. I definitely see a lot of warnings, but this section seems to be an actual error unless I'm mistaken:
```
In file included from /usr/include/c++/13.2.1/cstring:42,
from /tmp/datasketches/include/DataSketches/memory_operations.hpp:27,
from /tmp/datasketches/include/DataSketches/density_sketch_impl.hpp:26,
from /tmp/datasketches/include/DataSketches/density_sketch.hpp:254,
from /tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:33:
/tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp: In function 'int prepare_numpy()':
error seems to be here ->
/tmp/pip-build-env-ihc_qezq/overlay/lib/python3.12/site-packages/numpy/core/include/numpy/__multiarray_api.h:1558:151: error: cannot convert 'std::nullptr_t' to 'int' in return
1558 | #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
| ^~~~
/tmp/pip-install-xb49diqe/datasketches_8f31c08a390743fd9e84ba03778a8c57/src/density_wrapper.cpp:101:3: note: in expansion of macro 'import_array'
101 | import_array();
| ^~~~~~~~~~~~
```
This seems to be the only error log in the entire output, everything else seems like warnings. Do you have any thoughts why this code would compile for other linux distros but not for alpine?
The build definitely doesn't seem to be happy, but if it's not the above error, I'm not see anything else in the log that would explain it:
```
gmake[3]: *** [CMakeFiles/python.dir/build.make:230: CMakeFiles/python.dir/src/density_wrapper.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:87: CMakeFiles/python.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/python.dir/rule] Error 2
gmake: *** [Makefile:124: python] Error 2
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2025595455
Ah, this seems more promising: https://stackoverflow.com/questions/52828873/how-does-import-array-in-numpy-c-api-work
Will try it later today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [I] Installing in Alpine Linux [datasketches-python]
Posted by "jmalkin (via GitHub)" <gi...@apache.org>.
jmalkin commented on issue #43:
URL: https://github.com/apache/datasketches-python/issues/43#issuecomment-2043727481
The release has been completed. Per Apache policy, the only official release is the source release linked via the [project's downloads page](https://datasketches.apache.org/docs/Community/Downloads.html). But we do include convenience binaries as part of the release process and those are available through pypi.
5.0.2 _should_ address this issue. I'm going to close this now, but please re-open it if there's a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org