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

Bug 713514

Summary: net-mail/fdm-2.0-r1 : fdm.h: 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
Priority: Normal    
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
net-mail:fdm-2.0:20200319-180445.log
temp.tbz2
Fix base64 declarations, from makepost at firemail dot cc.
Do not add base64.c twice, from Rosen Penev.
fixes for musl libc

Description Toralf Förster gentoo-dev 2020-03-19 18:20:23 UTC
x86_64-gentoo-linux-musl-gcc -DPACKAGE_NAME=\fdm\ -DPACKAGE_TARNAME=\fdm\ -DPACKAGE_VERSION=\2.0\ -DPACKAGE_STRING=\fdm\ 2.0\ -DPACKAGE_BUGREPORT=\\ -DPACKAGE_URL=\\ -DPACKAGE=\fdm\ -DVERSION=\2.0\ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_MREMAP=1 -DHAVE_SETRESUID=1 -DHAVE_SETRESGID=1 -DHAVE_STRLCPY=1 -DHAVE_STRLCAT=1 -I.   -I/usr/local/include -DPCRE -DSYSCONFFILE=\/etc/fdm.conf\ -DSYSLOCKFILE=\/var/lib/run/fdm.lock\   -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -D_GNU_SOURCE -std=gnu99 -O2  -c -o attach.o attach.c
In file included from attach.c:24:
fdm.h:23:10: fatal error: sys/cdefs.h: No such file or directory
   23 | #include <sys/cdefs.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

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

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

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

gcc-config -l:
 [1] 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-1.41.1 *

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Wed, 18 Mar 2020 13:38:27 +0000
emerge -qpvO net-mail/fdm
[ebuild  N    ] net-mail/fdm-2.0  USE="pcre -examples -libressl"
Comment 1 Toralf Förster gentoo-dev 2020-03-19 18:20:26 UTC
Created attachment 622824 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-19 18:20:29 UTC
Created attachment 622826 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-19 18:20:31 UTC
Created attachment 622828 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-19 18:20:34 UTC
Created attachment 622830 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-19 18:20:37 UTC
Created attachment 622832 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-19 18:20:40 UTC
Created attachment 622834 [details]
net-mail:fdm-2.0:20200319-180445.log
Comment 7 Toralf Förster gentoo-dev 2020-03-19 18:20:43 UTC
Created attachment 622836 [details]
temp.tbz2
Comment 8 Michael 'veremitz' Everitt 2020-03-19 19:15:02 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 Agostino Sarubbo gentoo-dev 2022-02-01 17:36:59 UTC
tinderbox_musl has reproduced this issue with version 2.0-r1 - Updating summary.
Comment 10 CFuga 2022-08-10 21:24:15 UTC
Created attachment 799181 [details, diff]
Fix base64 declarations, from makepost at firemail dot cc.

Patch from upstream, removes <sys/cdefs.h> include

https://github.com/nicm/fdm/commit/519e41833c1f7d353c09d8d51bfd6d13d0cfc16c
Comment 11 CFuga 2022-08-10 21:25:46 UTC
Created attachment 799183 [details, diff]
Do not add base64.c twice, from Rosen Penev.

Patch from upstream

https://github.com/nicm/fdm/commit/519e41833c1f7d353c09d8d51bfd6d13d0cfc16c
Comment 12 CFuga 2022-08-10 21:32:45 UTC
Created attachment 799185 [details, diff]
fixes for musl libc

This patch includes:

* upstream patch to remove <sys/cdefs.h> include
* upstream patch to fix base64.c added twice (+ required autoreconf)
* adds sys-libs/queue-standalone as a dependency when compiled for musl