* [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y
@ 2019-09-05 13:40 Gwenhael Goavec-Merou
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Gwenhael Goavec-Merou
2019-09-07 13:04 ` [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2019-09-05 13:40 UTC (permalink / raw)
To: buildroot
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
gmp has a optional and disable by default, option to add C++ support.
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
package/gmp/gmp.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
index 7236e37bb4..3e375a12e7 100644
--- a/package/gmp/gmp.mk
+++ b/package/gmp/gmp.mk
@@ -19,5 +19,9 @@ ifeq ($(BR2_m68k_cf)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6)$(BR2_ARM_CP
GMP_CONF_OPTS += --disable-assembly
endif
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+GMP_CONF_OPTS += --enable-cxx
+endif
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0
2019-09-05 13:40 [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y Gwenhael Goavec-Merou
@ 2019-09-05 13:40 ` Gwenhael Goavec-Merou
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: move to python3 Gwenhael Goavec-Merou
2019-09-07 20:20 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Arnout Vandecappelle
2019-09-07 13:04 ` [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y Thomas Petazzoni
1 sibling, 2 replies; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2019-09-05 13:40 UTC (permalink / raw)
To: buildroot
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- add a patch to have boost unit_test_framework optional instead of mandatory
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as
dependencies
- suppress BR2_PACKAGE_GNURADIO_LOG no more available since log4cpp is mandatory
- add -mfpu=neon if the compiler support this to avoid volk test failure
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- add a patch to have boost unit_test_framework optional instead of mandatory
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
- suppress the no more available BR2_PACKAGE_GNURADIO_LOG, since log4cpp is mandatory
- add -mfpu=neon if the compiler support this to avoid volk test failure
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
..._impl.cc-fix-build-with-boost-1.70.0.patch | 42 -------------------
...nitest-detection-when-ENABLE_TESTING.patch | 38 +++++++++++++++++
package/gnuradio/Config.in | 9 ++--
package/gnuradio/gnuradio.hash | 2 +-
package/gnuradio/gnuradio.mk | 15 +++----
5 files changed, 47 insertions(+), 59 deletions(-)
delete mode 100644 package/gnuradio/0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
create mode 100644 package/gnuradio/0001-suppress-boost_unitest-detection-when-ENABLE_TESTING.patch
diff --git a/package/gnuradio/0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch b/package/gnuradio/0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
deleted file mode 100644
index 2047cdd036..0000000000
--- a/package/gnuradio/0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6b450f36c14dd16d476f10f3e4eb1c5c26a78daa Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Thu, 18 Apr 2019 09:40:15 +0200
-Subject: [PATCH] socket_pdu_impl.cc: fix build with boost 1.70.0
-
-Fix #2446
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/gnuradio/gnuradio/pull/2451]
----
- gr-blocks/lib/socket_pdu_impl.cc | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc
-index e20f1478f..d9dd1edd6 100644
---- a/gr-blocks/lib/socket_pdu_impl.cc
-+++ b/gr-blocks/lib/socket_pdu_impl.cc
-@@ -29,6 +29,12 @@
- #include <gnuradio/io_signature.h>
- #include <gnuradio/blocks/pdu.h>
-
-+#if BOOST_VERSION >= 107000
-+#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s)->get_executor().context())
-+#else
-+#define GET_IO_SERVICE(s) ((s)->get_io_service())
-+#endif
-+
- namespace gr {
- namespace blocks {
-
-@@ -165,7 +171,7 @@ namespace gr {
- void
- socket_pdu_impl::start_tcp_accept()
- {
-- tcp_connection::sptr new_connection = tcp_connection::make(d_acceptor_tcp->get_io_service(), d_rxbuf.size(), d_tcp_no_delay);
-+ tcp_connection::sptr new_connection = tcp_connection::make(GET_IO_SERVICE(d_acceptor_tcp), d_rxbuf.size(), d_tcp_no_delay);
-
- d_acceptor_tcp->async_accept(new_connection->socket(),
- boost::bind(&socket_pdu_impl::handle_tcp_accept, this,
---
-2.20.1
-
diff --git a/package/gnuradio/0001-suppress-boost_unitest-detection-when-ENABLE_TESTING.patch b/package/gnuradio/0001-suppress-boost_unitest-detection-when-ENABLE_TESTING.patch
new file mode 100644
index 0000000000..c4beda1ebb
--- /dev/null
+++ b/package/gnuradio/0001-suppress-boost_unitest-detection-when-ENABLE_TESTING.patch
@@ -0,0 +1,38 @@
+From 1dc15300b9a38cf2217768375e67922f7268cad9 Mon Sep 17 00:00:00 2001
+From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
+Date: Wed, 4 Sep 2019 11:34:51 +0200
+Subject: [PATCH] suppress boost_unitest detection when ENABLE_TESTING is not
+ set
+
+boost unit_test_framework is only used when ENABLE_TESTING is set. So instead of
+adding this module as default, append to the list of required module only when
+it is mandatory.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
+---
+ cmake/Modules/GrBoost.cmake | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake
+index cd4b120f7..5c227db7e 100644
+--- a/cmake/Modules/GrBoost.cmake
++++ b/cmake/Modules/GrBoost.cmake
+@@ -33,9 +33,14 @@ set(BOOST_REQUIRED_COMPONENTS
+ system
+ regex
+ thread
+- unit_test_framework
+ )
+
++if(ENABLE_TESTING)
++ list(APPEND BOOST_REQUIRED_COMPONENTS
++ unit_test_framework
++ )
++endif(ENABLE_TESTING)
++
+ if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+ list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
+ endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+--
+2.21.0
+
diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
index 80f6a1c535..f07bd3d976 100644
--- a/package/gnuradio/Config.in
+++ b/package/gnuradio/Config.in
@@ -13,12 +13,15 @@ config BR2_PACKAGE_GNURADIO
depends on BR2_USE_WCHAR # boost
depends on !BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_BOOST
+ select BR2_PACKAGE_BOOST_ATOMIC
select BR2_PACKAGE_BOOST_DATE_TIME
select BR2_PACKAGE_BOOST_FILESYSTEM
select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
select BR2_PACKAGE_BOOST_REGEX
select BR2_PACKAGE_BOOST_SYSTEM
select BR2_PACKAGE_BOOST_THREAD
+ select BR2_PACKAGE_LOG4CPP
+ select BR2_PACKAGE_GMP
help
GNU Radio is a free & open-source software development
toolkit that provides signal processing blocks to implement
@@ -56,12 +59,6 @@ config BR2_PACKAGE_GNURADIO_FEC
help
FEC signal processing blocks
-config BR2_PACKAGE_GNURADIO_LOG
- bool "gr-log support"
- select BR2_PACKAGE_LOG4CPP
- help
- Enable logger component
-
config BR2_PACKAGE_GNURADIO_PYTHON
bool "python support"
depends on BR2_PACKAGE_PYTHON
diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash
index 884f7ae758..8f9b9774fe 100644
--- a/package/gnuradio/gnuradio.hash
+++ b/package/gnuradio/gnuradio.hash
@@ -1,5 +1,5 @@
# From http://gnuradio.org/releases/gnuradio/sha256sums
-sha256 1e07ce40fa3c3eede1fb54e320dad8a221a3c01de341e9cef2d7b265ed06a6e9 gnuradio-3.7.13.3.tar.gz
+sha256 3a9c90111f22f2f6f30450731dc671ad28ce824fc1a7bc8ea0783da9b95a7092 gnuradio-3.8.0.0.tar.gz
# Hash for license file:
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
index ef9723cb01..162d0c0311 100644
--- a/package/gnuradio/gnuradio.mk
+++ b/package/gnuradio/gnuradio.mk
@@ -4,7 +4,7 @@
#
################################################################################
-GNURADIO_VERSION = 3.7.13.3
+GNURADIO_VERSION = 3.8.0.0
GNURADIO_SITE = http://gnuradio.org/releases/gnuradio
GNURADIO_LICENSE = GPL-3.0+
GNURADIO_LICENSE_FILES = COPYING
@@ -16,7 +16,9 @@ GNURADIO_DEPENDENCIES = \
host-python-mako \
host-python-six \
host-swig \
- boost
+ boost \
+ log4cpp \
+ gmp
ifeq ($(BR2_PACKAGE_ORC),y)
GNURADIO_DEPENDENCIES += orc
@@ -43,7 +45,7 @@ endif
# CFLAGS to decide whether to build the NEON functions or not, and
# wants to see the string 'armv7' in the CFLAGS.
ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy)
-GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a"
+GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a -mfpu=neon"
endif
# As soon as -mfpu=neon is supported by the compiler, gnuradio will try
@@ -115,13 +117,6 @@ else
GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF
endif
-ifeq ($(BR2_PACKAGE_GNURADIO_LOG),y)
-GNURADIO_DEPENDENCIES += log4cpp
-GNURADIO_CONF_OPTS += -DENABLE_GR_LOG=ON
-else
-GNURADIO_CONF_OPTS += -DENABLE_GR_LOG=OFF
-endif
-
ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y)
GNURADIO_DEPENDENCIES += python
GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package:gnuradio: move to python3
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Gwenhael Goavec-Merou
@ 2019-09-05 13:40 ` Gwenhael Goavec-Merou
2019-09-07 20:46 ` Arnout Vandecappelle
2019-09-07 20:20 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Arnout Vandecappelle
1 sibling, 1 reply; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2019-09-05 13:40 UTC (permalink / raw)
To: buildroot
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
gnuradio 3.8.0.0 support both python2 and python3 but python2 is EOL, so move
explicitly to python3.
- depends on python3 to avoid issues with mako at the build time
- add full path to python3 interpreter
- by default gnuradio install python libraries in dist-packages. To force
installation in site-packages add GR_PYTHON_DIR in CONF_OPTS
- when python support is enabled python-six is mandatory at runtime
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
package/gnuradio/Config.in | 7 ++++---
package/gnuradio/gnuradio.mk | 4 +++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
index f07bd3d976..85728fa870 100644
--- a/package/gnuradio/Config.in
+++ b/package/gnuradio/Config.in
@@ -1,6 +1,6 @@
comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
depends on BR2_USE_MMU
- depends on !BR2_PACKAGE_PYTHON3
+ depends on !BR2_PACKAGE_PYTHON
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
@@ -11,7 +11,7 @@ config BR2_PACKAGE_GNURADIO
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_USE_MMU # use fork()
depends on BR2_USE_WCHAR # boost
- depends on !BR2_PACKAGE_PYTHON3
+ depends on !BR2_PACKAGE_PYTHON
select BR2_PACKAGE_BOOST
select BR2_PACKAGE_BOOST_ATOMIC
select BR2_PACKAGE_BOOST_DATE_TIME
@@ -61,11 +61,12 @@ config BR2_PACKAGE_GNURADIO_FEC
config BR2_PACKAGE_GNURADIO_PYTHON
bool "python support"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON3
depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
select BR2_PACKAGE_BOOST_PYTHON
select BR2_PACKAGE_PYTHON_NUMPY # runtime
+ select BR2_PACKAGE_PYTHON_SIX # runtime
help
Enable python component
diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
index 162d0c0311..9bdc7dd5fb 100644
--- a/package/gnuradio/gnuradio.mk
+++ b/package/gnuradio/gnuradio.mk
@@ -25,6 +25,7 @@ GNURADIO_DEPENDENCIES += orc
endif
GNURADIO_CONF_OPTS = \
+ -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR)m \
-DENABLE_DEFAULT=OFF \
-DENABLE_VOLK=ON \
-DENABLE_GNURADIO_RUNTIME=ON \
@@ -118,8 +119,9 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF
endif
ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y)
-GNURADIO_DEPENDENCIES += python
+GNURADIO_DEPENDENCIES += python3 python-six
GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
+GNURADIO_CONF_OPTS += -DGR_PYTHON_DIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
else
GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF
endif
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y
2019-09-05 13:40 [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y Gwenhael Goavec-Merou
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Gwenhael Goavec-Merou
@ 2019-09-07 13:04 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2019-09-07 13:04 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 5 Sep 2019 15:40:40 +0200
Gwenhael Goavec-Merou <gwenj@trabucayre.com> wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> gmp has a optional and disable by default, option to add C++ support.
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
The correct prefix in the commit title is "package/gmp:", not
"package:gmp:".
> +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
> +GMP_CONF_OPTS += --enable-cxx
> +endif
We like to have an explicit --disable-cxx in an else clause.
I fixed both issues and applied. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Gwenhael Goavec-Merou
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: move to python3 Gwenhael Goavec-Merou
@ 2019-09-07 20:20 ` Arnout Vandecappelle
1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-09-07 20:20 UTC (permalink / raw)
To: buildroot
On 05/09/2019 15:40, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> Since 2019/08/09 a new version of gnuradio is available.
> This patch bump to this version with some modifications:
> - suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
> - add a patch to have boost unit_test_framework optional instead of mandatory
Has this been sent upstream?
> - add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as
> dependencies
> - suppress BR2_PACKAGE_GNURADIO_LOG no more available since log4cpp is mandatory
You should say explicitly in the commit message that Config.in.legacy handling
is not needed because GR_LOG is now always enabled.
> - add -mfpu=neon if the compiler support this to avoid volk test failure
>
> Since 2019/08/09 a new version of gnuradio is available.
> This patch bump to this version with some modifications:
> - suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
> - add a patch to have boost unit_test_framework optional instead of mandatory
> - add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
> - suppress the no more available BR2_PACKAGE_GNURADIO_LOG, since log4cpp is mandatory
> - add -mfpu=neon if the compiler support this to avoid volk test failure
Copy-paste error? :-)
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
[snip]
> # CFLAGS to decide whether to build the NEON functions or not, and
> # wants to see the string 'armv7' in the CFLAGS.
> ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy)
> -GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a"
> +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a -mfpu=neon"
This change seems to conflict with the comment above. The comment says that the
CMakeLists look for the march=armv7-a to decide whether to enable NEON or not.
That kind of seems counter to passing -mfpu=neon in CFLAGS explicitly.
So at least, the comment above should be updated. And probably the
-march=armv7-a is no longer needed. Or maybe it still is.
Regards,
Arnout
> endif
>
> # As soon as -mfpu=neon is supported by the compiler, gnuradio will try
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package:gnuradio: move to python3
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: move to python3 Gwenhael Goavec-Merou
@ 2019-09-07 20:46 ` Arnout Vandecappelle
0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-09-07 20:46 UTC (permalink / raw)
To: buildroot
On 05/09/2019 15:40, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> gnuradio 3.8.0.0 support both python2 and python3 but python2 is EOL, so move
> explicitly to python3.
python2 is not quite EOL yet :-)
So I think removing python2 support is a bit premature. That said, if it's
simpler to not support python2, by all means go ahead. But then it should be
explained in the commit message that it's too difficult to support both, and why.
> - depends on python3 to avoid issues with mako at the build time
What issue is that? There are three possibilities:
BR2_PACKAGE_PYTHON is selected -> host-python-mako will be built for python2
BR2_PACKAGE_PYTHON3 is selected -> host-python-mako will be biult for python3
Neither is selected -> host-python-mako will be built for python2
So I think you only need to have a dependency like:
$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
cfr. libsigrok.
> - add full path to python3 interpreter
> - by default gnuradio install python libraries in dist-packages. To force
> installation in site-packages add GR_PYTHON_DIR in CONF_OPTS
> - when python support is enabled python-six is mandatory at runtime
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
> package/gnuradio/Config.in | 7 ++++---
> package/gnuradio/gnuradio.mk | 4 +++-
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> index f07bd3d976..85728fa870 100644
> --- a/package/gnuradio/Config.in
> +++ b/package/gnuradio/Config.in
> @@ -1,6 +1,6 @@
> comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
> depends on BR2_USE_MMU
> - depends on !BR2_PACKAGE_PYTHON3
> + depends on !BR2_PACKAGE_PYTHON
> depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
> !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
>
> @@ -11,7 +11,7 @@ config BR2_PACKAGE_GNURADIO
> depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> depends on BR2_USE_MMU # use fork()
> depends on BR2_USE_WCHAR # boost
> - depends on !BR2_PACKAGE_PYTHON3
> + depends on !BR2_PACKAGE_PYTHON
> select BR2_PACKAGE_BOOST
> select BR2_PACKAGE_BOOST_ATOMIC
> select BR2_PACKAGE_BOOST_DATE_TIME
> @@ -61,11 +61,12 @@ config BR2_PACKAGE_GNURADIO_FEC
>
> config BR2_PACKAGE_GNURADIO_PYTHON
> bool "python support"
> - depends on BR2_PACKAGE_PYTHON
> + depends on BR2_PACKAGE_PYTHON3
> depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
> depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
> select BR2_PACKAGE_BOOST_PYTHON
> select BR2_PACKAGE_PYTHON_NUMPY # runtime
> + select BR2_PACKAGE_PYTHON_SIX # runtime
> help
> Enable python component
>
> diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
> index 162d0c0311..9bdc7dd5fb 100644
> --- a/package/gnuradio/gnuradio.mk
> +++ b/package/gnuradio/gnuradio.mk
> @@ -25,6 +25,7 @@ GNURADIO_DEPENDENCIES += orc
> endif
>
> GNURADIO_CONF_OPTS = \
> + -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR)m \
Why does $(HOST_DIR)/bin/python not work? If python3 is enabled on the target,
then $(HOST_DIR)/bin/python will be a symlink to python3.
> -DENABLE_DEFAULT=OFF \
> -DENABLE_VOLK=ON \
> -DENABLE_GNURADIO_RUNTIME=ON \
> @@ -118,8 +119,9 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF
> endif
>
> ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y)
> -GNURADIO_DEPENDENCIES += python
> +GNURADIO_DEPENDENCIES += python3 python-six
If python-six is runtime, it shouldn't be added here.
Regards,
Arnout
> GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
> +GNURADIO_CONF_OPTS += -DGR_PYTHON_DIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
> else
> GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF
> endif
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-07 20:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-05 13:40 [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y Gwenhael Goavec-Merou
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Gwenhael Goavec-Merou
2019-09-05 13:40 ` [Buildroot] [PATCH] package:gnuradio: move to python3 Gwenhael Goavec-Merou
2019-09-07 20:46 ` Arnout Vandecappelle
2019-09-07 20:20 ` [Buildroot] [PATCH] package:gnuradio: bump to 3.8.0.0 Arnout Vandecappelle
2019-09-07 13:04 ` [Buildroot] [PATCH] package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox