Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 738942 - dev-util/fuzz-0.6-r1 with glibc-2.32: fuzz.c:815:20: error: ‘sys_errlist’ undeclared (first use in this function)
Summary: dev-util/fuzz-0.6-r1 with glibc-2.32: fuzz.c:815:20: error: ‘sys_errlist’ und...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: glibc-2.32
  Show dependency tree
 
Reported: 2020-08-25 12:41 UTC by Agostino Sarubbo
Modified: 2021-08-05 02:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,13.36 KB, text/plain)
2020-08-25 12:41 UTC, Agostino Sarubbo
Details
emerge --info (emerge.info,12.78 KB, application/x-info)
2021-05-18 08:03 UTC, Andrew Savchenko
Details
build.log.gz (build.log.gz,3.90 KB, application/gzip)
2021-05-18 08:04 UTC, Andrew Savchenko
Details
fuzz-0.6-r2.ebuild (fuzz-0.6-r2.ebuild,674 bytes, text/plain)
2021-05-18 08:32 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-08-25 12:41:01 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/fuzz-0.6-r1 fails to compile.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This machine uses a clang/LLVM toolchain.
If you think that this issue is strictly related to clang/LLVM please block bug 408963. If you think that this issue is strictly related to the LLD linker, please block bug 731004.
This machine uses also GLIBC-2.32. If you think that this issue is strictly related to GLIBC please block bug 736174.
Comment 1 Agostino Sarubbo gentoo-dev 2020-08-25 12:41:03 UTC
Created attachment 656600 [details]
build.log

build log and emerge --info
Comment 2 Andrew Savchenko gentoo-dev 2021-05-18 08:03:01 UTC
Same problem here on ~x86:
fuzz.c:815:20: error: ‘sys_errlist’ undeclared (first use in this function)
  815 |   write(cpy_stderr,sys_errlist[errno],strlen(sys_errlist[errno]));
      |                    ^~~~~~~~~~~

sys_errlist is gone from glibc-2.32 and should be replaced (from glibc-2.32 changelog):

* The functions strerrorname_np and strerrordesc_np have been added.  The
  strerroname_np returns error number name (e.g. "EINVAL" for EINVAL) while
  strerrordesc_np returns string describing error number
  (e.g "Invalid argument" for EINVAL).  Different than strerror,
  strerrordesc_np does not attempt to translate the return description, both
  functions return NULL for an invalid error number.

  They should be used instead of sys_errlist and sys_nerr, both are
  thread and async-signal safe.  These functions are GNU extensions.

* The deprecated symbols sys_errlist, _sys_errlist, sys_nerr, and _sys_nerr
  are no longer available to newly linked binaries, and their declarations
  have been removed from from <stdio.h>.  They are exported solely as
  compatibility symbols to support old binaries.  All programs should use
  strerror or strerror_r instead.
Comment 3 Andrew Savchenko gentoo-dev 2021-05-18 08:03:48 UTC
Created attachment 709623 [details]
emerge --info
Comment 4 Andrew Savchenko gentoo-dev 2021-05-18 08:04:32 UTC
Created attachment 709626 [details]
build.log.gz
Comment 5 Andrew Savchenko gentoo-dev 2021-05-18 08:30:08 UTC
(In reply to Andrew Savchenko from comment #2)
> Same problem here on ~x86:
> fuzz.c:815:20: error: ‘sys_errlist’ undeclared (first use in this function)
>   815 |   write(cpy_stderr,sys_errlist[errno],strlen(sys_errlist[errno]));
>       |                    ^~~~~~~~~~~
> 
> sys_errlist is gone from glibc-2.32 and should be replaced (from glibc-2.32
> changelog):

Debian's patch already does this, but if silently failed to apply properly due to portage changes. Updated EAPI 7 ebuild fixes this:

--- fuzz-0.6-r1.ebuild  2020-05-01 17:48:14.000000000 +0300
+++ fuzz-0.6-r2.ebuild  2021-05-18 11:25:16.652906082 +0300
@@ -1,7 +1,7 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2

-EAPI=5
+EAPI=7

 inherit toolchain-funcs

@@ -20,7 +20,7 @@
 DEPEND="sys-libs/readline:0="
 RDEPEND="${DEPEND}"

-PATCHES=( "${DISTDIR}"/${DEB_P}-${DEB_PR}.diff.gz )
+PATCHES=( "${WORKDIR}"/${DEB_P}-${DEB_PR}.diff )

 src_prepare() {
        default


Robbat2, ok to apply?
Comment 6 Andrew Savchenko gentoo-dev 2021-05-18 08:32:11 UTC
Created attachment 709629 [details]
fuzz-0.6-r2.ebuild

Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Comment 7 Andrew Savchenko gentoo-dev 2021-06-05 20:01:55 UTC
Ping.

Ok to apply proposed patch?
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2021-06-06 18:47:40 UTC
bircoph: +1, go ahead
Comment 9 Larry the Git Cow gentoo-dev 2021-08-05 02:58:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d9dc5f421ef28ce50750fb8ac4336750702bb8b

commit 6d9dc5f421ef28ce50750fb8ac4336750702bb8b
Author:     Andrew Savchenko <bircoph@gentoo.org>
AuthorDate: 2021-08-05 02:56:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-05 02:56:54 +0000

    dev-util/fuzz: fix build with glibc-2.32, fix applying patchset
    
    Closes: https://bugs.gentoo.org/738942
    Acked-by: Robin Johnson <robbat2@gentoo.org>
    Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/fuzz/fuzz-0.6-r2.ebuild | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)