From patchwork Fri Sep 16 13:30:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederik Aalund X-Patchwork-Id: 670884 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sbGPp4BkFz9sD6 for ; Fri, 16 Sep 2016 23:30:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sbtaqua-com.20150623.gappssmtp.com header.i=@sbtaqua-com.20150623.gappssmtp.com header.b=PnRbvVwk; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EAAC18C8DF; Fri, 16 Sep 2016 13:30:52 +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 xUCLfSIsXzqX; Fri, 16 Sep 2016 13:30:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 18B7C8C900; Fri, 16 Sep 2016 13:30:51 +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 A913B1CF5F0 for ; Fri, 16 Sep 2016 13:30:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A3D408C8EF for ; Fri, 16 Sep 2016 13:30:49 +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 DemrD9UXBevD for ; Fri, 16 Sep 2016 13:30:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id BCB528BC94 for ; Fri, 16 Sep 2016 13:30:48 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id h127so66287567lfh.0 for ; Fri, 16 Sep 2016 06:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbtaqua-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=vICv5VHrrdUa/GcVxZKrkgYp+Pe8LZS8mx16bLnlrwU=; b=PnRbvVwkQA3L4dAWVf8rZ001k5HV1q1Y/Cg+eOU/KxBk5y6hym9lr7SeMR/Thr/VLt spp94Mzy+qgx75pGEUqBEaY3aPsF50Nh2sbgPuY1c9A1KtW0HkcdaFTPPkJx85M0CfBg yBJza0Qcti/NkmRo5g2AlNgRX8hDg62i+a1fCRolFtMgziGcFOAtI96rmESvwOORaNUQ wtmFNeKrfh3EZopgEd9fiO9e72EW6alRce5rpHJEo0r11OdJpNuz+h00MC8I6V0CJMJh 9tRXusdLbCXdn5NKjLk+YtYvcbU1/wS1Xb0m8hS40UT7BQAx68BqED13rDVRbMaKysiF IjOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vICv5VHrrdUa/GcVxZKrkgYp+Pe8LZS8mx16bLnlrwU=; b=l367rRGWSWraCrfECp5xHUP1RsvztDBs72xgU7n58ihnL839e5rJ1rmyk6GhuV7CoO XZDg9zGXvBJuddXlP0f2WRFgVv6T8CZcSeKs/EVkbS1lM7Y0X7iYvW4DCPTb6TTL4/Y9 x/oBqUZQQLe+O6cgtlPsNHcLCTxKV2oAEJJPUPo8i88ipozU5XmLzIfPHwyVUf0YK2/D Wf4cew5KqehMycAsvfKqQg+vF8sZwlkcZwe4IU7T8kP+TDWzJgOyyC5uK3su0BWZL6Qz /07m1YLQBq0CXSwase76R39brROorqTUn20i/+STBb/6CdVXbyHGeUSKQ+UWPe01L0f6 spgg== X-Gm-Message-State: AE9vXwNNTH5CxLd//dV4MKRSd4z1fiVs7gB9qEvq8Dgu497VREscB0STA8wsYz/zOaMQIw== X-Received: by 10.25.33.206 with SMTP id h197mr6476517lfh.82.1474032646687; Fri, 16 Sep 2016 06:30:46 -0700 (PDT) Received: from localhost.localdomain ([77.72.50.193]) by smtp.gmail.com with ESMTPSA id o80sm2294214lfg.29.2016.09.16.06.30.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Sep 2016 06:30:46 -0700 (PDT) From: Frederik Aalund To: buildroot@buildroot.org Date: Fri, 16 Sep 2016 15:30:31 +0200 Message-Id: <1474032631-21311-1-git-send-email-fpa@sbtaqua.com> X-Mailer: git-send-email 2.5.0 Cc: Frederik Aalund Subject: [Buildroot] [PATCH 3/3] python3: Compile host-python3 statically X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The previous behaviour was to compile host-python3 with `--enable-shared` as is done for the target python installation. The problem is that if the host *already* has a python installation, then host-python3 will be called with the system `libpython3.5.so`. So even though the $(HOST_DIR) python executable is called, the system .so is used. On my system, I have python 3.5.1. I was trying to python 3.5.2 for buildroot. I noticed druing the build that the host-python thought it was 3.5.1 (as on the system). This was caused by the above. In combination with the `PYTHON3_PYC_ONLY`, this caused all the *.pyc files to be compiled for 3.5.1 even though it should have been 3.5.2. I've changed the `python3.mk` file so that host-python3 is built statically. This way, such errors will not occur. Alternatively, one could make sure to always call host-python3 with an `LD_LIBRARY_PATH` which points to the `$(HOST_DIR)`. However, this requires a much more invasive change than simply compiling python statically. Signed-off-by: Frederik Aalund --- package/python3/python3.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 1b63f95..093f570 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -25,6 +25,7 @@ PYTHON3_LIBTOOL_PATCH = NO # third-party Python modules. HOST_PYTHON3_CONF_OPTS += \ + --disable-shared \ --without-ensurepip \ --without-cxx-main \ --disable-sqlite3 \