|
#include <hiredis/sdsalloc.h> |
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 in hiredis-py or in the installation Makefile of hiredis?
Activity
chayim commentedon Feb 23, 2023
@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
mcepl commentedon Feb 23, 2023
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.
apteryks commentedon Mar 18, 2023
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.
apteryks commentedon Mar 18, 2023
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.
pack: Replace sdsalloc.h with alloc.h
Update python-hiredis to version 2.2.2 / rev 8 via SR 1072863
setup.py: Fallback to use the system hiredis library.
setup.py: Fallback to use the system hiredis library.
apteryks commentedon Mar 19, 2023
@mcepl hi! you may be interested in #159 and #161 to allow using a system-provided hiredis library.
mcepl commentedon Mar 19, 2023
Thank you, https://build.opensuse.org/request/show/1072918
chayim commentedon Jun 5, 2023
@apteryks where did you get a hiredis 1.1.1 - the last release I see is 1.1.0
bugant commentedon Dec 4, 2023
@chayim is there any interest in having #159 and #161 merged? I'm asking because I'm in the process of creating a Fedora package for this project and having the same issue described in here.
gerzse commentedon Jul 11, 2024
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
REDIS_REPLY_*definitions. Not sure how to handle this? It can be left in the responsibility of the one who's invoking the build, I guess.pack: Replace sdsalloc.h with alloc.h (redis#159)
apteryks commentedon Sep 12, 2024
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.
apteryks commentedon Sep 12, 2024
It was a typo; I had tested with 1.1.0 indeed.
paulwouters commentedon Sep 13, 2024
I can fix this upstream but the only thing sdsalloc.h contains is:
Maybe just use that instead of trying to include sdsalloc.h ?
apteryks commentedon Sep 22, 2024
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!
paulwouters commentedon Sep 23, 2024
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
setup.py: Fallback to use the system hiredis library.
uglide commentedon Apr 25, 2025
I'm closing it as the original issue with
sdsalloc.hwas fixed. @apteryks let's continue the discussion in your PR