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

Bug 713974

Summary: dev-lang/micropython-1.17 : ../.../db.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: gentoo, maintainer-needed, monsieurp, python, treecleaner
Priority: Normal Keywords: NeedPatch
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: cdefs.h
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 713786    
Attachments: emerge-info.txt
dev-lang:micropython-1.11:20200322-082132.log
emerge-history.txt
environment
etc.portage.tbz2

Description Toralf Förster gentoo-dev 2020-03-22 12:45:40 UTC
GEN build/genhdr/qstr.i.last
In file included from ../../extmod/modbtree.c:37:
../../lib/berkeley-db-1.xx/PORT/include/db.h:40:10: fatal error: sys/cdefs.h: No such file or directory
   40 | #include <sys/cdefs.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

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

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

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

  Please see the tracker bug for details.

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 *

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sun Mar 22 07:14:16 UTC 2020
/var/db/repos/musl	Sun Mar 22 03:12:57 UTC 2020

emerge -qpvO dev-lang/micropython
[ebuild  N    ] dev-lang/micropython-1.11  USE="-test"
Comment 1 Toralf Förster gentoo-dev 2020-03-22 12:45:43 UTC
Created attachment 624388 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-22 12:45:46 UTC
Created attachment 624390 [details]
dev-lang:micropython-1.11:20200322-082132.log
Comment 3 Toralf Förster gentoo-dev 2020-03-22 12:45:49 UTC
Created attachment 624392 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-03-22 12:45:51 UTC
Created attachment 624394 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-03-22 12:45:54 UTC
Created attachment 624396 [details]
etc.portage.tbz2
Comment 6 Michael 'veremitz' Everitt 2020-03-22 17:56:49 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 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-31 19:36:46 UTC
patch which disables bdb: https://git.alpinelinux.org/aports/tree/testing/micropython/no_legacy_berkeley_db.patch

obviously we won't use that but shows what alpine did
Comment 8 Agostino Sarubbo gentoo-dev 2022-01-08 21:26:05 UTC
tinderbox_musl has reproduced this issue with version 1.17 - Updating summary.