Skip to content

[BUG] compile with openssl 4.0.0 #15221

Closed

Description

@spacexnasa

system version

lsb_release -a
LSB Version: n/a
Distributor ID: AlmaLinux
Description: AlmaLinux 9.5 (Teal Serval)
Release: 9.5
Codename: n/a

redis version

redis-8.8-rc1

cc -pedantic -DREDIS_STATIC='' -std=gnu11 -Wall -W -Wno-missing-field-initializers -Werror=deprecated-declarations -Wstrict-prototypes -O3 -flto=auto -fno-omit-frame-pointer -g -ggdb -I/usr/include -Wl,-rpath=/usr/lib64 -L/usr/lib64 -DUSE_PROCESSOR_CLOCK -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -I../deps/xxhash -DHAVE_LIBSYSTEMD -DUSE_JEMALLOC -I../deps/jemalloc/include -DUSE_OPENSSL=1 -I/usr/include -DBUILD_TLS_MODULE=0 -DINCLUDE_VEC_SETS=1 -MMD -o socket.o -c socket.c
cc -pedantic -DREDIS_STATIC='' -std=gnu11 -Wall -W -Wno-missing-field-initializers -Werror=deprecated-declarations -Wstrict-prototypes -O3 -flto=auto -fno-omit-frame-pointer -g -ggdb -I/usr/include -Wl,-rpath=/usr/lib64 -L/usr/lib64 -DUSE_PROCESSOR_CLOCK -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -I../deps/xxhash -DHAVE_LIBSYSTEMD -DUSE_JEMALLOC -I../deps/jemalloc/include -DUSE_OPENSSL=1 -I/usr/include -DBUILD_TLS_MODULE=0 -DINCLUDE_VEC_SETS=1 -MMD -o tls.o -c tls.c
tls.c: In function ‘getCertFieldByName’:
tls.c:650:26: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
650 | X509_NAME *subject = X509_get_subject_name(cert);
| ^~~~~~~~~~~~~~~~~~~~~
tls.c:653:5: error: ‘X509_NAME_get_text_by_NID’ is deprecated: Since OpenSSL 4.0 [-Werror=deprecated-declarations]
653 | return X509_NAME_get_text_by_NID(subject, nid, out, outlen) > 0;
| ^~~~~~
In file included from /usr/include/openssl/ssl.h:34,
from tls.c:22:
/usr/include/openssl/x509.h:1041:27: note: declared here
1041 | OSSL_DEPRECATEDIN_4_0 int X509_NAME_get_text_by_NID(const X509_NAME *name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [Makefile:480: tls.o] Error 1
make[1]: Leaving directory '/home/software/redis-8.8-rc1/src'
make: *** [Makefile:17: install] Error 2

Activity

  1. sundb commented on May 18, 2026

    @sundb
    Collaborator

    @spacexnasa This means that X509_NAME_get_text_by_NID() has been deprecated. We should use other interfaces in the new version.
    Do you wanna make a PR for it? Thx.

  2. arpitjaswal commented on May 18, 2026

    @arpitjaswal
    Contributor

    I’ve worked on a fix for this and will open a PR shortly.

  3. spacexnasa commented on May 18, 2026

    @spacexnasa
    Author

    I’ve worked on a fix for this and will open a PR shortly.

    thanks for your support,now can work.maybe can release new rc version

  4. added a commit that references this issue on Sep 30, 2026
    8bc1c4e
  5. added 6 commits that reference this issue on Oct 22, 2026
    dd09b2f
    bef9c2a
    6640ab6
    b1ff069
    ee67b64
    e375fb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions