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

Bug 885963

Summary: net-print/mtink-1.0.16-r2 fails to compile (CLANG-STRICTER-SYSTEM): error: call to undeclared library function strncmp with type int (const char , const char , unsigned long); ISO C99 and later do not support implicit function declarations [-Werror,-Wimp
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Printing Team <printing>
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: build.log

Description Agostino Sarubbo gentoo-dev 2022-12-14 15:12:37 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-print/mtink-1.0.16-r2 fails to compile (CLANG-STRICTER-SYSTEM).
Discovered on: amd64 (internal ref: clang-stricter_tinderbox)

NOTE:
(CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode

This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types

See also:
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
https://wiki.gentoo.org/wiki/Modern_C_porting
Comment 1 Agostino Sarubbo gentoo-dev 2022-12-14 15:12:39 UTC
Created attachment 842639 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-12-14 15:12:41 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


   ".Da.inkOutError:          Der er ikke nok bl<E6>k",
   ".Da.paperJamError:        Fejl ved papirfremf<F8>          if ( strncmp(buf, "Recv:",5) == 0 )ring",
   ".Fr.inkOutError:          Encre    { ".colorChoicesNb:",      A_NB,     OFFSET(color_choices)    },<E9>
   ".Hu.inkOutError:          Tintakifogy<E1>s hiba",
   ".Hu.paperJamError:        Pap<ED>r akad<E1>s hiba",
   ".Hu.paperOutError:        Nincs pap<ED>r hiba",
   ".Sv.inkOutError:          Bl<E4>cket <E4>r slut",
   ".Sv.paperOutError:        Pappret <E4>r slut",
51:16:   ".Da.dyellow:  M error: call to undeclared library function 'strncmp' with type 'int (const char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]<F8>
Comment 3 Larry the Git Cow gentoo-dev 2024-03-12 05:16:21 UTC
The bug has been closed via the following commit(s):

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

commit 65c4d815a053b023f48cf96ca632a2afe8cb394a
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-03-12 04:07:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-12 05:15:39 +0000

    net-print/mtink: fix LTO and Modern C bugs
    
    Import a patch from debian which fixes both issues by:
    - including the correct headers
    - avoiding conflicting definitions of two functions by deleting the
      conflicting one and #include'ing the other one everywhere
    
    Closes: https://bugs.gentoo.org/861854
    Closes: https://bugs.gentoo.org/885963
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mtink-1.0.16-fix-function-declarations.patch   | 57 ++++++++++++++++++++++
 net-print/mtink/mtink-1.0.16-r2.ebuild             |  1 +
 2 files changed, 58 insertions(+)