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

Bug 712846

Summary: sys-auth/pam_ssh-2.3-r1 : pam_ssh.c: fatal error: sys/cdefs.h: No such file or directory
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: CONFIRMED ---    
Severity: normal CC: maintainer-needed, mgorny, vklimovs, zlogene
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: cdefs.h
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
sys-auth:pam_ssh-2.3:20200316-052521.log
temp.tbz2
sys-auth/pam_ssh: patch don't include cdefs.h

Description Toralf Förster gentoo-dev 2020-03-16 13:25:39 UTC
/bin/sh ./libtool  --tag=CC   --mode=compile x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I.   -I/usr/include/security  -Wall -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -c -o pam_ssh.lo pam_ssh.c
libtool: compile:  x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/usr/include/security -Wall -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -c pam_ssh.c  -fPIC -DPIC -o .libs/pam_ssh.o
pam_ssh.c:44:10: fatal error: sys/cdefs.h: No such file or directory
   44 | #include <sys/cdefs.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200311-204810

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.2.0 *
 [2] x86_64-gentoo-linux-musl-9.3.0
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.41.1
  [2]   rust-1.41.1 *
The following VMs are available for generation-2:

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Mon, 16 Mar 2020 04:38:59 +0000
emerge -qpvO sys-auth/pam_ssh
[ebuild  N    ] sys-auth/pam_ssh-2.3
Comment 1 Toralf Förster gentoo-dev 2020-03-16 13:25:41 UTC
Created attachment 620360 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-16 13:25:44 UTC
Created attachment 620362 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-16 13:25:47 UTC
Created attachment 620364 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-16 13:25:50 UTC
Created attachment 620366 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-16 13:25:52 UTC
Created attachment 620368 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-16 13:25:56 UTC
Created attachment 620370 [details]
sys-auth:pam_ssh-2.3:20200316-052521.log
Comment 7 Toralf Förster gentoo-dev 2020-03-16 13:25:58 UTC
Created attachment 620372 [details]
temp.tbz2
Comment 8 Michael 'veremitz' Everitt 2020-03-16 14:11:29 UTC
musl upstream has a FAQ entry specifically for this error:
https://wiki.musl-libc.org/faq.html#Q:-When-compiling-something-against-musl,-I-get-error-messages-about-%3Ccode%3Esys/cdefs.h%3C/code%3E

We will need to check/report upstream and patch affected code temporarily.
Comment 9 Toralf Förster gentoo-dev 2020-03-16 16:12:45 UTC
The first attempt to tinderbox a musl image failed at all.

I'll mass close therefore all filed bug reports of the last days related to this tinderbox image.

Please feel free to re-open if you think that the bug is real in musl and not fixed by the musl overlay.
Comment 10 Michael 'veremitz' Everitt 2020-03-18 21:29:27 UTC
*** Bug 713128 has been marked as a duplicate of this bug. ***
Comment 11 Vjaceslavs Klimovs 2020-07-26 03:21:43 UTC
Created attachment 650776 [details, diff]
sys-auth/pam_ssh: patch don't include cdefs.h

Doing as described in musl documentation makes the package compile, see attached patch.
Comment 12 Agostino Sarubbo gentoo-dev 2024-02-21 08:43:19 UTC
tinderbox_musl has reproduced this issue with version 2.3-r1 - Updating summary.