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

Bug 565978

Summary: sys-apps/man-db-2.7.2 fails to build on musl
Product: Gentoo Linux Reporter: Justin Keogh <bugs.gentoo.org>
Component: [OLD] Core systemAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: base-system, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: man-db-2.7.2 build log
emerge --info '=sys-apps/man-db-2.7.2::gentoo'
emerge -pqv '=sys-apps/man-db-2.7.2::gentoo'
/var/tmp/portage/sys-apps/man-db-2.7.2/temp/environment
/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man/replace.sed

Description Justin Keogh 2015-11-16 20:16:49 UTC
sys-apps/man-db-2.7.2 fails with:
make[4]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
sed: file replace.sed line 1: unknown command: `
Makefile:2316: recipe for target 'man5/manpath.5' failed
make[3]: *** [man5/manpath.5] Error 1
make[3]: *** Waiting for unfinished jobs....
  GEN      man8/mandb.8
make[4]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
make[4]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
make[4]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
make[4]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
  GEN      man1/man.1
  GEN      man1/manpath.1
  GEN      man1/whatis.1
  GEN      man1/lexgrog.1
  GEN      man1/manconv.1
make[3]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
Makefile:1790: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man'
Makefile:1521: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2'
Makefile:1449: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: sys-apps/man-db-2.7.2::gentoo failed (compile phase):
 *   emake failed

The only non-standard thing going on here is I am using http://distfiles.gentoo.org/experimental/amd64/musl/stage3-amd64-musl-hardened-20151104.tar.bz2

Full build log and env attached.

Reproducible: Always

Steps to Reproduce:
1. emerge man-db (using musl stage3)
Comment 1 Justin Keogh 2015-11-16 20:18:31 UTC
Created attachment 417134 [details]
man-db-2.7.2 build log
Comment 2 Justin Keogh 2015-11-16 20:19:40 UTC
Created attachment 417136 [details]
emerge --info '=sys-apps/man-db-2.7.2::gentoo'
Comment 3 Justin Keogh 2015-11-16 20:20:25 UTC
Created attachment 417138 [details]
emerge -pqv '=sys-apps/man-db-2.7.2::gentoo'
Comment 4 Justin Keogh 2015-11-16 20:21:03 UTC
Created attachment 417140 [details]
/var/tmp/portage/sys-apps/man-db-2.7.2/temp/environment
Comment 5 Justin Keogh 2015-11-16 20:21:55 UTC
Created attachment 417142 [details]
/var/tmp/portage/sys-apps/man-db-2.7.2/work/man-db-2.7.2/man/replace.sed
Comment 6 Felix Janda 2015-11-16 21:35:14 UTC
Combined with MAKEOPTS=-j24 it is maybe even less standard.
Does it compile with MAKEOPTS=-j1?
Comment 7 Felix Janda 2015-11-16 21:51:19 UTC
Try also >=sys-apps/man-db-2.7.4, which includes

http://git.savannah.gnu.org/cgit/man-db.git/commit/?id=32ee575a45d3a7e221a7b29c457049b659315152
Comment 8 Justin Keogh 2015-11-17 03:23:29 UTC
Exited chroot, then:
chroot /mnt/gentoo /bin/bash
source /etc/profile
env-update

changed MAKEOPTS to -j1

emerge man-db
(worked)

changed MAKEOPTS back to to -j24
emerge man-db
(worked)
tried that 10 more times, all compiled with -j24.

Also tried -j48 (it's a 24 core box), compiled 10x without error.

The install is automated, so I started it from scratch and man-db again compiled fine. Bummer. OK to close since I cant reproduce it.
Comment 9 Justin Keogh 2015-11-20 17:49:47 UTC
I managed to hit this again (MAKEOPTS="-j24"), saved the build folder and then deleted /var/tmp/portage/sys-apps, did "emerge man-db" again and it worked.

10x more emerge man-db tries all completed.

So, outside the chroot: "echo 2 > /proc/sys/vm/drop_caches"

and then "emerge man-db" again (inside chroot): still compiles.
Comment 10 Felix Janda 2016-10-07 00:05:06 UTC
Can you still reproduce with the current stable version (man-db-2.7.5)?
(I very much suspect that it is fixed (see comment 7).)

The bug might be easier to hit with MAKEOPTS="-j" (use as many threads
as possible).
Comment 11 Justin Keogh 2017-05-11 13:13:53 UTC
I am not able to reproduce this, suggest close. Thanks!
Comment 12 tt_1 2018-03-09 23:05:26 UTC
ebuild is not in tree anymore, those in tree work. bug can and should be closed.