From patchwork Sat Nov 16 09:04:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 16123 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 30360176F6; Sat, 16 Nov 2019 09:06:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D7353175D7 for ; Sat, 16 Nov 2019 09:06:47 +0000 (GMT) Received: from localhost ([::1]:46980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVu2Z-0001Hh-1T for patchwork@mira.cbaines.net; Sat, 16 Nov 2019 04:06:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59016) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVu22-0001HF-Et for guix-patches@gnu.org; Sat, 16 Nov 2019 04:06:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVu1r-0007Ce-Ng for guix-patches@gnu.org; Sat, 16 Nov 2019 04:06:14 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iVu1q-0007CC-Ts for guix-patches@gnu.org; Sat, 16 Nov 2019 04:06:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iVu1q-00011X-NZ for guix-patches@gnu.org; Sat, 16 Nov 2019 04:06:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38228] Fwd: [PATCH] gnu: boost: Build with python3 Resent-From: goodoldpaul@autistici.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Nov 2019 09:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38228 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38228@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15738951253882 (code B ref -1); Sat, 16 Nov 2019 09:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Nov 2019 09:05:25 +0000 Received: from localhost ([127.0.0.1]:37733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVu1E-00010X-TX for submit@debbugs.gnu.org; Sat, 16 Nov 2019 04:05:24 -0500 Received: from lists.gnu.org ([209.51.188.17]:41667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVu1C-00010N-Ki for submit@debbugs.gnu.org; Sat, 16 Nov 2019 04:05:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58965) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVu10-00017V-9h for guix-patches@gnu.org; Sat, 16 Nov 2019 04:05:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVu0p-0006l6-AM for guix-patches@gnu.org; Sat, 16 Nov 2019 04:05:09 -0500 Received: from confino.investici.org ([212.103.72.250]:41043) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVu0m-0006fY-6S for guix-patches@gnu.org; Sat, 16 Nov 2019 04:04:59 -0500 Received: from contumacia-webmail.investici.org (contumacia.vpn0.investici.org [10.0.0.11]) by confino.investici.org (Postfix) with ESMTP id BE22E2109F for ; Sat, 16 Nov 2019 09:04:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1573895084; bh=JQlFeZgQXxLcvQJWJcHN58i0wyc07kMWDxBhkBAnHTM=; h=Date:From:To:Subject:In-Reply-To:References:From; b=eJKeZtl8qtvhwiCxNoM5w7+dEsZQ81QM4uPDdeuxAe/c0ZjfsN2sXG/SVrPisJear +njW5qBgjgNtkpgrKAVvWOtdp4/v2mHEh12X+2LDsBLtgkfINKTLiY3LqmzzDkdhRq dOGZzE/FQ2kKb8U8zAWgyvpKe24HlI1n2oUv+Ysk= Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: goodoldpaul@autistici.org) by contumacia-webmail.investici.org (Postfix) with ESMTPA id 83089BEE32 for ; Sat, 16 Nov 2019 09:04:44 +0000 (UTC) MIME-Version: 1.0 Date: Sat, 16 Nov 2019 09:04:44 +0000 From: goodoldpaul@autistici.org In-Reply-To: <0755dc96f75da487259457a88d8e23ff@autistici.org> References: <2894916c81c703293e028556070cd964@autistici.org> <87d0dzl7tx.fsf@devup.no> <20191111093637.GH3954@E5400> <0755dc96f75da487259457a88d8e23ff@autistici.org> User-Agent: Roundcube Webmail Message-ID: X-Sender: goodoldpaul@autistici.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello I'm opening another thread ( old one was http://issues.guix.gnu.org/issue/38128 ) to build boost in core-updates with python3. The new patch also parameterizes python versions across the package definition. WDYT? Bye, Giacomo -------- Original Message -------- Subject: Re: bug#38128: [PATCH] gnu: Add boost-with-python3 Date: 2019-11-12 00:06 From: goodoldpaul@autistici.org To: Efraim Flashner Cc: 38128@debbugs.gnu.org, mbakke@fastmail.com On 2019-11-11 09:36, Efraim Flashner wrote: > I'm going to re-open this one, sorry. > > Can we replace the '--with-python-version=3.7' and > 'libboost_python37.so' > with parameterized python variables so we don't have to bump it when we > get a new python version? > > Also, I've attached a package that I've never actually built that uses > boost built with python3 if you want something to test it out with :) I'm not sure how to send a patch for core-updates, I never did it so I attached it here. Please tell me if I should open another patch. The patch builds boost with python3 and parameterizes the python version, as Efraim suggested. I built it successfully on core updates. When I tried building Epour on core-updates and saw that Guix was starting to build Bash 5.0 I renounced (:D) and I built it on master with boost-with-python3 . Libtorrent-rasterbar seems to build fine on master but some tests fail to pass and they all seem to be network related but then again this is torrent we are talking about. I didn't investigate further but I attach the log. I also tried boost-with-python3 with Malmo ( https://github.com/microsoft/malmo ) and it seemed to compile fine just but that package has other problems such as trying to start gradle so I nerver managed to actually run it. Let me know what you think about the patch, Bye Giacomo From 91a25fb143ad0e2e20e8ddadea0c0610849adf92 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Tue, 12 Nov 2019 00:24:49 +0100 Subject: [PATCH] gnu: boost: Build with python3. * gnu/packages/boost.scm (boost): [arguments]: Parameterize python version. [native-inputs]: Use python3. --- gnu/packages/boost.scm | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index a2253a9efc..389fd1fdb6 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -62,10 +62,13 @@ ("zlib" ,zlib))) (native-inputs `(("perl" ,perl) - ("python" ,python-2) + ("python" ,python) ("tcsh" ,tcsh))) (arguments - `(#:tests? #f + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:tests? #f #:make-flags (list "threading=multi" "link=shared" @@ -83,6 +86,9 @@ (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) (let ((icu (assoc-ref inputs "icu4c")) + (python (assoc-ref inputs "python")) + (python-version + (take (string-split ,(package-version python) #\.) 2)) (out (assoc-ref outputs "out"))) (substitute* '("libs/config/configure" "libs/spirit/classic/phoenix/test/runtest.sh" @@ -94,11 +100,19 @@ (setenv "SHELL" (which "sh")) (setenv "CONFIG_SHELL" (which "sh")) + (substitute* "tools/build/src/tools/python.jam" + (("include/python\\$\\(version\\)") + "include/python$(version)m")) + (invoke "./bootstrap.sh" (string-append "--prefix=" out) - ;; Auto-detection looks for ICU only in traditional - ;; install locations. + ;; Auto-detection looks for dependencies only + ;; in traditional install locations. (string-append "--with-icu=" icu) + (string-append "--with-python=" python "/bin/python3") + (string-append "--with-python-root=" python) + (string-append "--with-python-version=" + (string-join python-version ".")) "--with-toolset=gcc")))) (replace 'build (lambda* (#:key make-flags #:allow-other-keys) @@ -109,15 +123,18 @@ (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "./b2" "install" make-flags))) (add-after 'install 'provide-libboost_python - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; Boost can build support for both Python 2 and Python 3 since - ;; version 1.67.0, and suffixes each library with the Python - ;; version. Many consumers only check for libboost_python - ;; however, so we provide it here as suggested in - ;; . + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref inputs "python")) + (python-version + (take (string-split ,(package-version python) #\.) 2)) + (libboost.so (string-append "libboost_python" + (string-join python-version "") + ".so"))) (with-directory-excursion (string-append out "/lib") - (symlink "libboost_python27.so" "libboost_python.so")) + (symlink libboost.so "libboost_python.so") + ;; Some packages also look for libboost_python3.so + (symlink libboost.so "libboost_python3.so")) #t)))))) (home-page "https://www.boost.org") -- 2.24.0