Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation
@ 2022-08-04  7:15 Guillaume W. Bres
  2022-08-04  7:15 ` [Buildroot] [RFC v2 2/2] package/python-scipy: bump version to 1.9.0 Guillaume W. Bres
  2022-08-04  8:02 ` [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Guillaume W. Bres @ 2022-08-04  7:15 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Guillaume W. Bres

---
 package/pkg-meson.mk                   | 2 ++
 support/misc/cross-compilation.conf.in | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 156b005fdd..32d41170f3 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -76,10 +76,12 @@ define PKG_MESON_CROSSCONFIG_SED
         -e "s%@TARGET_CC@%$(TARGET_CC)%g" \
         -e "s%@TARGET_CXX@%$(TARGET_CXX)%g" \
         -e "s%@TARGET_AR@%$(TARGET_AR)%g" \
+        -e "s%@TARGET_FC@%$(TARGET_FC)%g" \
         -e "s%@TARGET_STRIP@%$(TARGET_STRIP)%g" \
         -e "s%@TARGET_ARCH@%$(PKG_MESON_TARGET_CPU_FAMILY)%g" \
         -e "s%@TARGET_CPU@%$(GCC_TARGET_CPU)%g" \
         -e "s%@TARGET_ENDIAN@%$(call qstrip,$(call LOWERCASE,$(BR2_ENDIAN)))%g" \
+        -e "s%@TARGET_FCFLAGS@%$(call make-sq-comma-list,$($(strip $(2))))%g" \
         -e "s%@TARGET_CFLAGS@%$(call make-sq-comma-list,$($(strip $(1))))%g" \
         -e "s%@TARGET_LDFLAGS@%$(call make-sq-comma-list,$($(strip $(3))))%g" \
         -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$($(strip $(2))))%g" \
diff --git a/support/misc/cross-compilation.conf.in b/support/misc/cross-compilation.conf.in
index 235e5a8495..7053df472b 100644
--- a/support/misc/cross-compilation.conf.in
+++ b/support/misc/cross-compilation.conf.in
@@ -9,6 +9,7 @@ cpp = '@TARGET_CXX@'
 ar = '@TARGET_AR@'
 strip = '@TARGET_STRIP@'
 cmake = '@BR2_CMAKE@'
+fortran = '@TARGET_FC@'
 pkgconfig = '@PKGCONF_HOST_BINARY@'
 g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler'
 g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
@@ -18,6 +19,8 @@ c_args = [@TARGET_CFLAGS@]
 c_link_args = [@TARGET_LDFLAGS@]
 cpp_args = [@TARGET_CXXFLAGS@]
 cpp_link_args = [@TARGET_LDFLAGS@]
