Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 713790 - net-misc/telnet-bsd-1.2-r2 : ./misc-proto.h: fatal error: sys/cdefs.h: No such file or directory
Summary: net-misc/telnet-bsd-1.2-r2 : ./misc-proto.h: fatal error: sys/cdefs.h: No suc...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
Whiteboard: cdefs.h
Depends on:
Blocks: missing-musl-includes
  Show dependency tree
Reported: 2020-03-21 14:13 UTC by Toralf Förster
Modified: 2022-04-02 11:43 UTC (History)
2 users (show)

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

emerge-info.txt (emerge-info.txt,17.06 KB, text/plain)
2020-03-21 14:13 UTC, Toralf Förster
emerge-history.txt (emerge-history.txt,233.05 KB, text/plain)
2020-03-21 14:13 UTC, Toralf Förster
environment (environment,86.99 KB, text/plain)
2020-03-21 14:13 UTC, Toralf Förster
etc.portage.tbz2 (etc.portage.tbz2,19.23 KB, application/x-bzip)
2020-03-21 14:13 UTC, Toralf Förster
logs.tbz2 (logs.tbz2,5.18 KB, application/x-bzip)
2020-03-21 14:13 UTC, Toralf Förster
net-misc:telnet-bsd-1.2-r1:20200321-123122.log (net-misc:telnet-bsd-1.2-r1:20200321-123122.log,6.77 KB, text/plain)
2020-03-21 14:13 UTC, Toralf Förster
temp.tbz2 (temp.tbz2,23.18 KB, application/x-bzip)
2020-03-21 14:13 UTC, Toralf Förster
musl.patch (0001-Musl-Hacks.patch,1.07 KB, patch)
2020-11-12 17:56 UTC, tonemgub
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 2020-03-21 14:13:17 UTC
In file included from telnet_locl.h:72,
                 from main.c:30:
./misc-proto.h:66:10: fatal error: sys/cdefs.h: No such file or directory
   66 | #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
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 *

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sat Mar 21 11:38:33 UTC 2020
/var/db/repos/musl	Sat Mar 21 03:09:12 UTC 2020

emerge -qpvO net-misc/telnet-bsd
[ebuild  N    ] net-misc/telnet-bsd-1.2-r1  USE="nls -xinetd"
Comment 1 Toralf Förster gentoo-dev 2020-03-21 14:13:20 UTC
Created attachment 623828 [details]
Comment 2 Toralf Förster gentoo-dev 2020-03-21 14:13:23 UTC
Created attachment 623830 [details]
Comment 3 Toralf Förster gentoo-dev 2020-03-21 14:13:25 UTC
Created attachment 623832 [details]
Comment 4 Toralf Förster gentoo-dev 2020-03-21 14:13:28 UTC
Created attachment 623834 [details]
Comment 5 Toralf Förster gentoo-dev 2020-03-21 14:13:31 UTC
Created attachment 623836 [details]
Comment 6 Toralf Förster gentoo-dev 2020-03-21 14:13:34 UTC
Created attachment 623838 [details]
Comment 7 Toralf Förster gentoo-dev 2020-03-21 14:13:37 UTC
Created attachment 623840 [details]
Comment 8 Marc Schiffbauer gentoo-dev 2020-03-21 16:37:44 UTC
Patches welcome...

Are there any patch proposals? thx
Comment 9 Michael 'veremitz' Everitt 2020-03-22 17:56:25 UTC
musl upstream has a FAQ entry specifically for this error:,-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 10 tonemgub 2020-11-12 17:56:55 UTC
Created attachment 671125 [details, diff]

This musl.patch resolves #713790. 

However, the ebuild also fails if ncurses is built with tinfo. You will need to pass -ltinfo to Makefile in order to build successfully.
Comment 11 Agostino Sarubbo gentoo-dev 2022-02-02 13:37:11 UTC
tinderbox_musl has reproduced this issue with version 1.2-r2 - Updating summary.
Comment 12 Andrew 2022-03-26 11:57:14 UTC
I've been affected by this on Raspberry Pi installation. The patch from #10 helped. Does anyone mind adding the patch to the portage tree for musl?
Comment 13 Larry the Git Cow gentoo-dev 2022-03-27 08:43:56 UTC
The bug has been referenced in the following commit(s):

commit c9ac47f26ac2f21c5e42f9143c1276379884cc97
Author:     Marc Schiffbauer <>
AuthorDate: 2022-03-27 08:42:50 +0000
Commit:     Marc Schiffbauer <>
CommitDate: 2022-03-27 08:43:45 +0000

    net-misc/telnet-bsd: fix bug 713790
    Signed-off-by: Marc Schiffbauer <>

 .../telnet-bsd/files/telnet-bsd-1.2-musl.patch     | 42 +++++++++++++++++++
 net-misc/telnet-bsd/telnet-bsd-1.2-r3.ebuild       | 49 ++++++++++++++++++++++
 2 files changed, 91 insertions(+)
Comment 14 Marc Schiffbauer gentoo-dev 2022-03-27 08:44:57 UTC
Does this fix it for you? Or do you have any suggestion/patch for ncurses[tinfo]?
Comment 15 Andrew 2022-04-02 11:43:01 UTC
Sorry for the late reply, the SD card on my RPi got busted. Yes, unmasking r3 indeed fixes the problem, thank you Marc!
Regarding the tinfo useflag on ncurses, it is on by default in musl profile and I haven't had any problems with it.