Public bug reported:

Imported from Debian bug http://bugs.debian.org/1128752:

Source: socat
Version: 1.8.1.0-2
Severity: important
Tags: ftbfs upstream
Justification: fails to build from source
User: [email protected]
Usertags: glibc-2.43

Dear maintainer(s),

socat fails to build from source with glibc 2.43, currently in
experimental. From the build log:

| xio-ip6.c: In function ‘xioparsenetwork_ip6’:
| xio-ip6.c:131:18: warning: assignment discards ‘const’ qualifier from pointer 
target type [-Wdiscarded-qualifiers]
|   131 |    if ((delimpos = strchr(rangename, '/')) == NULL) {
|       |                  ^
| xio-openssl.c: In function ‘_xioopen_openssl_prepare’:
| xio-openssl.c:1302:7: warning: ‘DH_new’ is deprecated: Since OpenSSL 3.0 
[-Wdeprecated-declarations]
|  1302 |       dh = DH_new();
|       |       ^~
| In file included from /usr/include/openssl/dsa.h:31,
|                  from /usr/include/openssl/x509.h:39,
|                  from /usr/include/openssl/ssl.h:34,
|                  from sysincludes.h:206,
|                  from xiosysincludes.h:11,
|                  from xio-openssl.c:7:
| /usr/include/openssl/dh.h:210:27: note: declared here
|   210 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
|       |                           ^~~~~~
| xio-openssl.c:1307:13: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 
[-Wdeprecated-declarations]
|  1307 |             DH_free(dh);
|       |             ^~~~~~~
| /usr/include/openssl/dh.h:211:28: note: declared here
|   211 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
|       |                            ^~~~~~~
| xio-openssl.c:1320:7: warning: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 
[-Wdeprecated-declarations]
|  1320 |       if (!DH_set0_pqg(dh, p, NULL, g)) {
|       |       ^~
| /usr/include/openssl/dh.h:266:27: note: declared here
|   266 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, 
BIGNUM *g);
|       |                           ^~~~~~~~~~~
| xio-openssl.c:1321:15: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 
[-Wdeprecated-declarations]
|  1321 |               DH_free(dh);
|       |               ^~~~~~~
| /usr/include/openssl/dh.h:211:28: note: declared here
|   211 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
|       |                            ^~~~~~~
| xio-openssl.c:1338:7: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 
[-Wdeprecated-declarations]
|  1338 |       DH_free(dh);
|       |       ^~~~~~~
| /usr/include/openssl/dh.h:211:28: note: declared here
|   211 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
|       |                            ^~~~~~~
| xio-openssl.c:1357:7: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: 
Since OpenSSL 3.0 [-Wdeprecated-declarations]
|  1357 |       ecdh = EC_KEY_new_by_curve_name(nid);
|       |       ^~~~
| sslcls.c: In function ‘sycPEM_read_bio_DHparams’:
| sslcls.c:456:4: warning: ‘PEM_read_bio_DHparams’ is deprecated: Since OpenSSL 
3.0 [-Wdeprecated-declarations]
|   456 |    result = PEM_read_bio_DHparams(bp, x, cb, u);
|       |    ^~~~~~
| In file included from /usr/include/openssl/x509.h:35:
| /usr/include/openssl/ec.h:1009:31: note: declared here
|  1009 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
|       |                               ^~~~~~~~~~~~~~~~~~~~~~~~
| In file included from /usr/include/openssl/ssl.h:39,
|                  from sysincludes.h:206,
|                  from sslcls.c:13:
| /usr/include/openssl/pem.h:479:1: note: declared here
|   479 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
|       | ^~~~~~~~~~~~~~~~~~~
| filan.c: In function ‘printtime’:
| filan.c:1115:46: error: assignment of read-only location ‘*(const char 
*)strchr(s, 10)’
|  1115 |       if (strchr(s, '\n'))  *strchr(s, '\n') = '\0';
|       |                                              ^
| xio-interface.c: In function ‘xioopen_interface’:
| xio-interface.c:123:4: warning: ‘__builtin_strncpy’ specified bound 16 equals 
destination size [-Wstringop-truncation]
|   123 |    strncpy(sfd->para.interface.name, ifname, IFNAMSIZ);
|       |    ^
| fdname.c: In function ‘sockname’:
| fdname.c:297:10: warning: ‘__builtin_strncpy’ specified bound 1024 equals 
destination size [-Wstringop-truncation]
|   297 |          strncpy(protoname, protoentp->p_name, sizeof(protoname));
|       |          ^
| make[1]: *** [<builtin>: filan.o] Error 1
| make[1]: *** Waiting for unfinished jobs....
| xio-unix.c: In function ‘xiosetunix’:
| xio-unix.c:101:4: warning: ‘__builtin_strncpy’ specified bound 108 equals 
destination size [-Wstringop-truncation]
|   101 |    strncpy(saun->sun_path, path, sizeof(saun->sun_path));       /* ok 
*/
|       |    ^
| xio-ip6.c: In function ‘xiotype_ip6_join_source_group’:
| xio-ip6.c:583:4: warning: ‘__builtin_strncpy’ output may be truncated copying 
16 bytes from a string of length 511 [-Wstringop-truncation]
|   583 |    strncpy(opt->value2.u_string/*ifindex*/, buff, IF_NAMESIZE);
|       |    ^
| xio-socket.c: In function ‘xiobind’:
| xio-socket.c:2185:13: warning: ‘__builtin_strncpy’ specified bound 108 equals 
destination size [-Wstringop-truncation]
|  2185 |             strncpy(us->un.sun_path+(abstract?1:0), sockname, 
sizeof(us->un.sun_path));
|       |             ^
| make[1]: Leaving directory '/build/reproducible-path/socat-1.8.1.0'
| dh_auto_build: error: make -j128 returned exit code 2
| make: *** [debian/rules:25: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2

The full build log is available here [1].

The issue is due to ISO C23 declaration of bsearch, memchr, strchr,
strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr,
which now returns a pointer to a const-qualified type when the input
argument is a pointer to a const-qualified type [2].

I would like to thanks Emanuele Rocca for doing the archive rebuild on
a fast arm64 server.

Regards
Aurelien

[1] 
https://people.debian.org/~ema/glibc-2.43-rebuilds/output-1/socat_arm64.build
[2] 
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                     http://aurel32.net

** Affects: socat (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: socat (Debian)
     Importance: Undecided
         Status: New


** Tags: ftbfs

** Bug watch added: Debian Bug tracker #1128752
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128752

** Changed in: socat (Debian)
 Remote watch: None => Debian Bug tracker #1128752

** Tags added: ftbfs

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2146905

Title:
  socat: FTBFS with glibc 2.43 due to ISO C23 const return types

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/socat/+bug/2146905/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to