#1138424 hexchat: FTBFS with openssl 4.0

Package:
hexchat
Source:
hexchat
Description:
IRC client for X based on X-Chat 2
Submitter:
Sebastian Andrzej Siewior
Date:
2026-06-05 10:49:02 UTC
Severity:
normal
Tags:
#1138424#5
Date:
2026-05-30 16:12:12 UTC
From:
To:
OpenSSL 4.0 is in experimental. This package fails to build against it:

| [33/155] cc -Isrc/common/libhexchatcommon.a.p -Isrc/common -I../src/common -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu89 -funsigned-char -Wno-conversion -Wno-pointer-sign -Wno-padded -Wno-unused-parameter -Wno-missing-prototypes -Winline -Wstrict-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=1 -Werror=missing-include-dirs -Werror=date-time -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/hexchat-2.16.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -D_REENTRANT -DHAVE_CONFIG_H -MD -MQ src/common/libhexchatcommon.a.p/ssl.c.o -MF src/common/libhexchatcommon.a.p/ssl.c.o.d -o src/common/libhexchatcommon.a.p/ssl.c.o -c ../src/common/ssl.c
| FAILED: [code=1] src/common/libhexchatcommon.a.p/ssl.c.o
| cc -Isrc/common/libhexchatcommon.a.p -Isrc/common -I../src/common -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu89 -funsigned-char -Wno-conversion -Wno-pointer-sign -Wno-padded -Wno-unused-parameter -Wno-missing-prototypes -Winline -Wstrict-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=1 -Werror=missing-include-dirs -Werror=date-time -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/hexchat-2.16.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -D_REENTRANT -DHAVE_CONFIG_H -MD -MQ src/common/libhexchatcommon.a.p/ssl.c.o -MF src/common/libhexchatcommon.a.p/ssl.c.o.d -o src/common/libhexchatcommon.a.p/ssl.c.o -c ../src/common/ssl.c
| ../src/common/ssl.c: In function ‘_SSL_get_cert_info’:
| ../src/common/ssl.c:174:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|   174 |         key = X509_get_X509_PUBKEY(peer_cert);
|       |             ^
| ../src/common/ssl.c: In function ‘_SSL_close’:
| ../src/common/ssl.c:357:9: error: implicit declaration of function ‘ERR_remove_state’ [-Werror=implicit-function-declaration]
|   357 |         ERR_remove_state (0);
|       |         ^~~~~~~~~~~~~~~~
| ../src/common/ssl.c: In function ‘_SSL_check_common_name’:
| ../src/common/ssl.c:515:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|   515 |         name = X509_get_subject_name (cert);
|       |              ^
| ../src/common/ssl.c:519:9: warning: ‘X509_NAME_get_text_by_NID’ is deprecated: Since OpenSSL 4.0 [-Wdeprecated-declarations]
|   519 |         common_name_len = X509_NAME_get_text_by_NID (name, NID_commonName, NULL, 0);
|       |         ^~~~~~~~~~~~~~~
| In file included from /usr/include/openssl/ssl.h:34,
|                  from ../src/common/ssl.c:26:
| /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,
|       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
| ../src/common/ssl.c:525:9: warning: ‘X509_NAME_get_text_by_NID’ is deprecated: Since OpenSSL 4.0 [-Wdeprecated-declarations]
|   525 |         X509_NAME_get_text_by_NID (name, NID_commonName, common_name, common_name_len + 1);
|       |         ^~~~~~~~~~~~~~~~~~~~~~~~~
| /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

Full buildlog
https://breakpoint.cc/openssl-rebuild/logs-4/attempted/hexchat_2.16.2-1_amd64-2026-04-19T13:44:57Z

Sebastian

#1138424#12
Date:
2026-06-05 10:47:48 UTC
From:
To:
Dear Maintainer,

The patch fixes the build error.