Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944902 - media-gfx/jpegoptim-1.5.5 fails to compile: getopt.c:299:21: error: too many arguments to function getenv
Summary: media-gfx/jpegoptim-1.5.5 fails to compile: getopt.c:299:21: error: too many ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-25 08:39 UTC by Agostino Sarubbo
Modified: 2024-11-25 08:59 UTC (History)
0 users

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


Attachments
build.log (build.log,67.42 KB, text/plain)
2024-11-25 08:39 UTC, Agostino Sarubbo
Details

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

Issue: media-gfx/jpegoptim-1.5.5 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)
System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-11-25 08:39:58 UTC
Created attachment 911855 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-11-25 08:39:59 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: CMakeFiles/jpegoptim.dir/getopt.c.o 
FAILED: CMakeFiles/jpegoptim.dir/jpegoptim.c.o 
/var/tmp/portage/media-gfx/jpegoptim-1.5.5/work/jpegoptim-1.5.5/getopt.c:299:21: error: too many arguments to function 'getenv'
Comment 3 Ionen Wolkens gentoo-dev 2024-11-25 08:50:54 UTC
Looks like getopt.c only gets used when !defined (__GNU_LIBRARY__) and it's kind of nasty/dated.

As far as I can tell there is no problem with simply.. not using it with musl. This check may have been intended for another libc.
Comment 4 Larry the Git Cow gentoo-dev 2024-11-25 08:59:01 UTC
The bug has been closed via the following commit(s):

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

commit c679b6bcbc3a675f7bfbdb703cea0689af6d73f8
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-11-25 08:51:46 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-11-25 08:58:25 +0000

    media-gfx/jpegoptim: avoid broken/dated getopt.c with musl
    
    *Should* fix bug #944902 but lazily haven't actually tried gcc15+musl
    given my ready-to-use musl chroot is llvm-musl. Did try it with glibc
    and gcc-15 is fine as-is though.
    
    Closes: https://bugs.gentoo.org/944902
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 media-gfx/jpegoptim/jpegoptim-1.5.5.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)