+fortran_args = [@TARGET_FCFLAGS@]
+fortran_link_args = [@TARGET_LDFLAGS@]
 wrap_mode = 'nodownload'
 cmake_prefix_path = '@STAGING_DIR@/usr/lib/cmake'
 
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [RFC v2 2/2] package/python-scipy: bump version to 1.9.0
  2022-08-04  7:15 [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation Guillaume W. Bres
@ 2022-08-04  7:15 ` Guillaume W. Bres
  2022-08-04  8:02 ` [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Guillaume W. Bres @ 2022-08-04  7:15 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Guillaume W. Bres

python-scipy is moving to a meson build infrastructure.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
---
thank you guys for the valuable help already, this is significant progress
and we're almost there.

Here's a V2 for those willing to test, I dediced to make it available
although i'm just starting investigating. It terminates in a -lnpymath
cross/host mix up "file format not recognized", that I've had with previous
scipy versions (distutils). I think I solved it with some LDFLAGS, but I need to
search my notes.

v1 -> v2
- patch pkg/meson to become knowledgeable of "fortran" compiler
- keep using tarball like before (but .tar.xz was not released this time)
- correct blas = lapack definition
- investigating new error
---
 package/python-scipy/python-scipy.hash |  2 +-
 package/python-scipy/python-scipy.mk   | 34 +++++++++-----------------
 2 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/package/python-scipy/python-scipy.hash b/package/python-scipy/python-scipy.hash
index 0274679c43..6637faf5b4 100644
--- a/package/python-scipy/python-scipy.hash
+++ b/package/python-scipy/python-scipy.hash
@@ -1,5 +1,5 @@
 # Locally generated
-sha256  0140dd24d14ce194fdb3df496c2190f0896ca84ac98bf5d69c3b3fb7bde1a1e9  scipy-1.8.1.tar.xz
+sha256  c0dfd7d2429452e7e94904c6a3af63cbaa3cf51b348bd9d35b42db7e9ad42791  scipy-1.9.0.tar.gz
 sha256  96599f8ec69a2cc609265eed13fc75090aacb28742260e55ce623788a33da19c  LICENSE.txt
 sha256  37e64a498894ac7c3b070023e3689e954a8ecf8a23b90968d09a455f1b4f7b35  scipy/linalg/src/lapack_deprecations/LICENSE
 sha256  606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609  scipy/ndimage/LICENSE.txt
diff --git a/package/python-scipy/python-scipy.mk b/package/python-scipy/python-scipy.mk
index b5006a2e15..6faa147ba2 100644
--- a/package/python-scipy/python-scipy.mk
+++ b/package/python-scipy/python-scipy.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-PYTHON_SCIPY_VERSION = 1.8.1
-PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.xz
+PYTHON_SCIPY_VERSION = 1.9.0
+PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz
 PYTHON_SCIPY_SITE = https://github.com/scipy/scipy/releases/download/v$(PYTHON_SCIPY_VERSION)
 PYTHON_SCIPY_LICENSE = \
 	BSD-3-Clause, \
@@ -23,6 +23,7 @@ PYTHON_SCIPY_LICENSE_FILES = \
 	scipy/sparse/linalg/_eigen/arpack/ARPACK/COPYING \
 	scipy/spatial/qhull_src/COPYING.txt
 PYTHON_SCIPY_DEPENDENCIES += \
+	host-pkgconf \
 	host-python-numpy \
 	host-python-pythran \
 	zlib \
@@ -31,26 +32,15 @@ PYTHON_SCIPY_DEPENDENCIES += \
 	python-pybind
 PYTHON_SCIPY_INSTALL_STAGING = YES
 
-PYTHON_SCIPY_SETUP_TYPE = setuptools
-PYTHON_SCIPY_BUILD_OPTS = config_fc --fcompiler=gnu95
+#PYTHON_SCIPY_LDFLAGS = $(TARGET_LDFLAGS) -shared \
+#	-L$(PYTHON3_PATH)/site-packages/numpy/core/lib
 
-PYTHON_SCIPY_LDFLAGS = $(TARGET_LDFLAGS) -shared \
-	-L$(PYTHON3_PATH)/site-packages/numpy/core/lib
-# -lnpyrandom localization
-PYTHON_SCIPY_LDFLAGS += \
-	-L$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/random/lib
+#PYTHON_SCIPY_CONF_ENV += \
+#   PYTHONPATH=$(PYTHON3_PATH) \
+#   LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
 
-PYTHON_SCIPY_ENV = \
-	F90=$(TARGET_FC) \
-	LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
+PYTHON_SCIPY_CONF_OPTS = \
+	-Dblas=lapack \
+	-Dlapack=lapack
 
-# Provide system configuration options to numpy distutils extensions, telling
-# to find all include files and libraries in staging directory.
-define PYTHON_SCIPY_CONFIGURE_CMDS
-	-rm -f $(@D)/site.cfg
-	echo "[DEFAULT]" >> $(@D)/site.cfg
-	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
-	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
-endef
-
-$(eval $(python-package))
+$(eval $(meson-package))
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation
  2022-08-04  7:15 [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation Guillaume W. Bres
  2022-08-04  7:15 ` [Buildroot] [RFC v2 2/2] package/python-scipy: bump version to 1.9.0 Guillaume W. Bres
@ 2022-08-04  8:02 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-04  8:02 UTC (permalink / raw)
  To: Guillaume W. Bres; +Cc: buildroot

Hello,

On Thu,  4 Aug 2022 09:15:03 +0200
"Guillaume W. Bres" <guillaume.bressaix@gmail.com> wrote:

> ---
>  package/pkg-meson.mk                   | 2 ++
>  support/misc/cross-compilation.conf.in | 3 +++
>  2 files changed, 5 insertions(+)

This needs a non-empty commit log + your Signed-off-by line.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-04  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04  7:15 [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation Guillaume W. Bres
2022-08-04  7:15 ` [Buildroot] [RFC v2 2/2] package/python-scipy: bump version to 1.9.0 Guillaume W. Bres
2022-08-04  8:02 ` [Buildroot] [RFC v2 1/2] package/pkg-meson: scipy needs fortran cross compilation Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox