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

Bug 828901

Summary: net-misc/bsdwhois-1.43.2.1 - strnstr.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: RESOLVED FIXED    
Severity: normal CC: maintainer-needed
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
logs.tar.bz2
net-misc:bsdwhois-1.43.2.1:20211211-071254.log
temp.tar.bz2
updated bsdwhois-1.43.2.1 patch for musl

Description Toralf Förster gentoo-dev 2021-12-11 10:09:46 UTC
make  all-am
make[1]: Entering directory '/var/tmp/portage/net-misc/bsdwhois-1.43.2.1/work/bsdwhois-1.43.2.1'
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I.     -pipe -march=native -fno-diagnostics-color -O2 -c whois.c
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I.     -pipe -march=native -fno-diagnostics-color -O2 -c strnstr.c
strnstr.c:41:10: fatal error: sys/cdefs.h: No such file or directory
   41 | #include <sys/cdefs.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:268: strnstr.o] Error 1

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl_hardened-j4-20211210-222208

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-11.2.1 *
clang version 13.0.0
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/13/bin
/usr/lib/llvm/13
13.0.0
Python 3.9.9
Available Ruby profiles:
  (none found)
php cli:

  HEAD of ::gentoo
commit 3c1bd7a78c20a7350fcc53603035d5bd261e4704
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Dec 11 06:36:44 2021 +0000

    2021-12-11 06:36:42 UTC

emerge -qpvO net-misc/bsdwhois
[ebuild  N    ] net-misc/bsdwhois-1.43.2.1
Comment 1 Toralf Förster gentoo-dev 2021-12-11 10:09:47 UTC
Created attachment 758427 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-11 10:09:48 UTC
Created attachment 758428 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-12-11 10:09:49 UTC
Created attachment 758429 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-12-11 10:09:50 UTC
Created attachment 758430 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-12-11 10:09:51 UTC
Created attachment 758431 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-12-11 10:09:52 UTC
Created attachment 758432 [details]
net-misc:bsdwhois-1.43.2.1:20211211-071254.log
Comment 7 Toralf Förster gentoo-dev 2021-12-11 10:09:53 UTC
Created attachment 758433 [details]
temp.tar.bz2
Comment 8 CFuga 2022-06-23 20:16:21 UTC
Created attachment 787211 [details, diff]
updated bsdwhois-1.43.2.1 patch for musl

The Gentoo tree already includes a patch for musl, but it's incomplete. This is an updated version, which removes <sys/cdefs.h> from:
* whois.c
* strnstr.c
Comment 9 Larry the Git Cow gentoo-dev 2022-06-24 03:43:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3690d57e4ec3c647da56c2cdd563c530f5d03eb1

commit 3690d57e4ec3c647da56c2cdd563c530f5d03eb1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-24 01:56:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-24 03:13:48 +0000

    net-misc/bsdwhois: fix build on musl
    
    Thanks-to: CFuga <cfuga@cfuga.mx>
    Closes: https://bugs.gentoo.org/828901
    Signed-off-by: Sam James <sam@gentoo.org>

 .../bsdwhois/files/bsdwhois-1.43.2.1-musl-cdefs.patch    | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)