From patchwork Mon Jul 15 12:22:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre PAYEN X-Patchwork-Id: 1131958 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=smile.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=smile-fr.20150623.gappssmtp.com header.i=@smile-fr.20150623.gappssmtp.com header.b="NiQfWHrq"; 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 45nN2r50X9z9sND for ; Mon, 15 Jul 2019 22:22:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6E441204C4; Mon, 15 Jul 2019 12:22:42 +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 UEbDZzLWBgrb; Mon, 15 Jul 2019 12:22:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id AD5A6204F1; Mon, 15 Jul 2019 12:22:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B03A31BF3DF for ; Mon, 15 Jul 2019 12:22:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id ACCEF85478 for ; Mon, 15 Jul 2019 12:22:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ay1NrGl-V88r for ; Mon, 15 Jul 2019 12:22:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 85713841C9 for ; Mon, 15 Jul 2019 12:22:36 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id s3so14950428wms.2 for ; Mon, 15 Jul 2019 05:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3XOU9zovOr5fRmcQtUw/Mb7Pqy+843rqveD2c8iMDPU=; b=NiQfWHrqWD2tHzsZEUUeNL7pmgYo7UpjQRohw528kcZ7Bv6g698dc0MwNyr8bNA/2Y B5h8egvoMVe1EUu1gzB6WTtfQN/rIkiFb0plqtFcwCg3IXsaenmJs3JmZ3A+0ezqr0C8 BfjTh5IiypjvMbola37y1Sn+8uahdT5y+XTXqdynkYMlq5dN56qvOTjQcSkSZoQltPrG SSKkUBC8un9JD/FoRz4RDekJJr+HYtJgry+5wLjRy1z2fjqtFsT9Kz+5zSBAnNUGJn/E cDPZ18Kwps91hRiNF7pLcWXrAz5fDA1Lq4DWr64Z3YfSBeKu1AKY+R2ijW6md20gg56H /81w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3XOU9zovOr5fRmcQtUw/Mb7Pqy+843rqveD2c8iMDPU=; b=g85utNFwPoTvtP2WtpU3kqxTKDf0b+yjIz9o+b/3phmDxDADHTB4ZKma2Lkoxfka7v rVkeMphxeTOcOkb7T4A6PobPR2VjfONtGXZjwSR9wIFubIb665/zASZeUiamPV0Yd37R mLK8KeFwm8cbyYhn9OGxJt6zisGfOXFOdfPokWj+oRWfW5xd12NqB7cvzXjeKB6eb4O4 29RkVP25380j5dEEwQtc1PaPdLo/wpg2xxgACOn+ZtZVncAKj5RpVKD3tEuE7tK7LBHi 59wrMXhLwAB8wAGBDaafV9v6MwUIUvTAn9bg77wYHmhgDboxsbca5YRBOHVzMS6j8W6V 6RYA== X-Gm-Message-State: APjAAAWq9jZUbBm+fn65jVihy4bE0eVTw23WpeAcoeSbIwJwjxkEto+2 p+LyZ7Bu+KHLbNVslwXBVOyfrG5SKdA= X-Google-Smtp-Source: APXvYqxH59lYs8ewJd1Yy/d8bXyXDif0mTwOoic/kYsfQjdCOYiRlMt+UXJecwzrGjxY8vpYokf/Dg== X-Received: by 2002:a1c:5602:: with SMTP id k2mr23028349wmb.173.1563193354963; Mon, 15 Jul 2019 05:22:34 -0700 (PDT) Received: from P-NAN-GEORGETOWN.nantes.intranet (static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145]) by smtp.gmail.com with ESMTPSA id 2sm19551233wrn.29.2019.07.15.05.22.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 15 Jul 2019 05:22:34 -0700 (PDT) From: Aalx To: buildroot@buildroot.org Date: Mon, 15 Jul 2019 14:22:31 +0200 Message-Id: <20190715122231.17095-1-alexandre.payen@smile.fr> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCHv5 2/3] package/liblapack: add liblapack as virtual package with lapack and clapack as providers. 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: , Cc: Alexandre PAYEN , romain.naour@smile.fr Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Alexandre PAYEN lapack and clapack are both generating the same liblapack.so but does not have the same symbols. So the run-time is broke. They have to exclude each other. A liblapack virtual package havev been created. It include lapack and clapack as providers. The armadillo packet require clapack to build, but lapack with complex support works as well. So : - add package/liblapack directory and do the virtual configuration - add BR2_LAPACK_COMPLEX in armadillo configuration when BR2_LAPACK = y Signed-off-by: Alexandre PAYEN --- package/Config.in | 3 +- package/armadillo/Config.in | 3 +- package/armadillo/armadillo.mk | 4 ++ package/clapack/clapack.mk | 1 + package/lapack/lapack.mk | 1 + package/liblapack/Config.in | 96 ++++++++++++++++++++++++++++++++++ package/liblapack/liblapack.mk | 7 +++ 7 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 package/liblapack/Config.in create mode 100644 package/liblapack/liblapack.mk diff --git a/package/Config.in b/package/Config.in index 90dddfd346..7f789fc883 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1663,7 +1663,6 @@ menu "Other" source "package/boost/Config.in" source "package/capnproto/Config.in" source "package/clang/Config.in" - source "package/clapack/Config.in" source "package/classpath/Config.in" source "package/cmocka/Config.in" source "package/cppcms/Config.in" @@ -1686,7 +1685,6 @@ menu "Other" source "package/gsl/Config.in" source "package/gtest/Config.in" source "package/jemalloc/Config.in" - source "package/lapack/Config.in" source "package/libargtable2/Config.in" source "package/libatomic_ops/Config.in" source "package/libb64/Config.in" @@ -1767,6 +1765,7 @@ endif source "package/tinycbor/Config.in" source "package/tz/Config.in" source "package/tzdata/Config.in" + source "package/liblapack/Config.in" source "package/xapian/Config.in" endmenu diff --git a/package/armadillo/Config.in b/package/armadillo/Config.in index b2b61a3233..62c15fbdbe 100644 --- a/package/armadillo/Config.in +++ b/package/armadillo/Config.in @@ -12,7 +12,8 @@ config BR2_PACKAGE_ARMADILLO depends on BR2_INSTALL_LIBSTDCPP depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC # clapack depends on !BR2_m68k_cf # clapack - select BR2_PACKAGE_CLAPACK + select BR2_PACKAGE_LIBLAPACK + select BR2_PACKAGE_LAPACK_COMPLEX if BR2_PACKAGE_LAPACK help Armadillo: An Open Source C++ Linear Algebra Library for Fast Prototyping and Computationally Intensive Experiments. diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk index b5fe403a7a..484fa47443 100644 --- a/package/armadillo/armadillo.mk +++ b/package/armadillo/armadillo.mk @@ -7,7 +7,11 @@ ARMADILLO_VERSION = 7.900.1 ARMADILLO_SOURCE = armadillo-$(ARMADILLO_VERSION).tar.xz ARMADILLO_SITE = https://downloads.sourceforge.net/project/arma +ifeq ($(BR2_PACKAGE_CLAPACK), y) ARMADILLO_DEPENDENCIES = clapack +else ifeq ($(BR2_PACKAGE_LAPACK), y) +ARMADILLO_DEPENDENCIES = lapack +endif ARMADILLO_INSTALL_STAGING = YES ARMADILLO_LICENSE = MPL-2.0 ARMADILLO_LICENSE_FILES = LICENSE.txt diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk index 9a083f3223..90b1e84aa4 100644 --- a/package/clapack/clapack.mk +++ b/package/clapack/clapack.mk @@ -4,6 +4,7 @@ # ################################################################################ +CLAPACK = clapack CLAPACK_VERSION = 3.2.1 CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz # This package provides 3 libraries: diff --git a/package/lapack/lapack.mk b/package/lapack/lapack.mk index 3b59214e4b..c96c50d71a 100644 --- a/package/lapack/lapack.mk +++ b/package/lapack/lapack.mk @@ -4,6 +4,7 @@ # ################################################################################ +LAPACK = lapack LAPACK_VERSION = 3.8.0 LAPACK_LICENSE = BSD-3-Clause LAPACK_LICENSE_FILES = LICENSE diff --git a/package/liblapack/Config.in b/package/liblapack/Config.in new file mode 100644 index 0000000000..bf09084484 --- /dev/null +++ b/package/liblapack/Config.in @@ -0,0 +1,96 @@ +config BR2_PACKAGE_LIBLAPACK + bool "lapack support" + select BR2_PACKAGE_HAS_LIBLAPACK + help + Select lapack library provider. + +if BR2_PACKAGE_LIBLAPACK + +choice + prompt "lapack implementation" + default BR2_PACKAGE_LAPACK if BR2_TOOLCHAIN_HAS_FORTRAN + default BR2_PACKAGE_CLAPACK if !BR2_TOOLCHAIN_HAS_FORTRAN + help + Select lapack or clapack implementation. + +comment "clapack needs a glibc toolchain" + depends on BR2_powerpc + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_CLAPACK + bool "clapack - C implementation" + # _fpu_control is used on PowerPC, but not available with + # uClibc or musl + depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC + # assembler: Error: value out of range + depends on !BR2_m68k_cf + select BR2_PACKAGE_HAS_LIBLAPACK + help + LAPACK and BLAS C implementation (f2c'ed version of).' + + http://www.netlib.org/clapack/ + +comment "lapack/blas needs a toolchain w/ fortran" + depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC) + depends on !BR2_TOOLCHAIN_HAS_FORTRAN + +config BR2_PACKAGE_LAPACK + bool "lapack - FORTRAN implementation" + depends on BR2_TOOLCHAIN_HAS_FORTRAN + # _fpu_control is used on PowerPC, but not available with uClibc + depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC) + select BR2_PACKAGE_HAS_LIBLAPACK + help + LAPACK and BLAS FORTRAN implementation. This package + installs two libraries: libblas and liblapack. + + http://www.netlib.org/lapack/ + +endchoice + +if BR2_PACKAGE_CLAPACK + +config BR2_PACKAGE_CLAPACK_ARITH_H + string "Custom BLAS arith.h" + depends on BR2_PACKAGE_CLAPACK + help + To optimize BLAS library for the hardware, an 'arith.h' header + should be provided. + + If empty, the library will not be optimized by the compiler. + + In any case an 'arithchk' program is built + (but not installed), to be run on the target to generate this + arith.h header. + +endif + +if BR2_PACKAGE_LAPACK + +config BR2_PACKAGE_LAPACK_COMPLEX + bool "Complex/Complex16 support" + default y + depends on BR2_PACKAGE_LAPACK + help + Builds support for COMPLEX and COMPLEX16 data types. + +endif + +config BR2_PACKAGE_HAS_LIBLAPACK + bool + +config BR2_PACKAGE_PROVIDES_LIBLAPACK + string + depends on BR2_PACKAGE_HAS_LIBLAPACK + +if BR2_PACKAGE_LAPACK +config BR2_PACKAGE_PROVIDES_LIBLAPACK + default "lapack" +endif + +if BR2_PACKAGE_CLAPACK +config BR2_PACKAGE_PROVIDES_LIBLAPACK + default "clapack" +endif + +endif diff --git a/package/liblapack/liblapack.mk b/package/liblapack/liblapack.mk new file mode 100644 index 0000000000..06cece60f9 --- /dev/null +++ b/package/liblapack/liblapack.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# liblapack +# +################################################################################ + +$(eval $(virtual-package))