Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622190 - net-fs/samba-4.5.10 builds single threaded
Summary: net-fs/samba-4.5.10 builds single threaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-19 04:11 UTC by Matt Turner
Modified: 2017-06-23 21:58 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2017-06-19 04:11:48 UTC
make -j8 -l8 
WAF_MAKE=1 /usr/bin/python2.7 ./buildtools/bin/waf build
Waf: Entering directory `/var/tmp/portage/net-fs/samba-4.5.10/work/samba-4.5.10-abi_x86_32.x86/bin'
        Selected system MIT krb5 libraries, Heimdal use is disabled
[...]

but then only a single source file is compiled at a time.

waf-utils.eclass contains

waf-utils_src_compile() {
    debug-print-function ${FUNCNAME} "$@"
    local _mywafconfig
    [[ "${WAF_VERBOSE}" ]] && _mywafconfig="--verbose"

    local jobs="--jobs=$(makeopts_jobs)"
    echo "\"${WAF_BINARY}\" build ${_mywafconfig} ${jobs}"
    "${WAF_BINARY}" ${_mywafconfig} ${jobs} || die "build failed"
}

which looks like somehow ${jobs} is ending up empty?
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2017-06-19 19:55:12 UTC
I think it's because waf-utils's src_compile does not get called at all.
multilib-minimal.ebuild calls 'multilib_src_compile()' / 'default_src_compile()'
which 'emake' for 'default_src_compile()'

(samba has a Makefile that calls 'waf build')

I suspect the fix is as simple as defining 'multilib_src_compile':

--- a/net-fs/samba/samba-4.5.10.ebuild
+++ b/net-fs/samba/samba-4.5.10.ebuild
@@ -213,2 +213,6 @@ multilib_src_configure() {

+multilib_src_compile() {
+       waf-utils_src_compile
+}
+
 multilib_src_install() {

With that I get:
 * abi_x86_64.amd64: running multilib-minimal_abi_src_compile
"/dev/shm/portage/net-fs/samba-4.5.10/work/samba-4.5.10/buildtools/bin/waf" build --verbose --jobs=8

Thanks for filing a bug. It always bothered that samba now builds much slower but I never looked at why.
Comment 2 Matt Turner gentoo-dev 2017-06-23 21:58:41 UTC
Thank you. Committed as

commit 602a5ac8c27d4cbe020fc872e25c8166ba1ff284 
Author: Matt Turner <mattst88@gentoo.org>
Date:   Fri Jun 23 14:51:19 2017 -0700

    net-fs/samba: Use waf-utils_src_compile in order to get parallel builds