Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934059 - dev-util/fuzz-0.6-r3 - [ncurses-6.5] getopt.c: error: implicit declaration of function strcmp [-Wimplicit-function-declaration]
Summary: dev-util/fuzz-0.6-r3 - [ncurses-6.5] getopt.c: error: implicit declaration of...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo musl team
URL:
Whiteboard: musl
Keywords: PullRequest
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2024-06-11 16:26 UTC by Toralf Förster
Modified: 2025-02-13 12:41 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,19.05 KB, text/plain)
2024-06-11 16:26 UTC, Toralf Förster
Details
dev-util:fuzz-0.6-r3:20240611-144012.log (dev-util:fuzz-0.6-r3:20240611-144012.log,15.75 KB, text/plain)
2024-06-11 16:26 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,199.30 KB, text/plain)
2024-06-11 16:26 UTC, Toralf Förster
Details
environment (environment,77.05 KB, text/plain)
2024-06-11 16:26 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.14 KB, application/x-xz)
2024-06-11 16:26 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,39.58 KB, application/x-xz)
2024-06-11 16:26 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,5.21 KB, application/x-xz)
2024-06-11 16:26 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,52.34 KB, application/x-xz)
2024-06-11 16:26 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,19.50 KB, application/x-xz)
2024-06-11 16:26 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-06-11 16:26:17 UTC
too long lines were shrinked:

>>> Compiling source in /var/tmp/portage/dev-util/fuzz-0.6-r3/work/fuzz-0.6 ...
make -j4 
x86_64-pc-linux-musl-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDIN
x86_64-pc-linux-musl-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDIN
x86_64-pc-linux-musl-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fuzz\" -DVERSION=\"0.6\" -DHAVE_LIBREADLINE=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDIN
getopt.c: In function '_getopt_internal':
getopt.c:580:30: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
  580 |       if (optind != argc && !strcmp (argv[optind], "--"))
      |                              ^~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_musl_hardened-20240608-075013

  UNMASKED:
  >=sys-libs/ncurses-6.5
    Issues involving opaque types / incomplete typedefs should block bug 930805

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-musl-14 *
clang/llvm (if any):
clang version 18.1.7
Target: x86_64-pc-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-musl-clang.cfg
/usr/lib/llvm/18
18.1.7
Python 3.12.4
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby32 (with Rubygems)
  [3]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.78.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.23_p9 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.11_p9 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.3_p9 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-11 
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21  system-vm

php cli (if any):
go version go1.22.4 linux/amd64

  HEAD of ::gentoo
commit 9de1ab33600f192d5adfd1d628448b031af5a5b0
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Jun 11 13:51:12 2024 +0000

    2024-06-11 13:51:11 UTC

emerge -qpvO dev-util/fuzz
[ebuild  N    ] dev-util/fuzz-0.6-r3
Comment 1 Toralf Förster gentoo-dev 2024-06-11 16:26:18 UTC
Created attachment 895619 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-06-11 16:26:19 UTC
Created attachment 895620 [details]
dev-util:fuzz-0.6-r3:20240611-144012.log
Comment 3 Toralf Förster gentoo-dev 2024-06-11 16:26:20 UTC
Created attachment 895621 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2024-06-11 16:26:21 UTC
Created attachment 895622 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-06-11 16:26:22 UTC
Created attachment 895623 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-06-11 16:26:23 UTC
Created attachment 895624 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-06-11 16:26:24 UTC
Created attachment 895625 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2024-06-11 16:26:25 UTC
Created attachment 895626 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-06-11 16:26:25 UTC
Created attachment 895627 [details]
temp.tar.xz
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2024-10-24 20:32:28 UTC
May also be a musl problem.
Comment 11 NHO 2025-02-10 14:41:43 UTC
Source declares posix prototype for getopt in case of glibc, and prototype with empty arguments in other cases.
Comment 12 Larry the Git Cow gentoo-dev 2025-02-13 12:41:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d042be2d8cb16f0a2c8a74611433346d2950760

commit 1d042be2d8cb16f0a2c8a74611433346d2950760
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2025-02-10 14:43:11 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-13 12:41:19 +0000

    dev-util/fuzz: fix compilation on musl
    
    Missing include for string.h, glibc transitively included strcmp
    Removed different getopt definition for non-glibc situation:
    we are all living in POSIX-land (Somewhat. Hopefully. Mostly.) and
    definitions for getopt are the same on musl and glibc.
    
    Closes: https://bugs.gentoo.org/944111
    Closes: https://bugs.gentoo.org/934059
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/40514
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/fuzz/files/fuzz-0.6-musl.patch            | 34 ++++++++++++++++++++++
 .../{fuzz-0.6-r3.ebuild => fuzz-0.6-r4.ebuild}     |  7 +++--
 2 files changed, 39 insertions(+), 2 deletions(-)