Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 874021

Summary: games-arcade/netris-0.52-r3 - game.c: error: call to undeclared function getopt; ISO C99 and later do
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
games-arcade:netris-0.52-r3:20221002-120528.log
temp.tar.bz2

Description Toralf Förster gentoo-dev 2022-10-02 12:14:38 UTC
      'long' [-Wformat]
        printw("Speed: %dms", speed / 1000);
                       ~~     ^~~~~~~~~~~~
                       %ld
game.c:388:15: error: call to undeclared function 'getopt'; ISO C99 and later do
      not support implicit function declarations
      [-Werror,-Wimplicit-function-declaration]

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-j4-20221001-224558

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-12.2.0 *
clang/llvm (if any):
clang version 15.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
/usr/lib/llvm/15
15.0.1
Python 3.10.7
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.64.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 17.0.4.1_p1 [openjdk-bin-17]
2)	Eclipse Temurin JDK 8.345_p01 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
  [1]   php8.1 *
GNU Make 4.3

  HEAD of ::gentoo
commit ffd974ef87604e20495370342e9dbcb42a4dbc82
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Oct 2 11:31:48 2022 +0000

    2022-10-02 11:31:48 UTC

emerge -qpvO games-arcade/netris
[ebuild  N    ] games-arcade/netris-0.52-r3
Comment 1 Toralf Förster gentoo-dev 2022-10-02 12:14:40 UTC
Created attachment 815377 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-10-02 12:14:41 UTC
Created attachment 815380 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-10-02 12:14:43 UTC
Created attachment 815383 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-10-02 12:14:44 UTC
Created attachment 815386 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-10-02 12:14:45 UTC
Created attachment 815389 [details]
games-arcade:netris-0.52-r3:20221002-120528.log
Comment 6 Toralf Förster gentoo-dev 2022-10-02 12:14:46 UTC
Created attachment 815392 [details]
temp.tar.bz2
Comment 7 Larry the Git Cow gentoo-dev 2022-10-14 11:57:02 UTC
The bug has been closed via the following commit(s):

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

commit ed192a5ae0261aa59a25677fa29bce0f29fe5bcf
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-10-14 11:49:00 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-10-14 11:56:25 +0000

    games-arcade/netris: fix build w/ upcoming clang16 + pass std=gnu89
    
    Tests silently failed (errors to /dev/null, and no confirmation),
    then it silently skip including the header it didn't find.
    
    (just a quick fix, this could use cleanups, better patches, and no sed)
    
    Closes: https://bugs.gentoo.org/874021
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../netris/files/netris-0.52-clang16.patch         | 31 ++++++++++++++++++++++
 ...netris-0.52-r3.ebuild => netris-0.52-r4.ebuild} |  9 +++++--
 2 files changed, 38 insertions(+), 2 deletions(-)