-
Notifications
You must be signed in to change notification settings - Fork 103
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
sdsalloc.h doesn't seem to be installed as part of regular hiredis #158
Comments
@mcepl Have you seen vendor/sdsalloc.h in the codebase? You need to ensure you update submodules as well. git submodule update --init --recursive is your friend |
Given I am trying to use tarball from https://files.pythonhosted.org/packages/source/h/hiredis/hiredis-2.2.2.tar.gz I would hope it is included. It actually is, but I would prefer if I could use include files from the hiredis package itself, not the vendored one. |
I'm in the same situation, trying to update this package to 2.2.2 on GNU Guix; there's no sdalloc.h file in hiredis 1.1.1:
I find it curious that a 'vendored' file doesn't exist upstream; is it something added by hiredis-py? I would also like to be able to simply link against a system-provided hiredis. |
The https://github.com/redis/hiredis/blob/v1.1.0/sdsalloc.h file seems to contain 3 re-definitions, perhaps for backward compatibility purpose? hiredis-py could probably be adjusted to use alloc.h and the originally named definitions it contains instead. |
Fixes redis#158. * src/pack.c: Replace sdsalloc.h with alloc.h. (pack_command): Replace s_malloc with hi_malloc.
https://build.opensuse.org/request/show/1072863 by user mcepl + dimstar_suse - Update to 2.2.2: - Reverting gcc -BSymbolic due to symbol collisions - Add pack_command to support writing via hiredis-py - Fixing broken windows builds on python < 3.8 - Fix url in Issue tracker - Restores publishing of source distribution - Supporting hiredis 1.1.0 - Modernizing: Restoring CI, Moving to pytest - Adding LICENSE to Repository - Python 3.11 trove, and links back to the project - Integrating release drafter - Implement pack_command that serializes redis-py command to the RESP bytes object. - Add 159-sdsalloc-to-alloc.patch (gh#redis/hiredis-py#158), which replaces use of sdsalloc with plain alloc.
Fixes redis#158 fully, including using a system-prodived hiredis. When the hiredis git submodule hasn't been initialized, print a message about it, and attempt to link against the a system-provided hiredis library instead. * setup.py (is_hiredis_bundled): New procedure. (get_hiredis_bundled_sources): Likewise. Print a message when bundled_hiredis_sources is empty. (get_sources): Adjust to use the above procedure. (get_linker_args): Add -lhiredis when the bundled hiredis is not used.
Fixes redis#158 fully, including using a system-provided hiredis. When the hiredis git submodule hasn't been initialized, print a message about it, and attempt to link against the a system-provided hiredis library instead. * setup.py (is_hiredis_bundled): New procedure. (get_hiredis_bundled_sources): Likewise. Print a message when bundled_hiredis_sources is empty. (get_sources): Adjust to use the above procedure. (get_linker_args): Add -lhiredis when the bundled hiredis is not used.
@Apteryks where did you get a hiredis 1.1.1 - the last release I see is 1.1.0 |
I merged #159 for now. I tried #161 locally, on Ubuntu 22.04.4 LTS, and the hiredis system header files are so old that the build breaks, it does not see some of the |
Typically build systems would probe for the version available, set some flag, then condition the code based on that flag. Not sure something can be done like this in the Python world though, at least when working with the basic setup.py or newer toml project build systems. |
It was a typo; I had tested with 1.1.0 indeed. |
I can fix this upstream but the only thing sdsalloc.h contains is:
Maybe just use that instead of trying to include sdsalloc.h ? |
That seems easy in isolation but if you force all downstream users to do this, the effort/pain adds up :-). For this reason I'd favor having that properly resolved upstream. Thanks for getting back! |
My comment was on a wrong PR, I thought this was our in-house PR, sorry :) I do think redis should fix that, but I would also be happy to have fedora just install the file if upstream won't |
hiredis-py/src/pack.c
Line 19 in a5574a9
When I look at the Makefile of hiredis:
https://github.com/redis/hiredis/blob/6f5bae8c6900e051da6e677756508707565ce56e/Makefile#L302-L310
I don’t see
sdsalloc.h
to be installed at all, therefore it is not installed on my openSUSE system. Any ideas how to get this file? Is it a bug inhiredis-py
or in the installationMakefile
of hiredis?The text was updated successfully, but these errors were encountered: