From patchwork Tue Aug 13 21:43:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 1146679 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded.rocks Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b="MC/fGNAr"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 467R7Q5yhKz9sML for ; Wed, 14 Aug 2019 07:44:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3CCAE20424; Tue, 13 Aug 2019 21:44:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RONYIqXMjI1Q; Tue, 13 Aug 2019 21:44:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2174C20402; Tue, 13 Aug 2019 21:44:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5B6701BF317 for ; Tue, 13 Aug 2019 21:44:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 507C181E21 for ; Tue, 13 Aug 2019 21:44:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LJelJ4WOm6yw for ; Tue, 13 Aug 2019 21:44:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0480081C6B for ; Tue, 13 Aug 2019 21:44:09 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 12ED82400E6 for ; Tue, 13 Aug 2019 23:44:05 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 467R78404Nz9rxL for ; Tue, 13 Aug 2019 23:44:03 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1565732633; x=1566337434; bh=ajaWIxHDO5f2MVLYm34ykajP9kaZKAZ0fNw9dJuoM4Q=; b=MC/fGNArVDIa Mxsl7u9/vzsqe//AC2OIvk3JS3eb3zQRzgBMyIgFfYlq+M7gsK4qFU1PBQPdKr8+ eJGv4xnYau2Svc8hmu8shDqWflnSfqZ9aqATYUZ1EFKUTVkxuvXxqYrFp0aZB5sg SHVlFB7SUFCXmPTUFjbdUvjjWKd0auySALTqJoP9X+MtxpJl5L++wko/l/ebLqoz 8jlMWSILhbMmZMQefCGXarqeIQkZjuolrFC7jUfhcp0gOUdiTOBzl6ckDKomEmC/ grng/OPCYoyo2po3zjzedZkBYqODeBaAtg77/EfjOOHY5i497g2o+8HWhfi7eOnl 1/5odD0C3w== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Nx_EMHIkJI8T; Tue, 13 Aug 2019 23:43:53 +0200 (CEST) Received: from nzxt.fritz.box (port-92-195-41-201.dynamic.qsc.de [92.195.41.201]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 13 Aug 2019 23:43:53 +0200 (CEST) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Tue, 13 Aug 2019 23:43:48 +0200 Message-Id: <20190813214348.10675-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/samba4: set WAF_NO_PREFORK to fix cross-compilation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since version 4.10.0 the waf build system does not correctly take the values from the cross answers file when configuring for the target machine, resulting in wrong values, e.g.: ``` Checking for rpath library support : not found ``` Looking into sambas config.log shows that the check for rpath library support aborts because of in internal exception. The result is that the shared library libsmbclient.so does not have a correct rpath section in its ELF header: ``` Library rpath: [/usr/lib] ``` This is incorrect, as libsmbclient links to secondary libraries located in /usr/lib/samba. When linking mpd (with libsmbclient feature enabled) against libsmbclient, the linker does not find the secondary libraries for libsmbclient and fails with: ``` /usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/host/opt/ext-toolchain/bin/../lib/gcc/powerpc64le-buildroot-linux-gnu/7.4.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: warning: libcli-ldap-common-samba4.so, needed by /usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/host/usr/bin/../powerpc64le-buildroot-linux-gnu/sysroot/usr/lib/libsmbclient.so, not found (try using -rpath or -rpath-link) [skip] /usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/host/opt/ext-toolchain/bin/../lib/gcc/powerpc64le-buildroot-linux-gnu/7.4.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: /usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/host/usr/bin/../powerpc64le-buildroot-linux-gnu/sysroot/usr/lib/libsamdb.so.0: undefined reference to `sec_privilege_id' [skip] ``` The bug has been reported upstream [1]. Setting `WAF_NO_PREFORK=1` fixes the internal exception by disabling the usage of pre-forked processes which somehow fails in cross-compiling environment. Now, the configuration takes the correct values from the cross answers file: ``` Checking for rpath library support : yes ``` And leads to a correct rpath entry in the ELF header: ``` Library rpath: [/usr/lib/samba:/usr/lib] ``` And fixes the build of with libsmbclient feature enabled. Fixes: http://autobuild.buildroot.net/results/1678a6c5e5c9ee44b7a90d059d95c5d385d75132/ http://autobuild.buildroot.net/results/ba11b09c0d99b005c71ddd4db7fa4caa5e68af9c/ [1] https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Jörg Krause --- package/samba4/samba4.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk index a6b353ad2d..072bb2c7c0 100644 --- a/package/samba4/samba4.mk +++ b/package/samba4/samba4.mk @@ -22,7 +22,8 @@ SAMBA4_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) SAMBA4_CONF_ENV = \ CFLAGS="$(SAMBA4_CFLAGS)" \ LDFLAGS="$(SAMBA4_LDFLAGS)" \ - XSLTPROC=false + XSLTPROC=false \ + WAF_NO_PREFORK=1 ifeq ($(BR2_PACKAGE_PYTHON3),y) SAMBA4_PYTHON = \