Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942467 - app-crypt/gnupg-2.4.6 - [gcc-15] /.../app.c: error: implicit declaration of function write
Summary: app-crypt/gnupg-2.4.6 - [gcc-15] /.../app.c: error: implicit declaration of f...
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:
Keywords: PATCH
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-10-29 18:07 UTC by Toralf Förster
Modified: 2024-11-03 09:04 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,21.94 KB, text/plain)
2024-10-29 18:07 UTC, Toralf Förster
Details
app-crypt:gnupg-2.4.6:20241029-180424.log.xz (app-crypt:gnupg-2.4.6:20241029-180424.log.xz,10.77 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,93.17 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
environment (environment,103.48 KB, text/plain)
2024-10-29 18:07 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.15 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,33.14 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,16.07 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,96.10 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,24.25 KB, application/x-xz)
2024-10-29 18:07 UTC, Toralf Förster
Details
Patch that fixes compile (0001-Add-unistd.h-header-if-present-fixes-musl-compile.patch,673 bytes, patch)
2024-10-31 10:54 UTC, David Carlos Manuelda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-10-29 18:07:21 UTC
too long lines were shrinked:

make[2]: Entering directory '/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6_build/scd'
x86_64-pc-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6/scd -I..  -I/usr/include/libusb-1.0 -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr
make[2]: Leaving directory '/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6_build/scd'
make[2]: Entering directory '/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6_build/scd'
x86_64-pc-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6/scd -I..  -I/usr/include/libusb-1.0 -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr
/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6/scd/app.c: In function 'card_list_signal':
/var/tmp/portage/app-crypt/gnupg-2.4.6/work/gnupg-2.4.6/scd/app.c:386:5: error: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
  386 |     write (card_list_lock.notify_pipe[1], "", 1);
      |     ^~~~~

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

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

  UNMASKED:
  <sys-devel/gcc-15.0.9999:15

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

gcc-config -l:
 [1] x86_64-pc-linux-musl-15 *
clang version 19.1.2
llvm-config: 19.1.2
Python 3.12.7
go version go1.23.2 linux/amd64
  [1]   php8.2
  [2]   php8.3 *
Available Ruby profiles:
  [1]   ruby32 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.82.0
  [2]   rust-1.82.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.25_p9 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.13_p11 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.5_p11 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-11 
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21  system-vm


  HEAD of ::gentoo
commit ca85c66c5eb3f3c9f32dbe0c8d218804ab5c2827
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Oct 29 17:37:49 2024 +0000

    2024-10-29 17:37:49 UTC

emerge -qpvO =app-crypt/gnupg-2.4.6
[ebuild     U ] app-crypt/gnupg-2.4.6 [2.4.5-r2] USE="bzip2 nls readline smartcard ssl tofu tools usb wks-server -doc -ldap (-selinux) -test -tpm -user-socket -verify-sig"
Comment 1 Toralf Förster gentoo-dev 2024-10-29 18:07:22 UTC
Created attachment 907259 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-10-29 18:07:23 UTC
Created attachment 907260 [details]
app-crypt:gnupg-2.4.6:20241029-180424.log.xz
Comment 3 Toralf Förster gentoo-dev 2024-10-29 18:07:24 UTC
Created attachment 907261 [details]
emerge-history.txt.xz
Comment 4 Toralf Förster gentoo-dev 2024-10-29 18:07:25 UTC
Created attachment 907262 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-10-29 18:07:26 UTC
Created attachment 907263 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-10-29 18:07:27 UTC
Created attachment 907264 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-10-29 18:07:28 UTC
Created attachment 907265 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2024-10-29 18:07:29 UTC
Created attachment 907266 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-10-29 18:07:30 UTC
Created attachment 907267 [details]
temp.tar.xz
Comment 10 David Carlos Manuelda 2024-10-31 10:54:10 UTC
Created attachment 907460 [details, diff]
Patch that fixes compile

I've made this patch (and also sent to upstream dev mailing list yet I am not subscribed and my mail is subject to an admin aproval) that makes it compile with musl.

Since this only affects musl build I'd remove the c99-porting
Comment 11 Viorel Munteanu gentoo-dev 2024-11-01 14:42:48 UTC
(In reply to David Carlos Manuelda from comment #10)
> Created attachment 907460 [details, diff] [details, diff]
> Patch that fixes compile
> 

Also happens with gcc-14.  The patch works.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-03 09:03:25 UTC
> Since this only affects musl build I'd remove the c99-porting

No, it's still a c99-porting blocker. It's an implicit function declaration which would build otherwise with potentially wrong results.
Comment 13 Larry the Git Cow gentoo-dev 2024-11-03 09:04:15 UTC
The bug has been closed via the following commit(s):

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

commit 529953360a192b6d34ff867a2856f19d918c1df4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-03 09:03:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-03 09:03:47 +0000

    app-crypt/gnupg: fix implicit func decl (on musl) for 2.4.6
    
    Closes: https://bugs.gentoo.org/942467
    Signed-off-by: Sam James <sam@gentoo.org>

 app-crypt/gnupg/files/gnupg-2.4.6-c99.patch        | 28 ++++++++++++++++++++++
 .../{gnupg-2.4.6.ebuild => gnupg-2.4.6-r1.ebuild}  |  1 +
 2 files changed, 29 insertions(+)