Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900152 - app-crypt/gcr-3.41.1-r1 - fails to build with clang (console-interaction.c:100:9: error: incompatible integer to pointer conversion assigning to 'const gchar *' (aka 'const char *') from 'int' [-Wint-conversion])
Summary: app-crypt/gcr-3.41.1-r1 - fails to build with clang (console-interaction.c:10...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard: fixed in 3.41.1-r2
Keywords:
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2023-03-07 11:52 UTC by ernsteiswuerfel
Modified: 2024-10-31 08:29 UTC (History)
1 user (show)

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


Attachments
build.log (gcr-3.41.1-r1:20230307-113613.log,321.62 KB, text/plain)
2023-03-07 11:52 UTC, ernsteiswuerfel
Details
emerge --info (file_900152.txt,7.86 KB, text/plain)
2023-03-07 11:53 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2023-03-07 11:52:38 UTC
Created attachment 856618 [details]
build.log

Builds fine with gcc-12 but fails to build with clang-15.

[...]
FAILED: gcr/frob-certificate-request.p/console-interaction.c.o 
clang -Igcr/frob-certificate-request.p -Igcr -I../gcr-3.41.1/gcr -I. -I../gcr-3.41.1 -Igck -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Os -march=bdver3 -mtune=bdver3 -pipe -pthread '-DG_LOG_DOMAIN="Gcr"' -DGCR_COMPILATION -DGCR_API_SUBJECT_TO_CHANGE -DGCK_API_SUBJECT_TO_CHANGE -DP11_KIT_API_SUBJECT_TO_CHANGE -D_XOPEN_SOURCE -MD -MQ gcr/frob-certificate-request.p/console-interaction.c.o -MF gcr/frob-certificate-request.p/console-interaction.c.o.d -o gcr/frob-certificate-request.p/console-interaction.c.o -c ../gcr-3.41.1/gcr/console-interaction.c
../gcr-3.41.1/gcr/console-interaction.c:100:11: warning: call to undeclared function 'getpass'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  value = getpass (prompt);
          ^
../gcr-3.41.1/gcr/console-interaction.c:100:9: error: incompatible integer to pointer conversion assigning to 'const gchar *' (aka 'const char *') from 'int' [-Wint-conversion]
  value = getpass (prompt);
        ^ ~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
Comment 1 ernsteiswuerfel archtester 2023-03-07 11:53:08 UTC
Created attachment 856620 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2023-03-07 12:11:50 UTC
The bug has been closed via the following commit(s):

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

commit 3b99e98a7f71e2ba432fa10c1ed1994668e552b5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-03-07 12:11:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-07 12:11:27 +0000

    app-crypt/gcr: fix implicit func decls
    
    It doesn't make sense to default XOPEN_SOURCE and subsequently DEFAULT_SOURCE
    as DEFAULT_SOURCE is asking for no extensions. Anyway, just ask for GNU_SOURCE
    as it'll placate both musl and glibc for all of strptime/timegm/getpass and
    gcr-3 is obsolete anyway.
    
    gcr-4 is fine.
    
    Closes: https://bugs.gentoo.org/900152
    Signed-off-by: Sam James <sam@gentoo.org>

 .../gcr/files/3.41.1-implicit-func-decl.patch      | 28 ++++++++++++++++++++++
 .../{gcr-3.41.1-r1.ebuild => gcr-3.41.1-r2.ebuild} |  1 +
 2 files changed, 29 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2023-03-07 12:18:51 UTC
The bug has been referenced in the following commit(s):

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

commit 41a4a161191cd2cd5a869d9f382285242f548fb4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-03-07 12:18:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-07 12:18:41 +0000

    app-crypt/gcr: add bug ref to patch
    
    Bug: https://bugs.gentoo.org/900152
    Signed-off-by: Sam James <sam@gentoo.org>

 app-crypt/gcr/files/3.41.1-implicit-func-decl.patch | 2 ++
 1 file changed, 2 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2023-03-07 12:21:20 UTC Comment hidden (obsolete)