All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory
@ 2015-03-05 11:03 Gwenhael Goavec-Merou
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support Gwenhael Goavec-Merou
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-03-05 11:03 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

For some cmake based packages, like GNURadio, it's forbidden to do the
compilation directly in the sources directory. This patch add a new 
variable to specify, if needed, the name of a sub-directory used to compile.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Tested-by: Samuel Martin <s.martin49@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
---
Changes v2 -> v3:
 * Update docs to add detail about LIBFOO_BUILDDIR
Changes v1 -> v2:
 * Allow to overload $(2)_BUILDDIR instead of adding a new variable and test
---
 docs/manual/adding-packages-cmake.txt | 7 ++++++-
 package/pkg-cmake.mk                  | 8 +++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/docs/manual/adding-packages-cmake.txt b/docs/manual/adding-packages-cmake.txt
index d92b209..05738f0 100644
--- a/docs/manual/adding-packages-cmake.txt
+++ b/docs/manual/adding-packages-cmake.txt
@@ -79,7 +79,7 @@ First, all the package metadata information variables that exist in
 the generic infrastructure also exist in the CMake infrastructure:
 +LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+,
 +LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+,
-+LIBFOO_INSTALL_TARGET+.
++LIBFOO_INSTALL_TARGET+, +LIBFOO_BUILDDIR+.
 
 A few additional variables, specific to the CMake infrastructure, can
 also be defined. Many of them are only useful in very specific cases,
@@ -91,6 +91,11 @@ typical packages will therefore only use a few of them.
   the tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is not
   specified, it defaults to +LIBFOO_SUBDIR+.
 
+* +LIBFOO_BUILDDIR+ may overload the default build directory when a
+  package prevents from in-source-tree build. For example,
+  FOO_BUILDDIR = $(FOO_SRCDIR)/.build, will be used to compile foo
+  package in .build subdirectory.
+
 * +LIBFOO_CONF_ENV+, to specify additional environment variables to
   pass to CMake. By default, empty.
 
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 2404c40..c50039d 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -61,7 +61,7 @@ $(2)_INSTALL_STAGING_OPTS	?= DESTDIR=$$(STAGING_DIR) install
 $(2)_INSTALL_TARGET_OPTS		?= DESTDIR=$$(TARGET_DIR) install
 
 $(2)_SRCDIR			= $$($(2)_DIR)/$$($(2)_SUBDIR)
-$(2)_BUILDDIR			= $$($(2)_SRCDIR)
+$(2)_BUILDDIR			?= $$($(2)_SRCDIR)
 
 #
 # Configure step. Only define it if not already defined by the package
@@ -73,7 +73,8 @@ ifeq ($(4),target)
 
 # Configure package for target
 define $(2)_CONFIGURE_CMDS
-	(cd $$($$(PKG)_BUILDDIR) && \
+	(mkdir -p $$($$(PKG)_BUILDDIR) && \
+	cd $$($$(PKG)_BUILDDIR) && \
 	rm -f CMakeCache.txt && \
 	PATH=$$(BR_PATH) \
 	$$($$(PKG)_CONF_ENV) $$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
@@ -98,7 +99,8 @@ else
 
 # Configure package for host
 define $(2)_CONFIGURE_CMDS
-	(cd $$($$(PKG)_BUILDDIR) && \
+	(mkdir -p $$($$(PKG)_BUILDDIR) && \
+	cd $$($$(PKG)_BUILDDIR) && \
 	rm -f CMakeCache.txt && \
 	PATH=$$(BR_PATH) \
 	$$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-- 
2.0.5

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

* [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support
  2015-03-05 11:03 [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Gwenhael Goavec-Merou
@ 2015-03-05 11:03 ` Gwenhael Goavec-Merou
  2015-03-07 11:26   ` Samuel Martin
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 3/3] GNURadio: new package Gwenhael Goavec-Merou
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-03-05 11:03 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Some packages, like GNURadio for VOLK, needs cheetah on host at buildtime.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
Changes v3 -> v4:
 * use HOST_PYTHON_CHEETAH_DEPENDENCIES instead of PYTHON_CHEETAH_DEPENDENCIES
 * suppress '+' for dependency definition
---
 package/python-cheetah/python-cheetah.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/python-cheetah/python-cheetah.mk b/package/python-cheetah/python-cheetah.mk
index 08076b5..3155951 100644
--- a/package/python-cheetah/python-cheetah.mk
+++ b/package/python-cheetah/python-cheetah.mk
@@ -9,5 +9,7 @@ PYTHON_CHEETAH_SOURCE = Cheetah-$(PYTHON_CHEETAH_VERSION).tar.gz
 PYTHON_CHEETAH_SITE = http://pypi.python.org/packages/source/C/Cheetah
 PYTHON_CHEETAH_LICENSE = MIT
 PYTHON_CHEETAH_SETUP_TYPE = setuptools
+HOST_PYTHON_CHEETAH_DEPENDENCIES = host-python-markdown
 
 $(eval $(python-package))
+$(eval $(host-python-package))
-- 
2.0.5

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

* [Buildroot] [PATCH v4 3/3] GNURadio: new package
  2015-03-05 11:03 [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Gwenhael Goavec-Merou
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support Gwenhael Goavec-Merou
@ 2015-03-05 11:03 ` Gwenhael Goavec-Merou
  2015-03-07 12:46   ` Samuel Martin
  2015-03-09 21:03   ` Thomas Petazzoni
  2015-03-07 11:25 ` [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Samuel Martin
  2015-03-09 21:05 ` Thomas Petazzoni
  3 siblings, 2 replies; 13+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-03-05 11:03 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
Changes v2 -> v3:
* move comment at the beginning of the file.
* add a patch to suppress boost-test dependency.
* move python dependencies in the specific option.
* use stable archive instead of git.
* add hook specific for ARM for using neon if available (without this hook volk
  fails to build).
Changes v1 -> v2:
* overload _BUILDDIR variable to specify build directory
---
 package/Config.in                                  |  1 +
 package/gnuradio/Config.in                         | 42 +++++++++++++++++++++
 ...dio-0001-suppress-boost_unitest-detection.patch | 44 ++++++++++++++++++++++
 package/gnuradio/gnuradio.hash                     |  2 +
 package/gnuradio/gnuradio.mk                       | 39 +++++++++++++++++++
 5 files changed, 128 insertions(+)
 create mode 100644 package/gnuradio/Config.in
 create mode 100644 package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
 create mode 100644 package/gnuradio/gnuradio.hash
 create mode 100644 package/gnuradio/gnuradio.mk

diff --git a/package/Config.in b/package/Config.in
index ba45f32..2e167d5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1041,6 +1041,7 @@ menu "Miscellaneous"
 	source "package/clamav/Config.in"
 	source "package/collectd/Config.in"
 	source "package/empty/Config.in"
+	source "package/gnuradio/Config.in"
 	source "package/googlefontdirectory/Config.in"
 	source "package/haveged/Config.in"
 	source "package/mcrypt/Config.in"
diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
new file mode 100644
index 0000000..8e5c516
--- /dev/null
+++ b/package/gnuradio/Config.in
@@ -0,0 +1,42 @@
+comment "GNURadio needs a toolchain w/ C++, mmu, threads"
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_MMU \
+		&& BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS \
+		&& BR2_LARGEFILE && BR2_INET_IPV6)
+
+config BR2_PACKAGE_GNURADIO
+	bool "GNURadio"
+	depends on BR2_INET_IPV6
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_LARGEFILE
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	depends on BR2_USE_WCHAR
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_DATE_TIME
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_BOOST_THREAD
+
+	help
+	  GNU Radio is a free & open-source software development toolkit that
+	  provides signal processing blocks to implement software radios. It can be
+	  used with readily-available low-cost external RF hardware to create
+	  software-defined radios, or without hardware in a simulation-like
+	  environment. It is widely used in hobbyist, academic and commercial
+	  environments to support both wireless communications research and
+	  real-world radio systems.
+
+	  http://gnuradio.org/
+
+if BR2_PACKAGE_GNURADIO
+
+config BR2_PACKAGE_GNURADIO_BLOCKS
+	bool "gnuradio-blocks"
+
+config BR2_PACKAGE_GNURADIO_PYTHON
+	select BR2_PACKAGE_BOOST_PYTHON
+	select BR2_PACKAGE_PYTHON
+	bool "gnuradio-python"
+
+endif
diff --git a/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
new file mode 100644
index 0000000..7b35a59
--- /dev/null
+++ b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
@@ -0,0 +1,44 @@
+Index: gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
+===================================================================
+--- gnuradio-3.7.5.orig/volk/cmake/VolkBoost.cmake
++++ gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
+@@ -29,7 +29,6 @@ set(__INCLUDED_VOLK_BOOST_CMAKE TRUE)
+ set(BOOST_REQUIRED_COMPONENTS
+     filesystem
+     system
+-    unit_test_framework
+     program_options
+ )
+ 
+Index: gnuradio-3.7.5/volk/lib/CMakeLists.txt
+===================================================================
+--- gnuradio-3.7.5.orig/volk/lib/CMakeLists.txt
++++ gnuradio-3.7.5/volk/lib/CMakeLists.txt
+@@ -535,27 +535,3 @@ if(ENABLE_STATIC_LIBS)
+     ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_devel"   # .lib file
+     )
+ endif(ENABLE_STATIC_LIBS)
+-
+-########################################################################
+-# Build the QA test application
+-########################################################################
+-
+-
+-if(Boost_FOUND)
+-
+-    set_source_files_properties(
+-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES
+-        COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK;BOOST_TEST_MAIN"
+-    )
+-
+-    include_directories(${Boost_INCLUDE_DIRS})
+-    link_directories(${Boost_LIBRARY_DIRS})
+-
+-    add_executable(test_all
+-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
+-        ${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
+-    )
+-    target_link_libraries(test_all volk ${Boost_LIBRARIES})
+-    add_test(qa_volk_test_all test_all)
+-
+-endif(Boost_FOUND)
diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash
new file mode 100644
index 0000000..a25b466
--- /dev/null
+++ b/package/gnuradio/gnuradio.hash
@@ -0,0 +1,2 @@
+# From http://gnuradio.org/redmine/projects/gnuradio/files
+md5	b4a917a548f41ce25c6c88f9bc864bca	gnuradio-3.7.5.tar.gz
diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
new file mode 100644
index 0000000..4528e55
--- /dev/null
+++ b/package/gnuradio/gnuradio.mk
@@ -0,0 +1,39 @@
+################################################################################
+#
+# gnuradio
+#
+################################################################################
+
+GNURADIO_VERSION = 3.7.5
+GNURADIO_SITE = http://gnuradio.org/redmine/attachments/download/792
+GNURADIO_SOURCE = gnuradio-$(GNURADIO_VERSION).tar.gz
+GNURADIO_LICENSE = GPLv3+
+GNURADIO_LICENSE_FILES = COPYING
+
+# gnuradio prevent from in-source-tree build
+GNURADIO_BUILDDIR = $(GNURADIO_SRCDIR)/build
+
+#needed for volk compile
+GNURADIO_DEPENDENCIES += host-python-cheetah
+GNURADIO_DEPENDENCIES += host-swig host-boost boost
+
+GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_GNURADIO_PYTHON),python)
+
+GNURADIO_INSTALL_STAGING = YES
+
+GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF
+GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON
+ifeq ($(BR2_arm),y)
+ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy)
+GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU))
+GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)"
+GNURADIO_CONF_OPTS += -DCMAKE_ASM_FLAGS="-mfpu=neon -mfloat-abi=hard -march=armv7-a"
+else
+GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0
+endif
+endif
+
+GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=$(if $(BR2_PACKAGE_GNURADIO_BLOCKS),ON,OFF)
+GNURADIO_CONF_OPTS += -DENABLE_PYTHON=$(if $(BR2_PACKAGE_GNURADIO_PYTHON),ON,OFF)
+
+$(eval $(cmake-package))
-- 
2.0.5

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

* [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory
  2015-03-05 11:03 [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Gwenhael Goavec-Merou
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support Gwenhael Goavec-Merou
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 3/3] GNURadio: new package Gwenhael Goavec-Merou
@ 2015-03-07 11:25 ` Samuel Martin
  2015-03-09 21:05 ` Thomas Petazzoni
  3 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2015-03-07 11:25 UTC (permalink / raw)
  To: buildroot

Hi Gwenhael,

On Thu, Mar 5, 2015 at 12:03 PM, Gwenhael Goavec-Merou
<gwenj@trabucayre.com> wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> For some cmake based packages, like GNURadio, it's forbidden to do the
> compilation directly in the sources directory. This patch add a new
> variable to specify, if needed, the name of a sub-directory used to compile.
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> Tested-by: Samuel Martin <s.martin49@gmail.com>
> Acked-by: Samuel Martin <s.martin49@gmail.com>
> ---
> Changes v2 -> v3:
>  * Update docs to add detail about LIBFOO_BUILDDIR
> Changes v1 -> v2:
>  * Allow to overload $(2)_BUILDDIR instead of adding a new variable and test
> ---
>  docs/manual/adding-packages-cmake.txt | 7 ++++++-
>  package/pkg-cmake.mk                  | 8 +++++---
>  2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/docs/manual/adding-packages-cmake.txt b/docs/manual/adding-packages-cmake.txt
> index d92b209..05738f0 100644
> --- a/docs/manual/adding-packages-cmake.txt
> +++ b/docs/manual/adding-packages-cmake.txt
> @@ -79,7 +79,7 @@ First, all the package metadata information variables that exist in
>  the generic infrastructure also exist in the CMake infrastructure:
>  +LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+,
>  +LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+,
> -+LIBFOO_INSTALL_TARGET+.
> ++LIBFOO_INSTALL_TARGET+, +LIBFOO_BUILDDIR+.
>
>  A few additional variables, specific to the CMake infrastructure, can
>  also be defined. Many of them are only useful in very specific cases,
> @@ -91,6 +91,11 @@ typical packages will therefore only use a few of them.
>    the tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is not
>    specified, it defaults to +LIBFOO_SUBDIR+.
>
> +* +LIBFOO_BUILDDIR+ may overload the default build directory when a
> +  package prevents from in-source-tree build. For example,
> +  FOO_BUILDDIR = $(FOO_SRCDIR)/.build, will be used to compile foo
> +  package in .build subdirectory.
> +

Nitpicking a bit ;-)
I would add a few words about host package, whose HOST_FOO_BUILDDIR
also need to be set if the package does not support in-source-tree
build.

Otherwise it's good to me.

Regards,


-- 
Samuel

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

* [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support Gwenhael Goavec-Merou
@ 2015-03-07 11:26   ` Samuel Martin
  0 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2015-03-07 11:26 UTC (permalink / raw)
  To: buildroot

On Thu, Mar 5, 2015 at 12:03 PM, Gwenhael Goavec-Merou
<gwenj@trabucayre.com> wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> Some packages, like GNURadio for VOLK, needs cheetah on host at buildtime.
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Reviewed-by: Samuel Martin <s.martin49@gmail.com>

> ---
> Changes v3 -> v4:
>  * use HOST_PYTHON_CHEETAH_DEPENDENCIES instead of PYTHON_CHEETAH_DEPENDENCIES
>  * suppress '+' for dependency definition
> ---
>  package/python-cheetah/python-cheetah.mk | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/package/python-cheetah/python-cheetah.mk b/package/python-cheetah/python-cheetah.mk
> index 08076b5..3155951 100644
> --- a/package/python-cheetah/python-cheetah.mk
> +++ b/package/python-cheetah/python-cheetah.mk
> @@ -9,5 +9,7 @@ PYTHON_CHEETAH_SOURCE = Cheetah-$(PYTHON_CHEETAH_VERSION).tar.gz
>  PYTHON_CHEETAH_SITE = http://pypi.python.org/packages/source/C/Cheetah
>  PYTHON_CHEETAH_LICENSE = MIT
>  PYTHON_CHEETAH_SETUP_TYPE = setuptools
> +HOST_PYTHON_CHEETAH_DEPENDENCIES = host-python-markdown
>
>  $(eval $(python-package))
> +$(eval $(host-python-package))
> --
> 2.0.5
>

Regards,

-- 
Samuel

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

* [Buildroot] [PATCH v4 3/3] GNURadio: new package
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 3/3] GNURadio: new package Gwenhael Goavec-Merou
@ 2015-03-07 12:46   ` Samuel Martin
  2015-03-09 10:22     ` gwenhael.goavec
  2015-03-09 21:03   ` Thomas Petazzoni
  1 sibling, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2015-03-07 12:46 UTC (permalink / raw)
  To: buildroot

Hi Gwenhael,

On Thu, Mar 5, 2015 at 12:03 PM, Gwenhael Goavec-Merou
<gwenj@trabucayre.com> wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
> Changes v2 -> v3:
> * move comment at the beginning of the file.
> * add a patch to suppress boost-test dependency.
> * move python dependencies in the specific option.
> * use stable archive instead of git.
> * add hook specific for ARM for using neon if available (without this hook volk
>   fails to build).
> Changes v1 -> v2:
> * overload _BUILDDIR variable to specify build directory
> ---
>  package/Config.in                                  |  1 +
>  package/gnuradio/Config.in                         | 42 +++++++++++++++++++++
>  ...dio-0001-suppress-boost_unitest-detection.patch | 44 ++++++++++++++++++++++
>  package/gnuradio/gnuradio.hash                     |  2 +
>  package/gnuradio/gnuradio.mk                       | 39 +++++++++++++++++++
>  5 files changed, 128 insertions(+)
>  create mode 100644 package/gnuradio/Config.in
>  create mode 100644 package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
>  create mode 100644 package/gnuradio/gnuradio.hash
>  create mode 100644 package/gnuradio/gnuradio.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index ba45f32..2e167d5 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1041,6 +1041,7 @@ menu "Miscellaneous"
>         source "package/clamav/Config.in"
>         source "package/collectd/Config.in"
>         source "package/empty/Config.in"
> +       source "package/gnuradio/Config.in"
>         source "package/googlefontdirectory/Config.in"
>         source "package/haveged/Config.in"
>         source "package/mcrypt/Config.in"
> diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> new file mode 100644
> index 0000000..8e5c516
> --- /dev/null
> +++ b/package/gnuradio/Config.in
> @@ -0,0 +1,42 @@
> +comment "GNURadio needs a toolchain w/ C++, mmu, threads"
> +       depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_MMU \
> +               && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS \
> +               && BR2_LARGEFILE && BR2_INET_IPV6)
> +
> +config BR2_PACKAGE_GNURADIO
> +       bool "GNURadio"
> +       depends on BR2_INET_IPV6
> +       depends on BR2_INSTALL_LIBSTDCPP
> +       depends on BR2_LARGEFILE
> +       depends on BR2_TOOLCHAIN_HAS_THREADS
> +       depends on BR2_USE_MMU
> +       depends on BR2_USE_WCHAR
For all these 'depends on', we usually indicate why they are needed, e.g.:
depends on BR2_USE_MMU # use fork()
depends on BR2_INSTALL_LIBSTDCPP # boost

> +       select BR2_PACKAGE_BOOST
> +       select BR2_PACKAGE_BOOST_DATE_TIME
> +       select BR2_PACKAGE_BOOST_FILESYSTEM
> +       select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
> +       select BR2_PACKAGE_BOOST_SYSTEM
> +       select BR2_PACKAGE_BOOST_THREAD
> +
> +       help
> +         GNU Radio is a free & open-source software development toolkit that
> +         provides signal processing blocks to implement software radios. It can be
> +         used with readily-available low-cost external RF hardware to create
> +         software-defined radios, or without hardware in a simulation-like
> +         environment. It is widely used in hobbyist, academic and commercial
> +         environments to support both wireless communications research and
> +         real-world radio systems.
> +
> +         http://gnuradio.org/
> +
> +if BR2_PACKAGE_GNURADIO
> +
> +config BR2_PACKAGE_GNURADIO_BLOCKS
> +       bool "gnuradio-blocks"
> +
> +config BR2_PACKAGE_GNURADIO_PYTHON
> +       select BR2_PACKAGE_BOOST_PYTHON
> +       select BR2_PACKAGE_PYTHON
> +       bool "gnuradio-python"
> +
> +endif
> diff --git a/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
> new file mode 100644
> index 0000000..7b35a59
> --- /dev/null
> +++ b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
> @@ -0,0 +1,44 @@
> +Index: gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
> +===================================================================
> +--- gnuradio-3.7.5.orig/volk/cmake/VolkBoost.cmake
> ++++ gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
> +@@ -29,7 +29,6 @@ set(__INCLUDED_VOLK_BOOST_CMAKE TRUE)
> + set(BOOST_REQUIRED_COMPONENTS
> +     filesystem
> +     system
> +-    unit_test_framework
> +     program_options
> + )
> +
> +Index: gnuradio-3.7.5/volk/lib/CMakeLists.txt
> +===================================================================
> +--- gnuradio-3.7.5.orig/volk/lib/CMakeLists.txt
> ++++ gnuradio-3.7.5/volk/lib/CMakeLists.txt
> +@@ -535,27 +535,3 @@ if(ENABLE_STATIC_LIBS)
> +     ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_devel"   # .lib file
> +     )
> + endif(ENABLE_STATIC_LIBS)
> +-
> +-########################################################################
> +-# Build the QA test application
> +-########################################################################
> +-
> +-
> +-if(Boost_FOUND)
Or just (the CMake infra automatically disable some common sample/test
symbols, see [1]):
if(Boost_FOUND AND BUILD_TESTS)

> +-
> +-    set_source_files_properties(
> +-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES
> +-        COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK;BOOST_TEST_MAIN"
> +-    )
> +-
> +-    include_directories(${Boost_INCLUDE_DIRS})
> +-    link_directories(${Boost_LIBRARY_DIRS})
> +-
> +-    add_executable(test_all
> +-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
> +-        ${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
> +-    )
> +-    target_link_libraries(test_all volk ${Boost_LIBRARIES})
> +-    add_test(qa_volk_test_all test_all)
> +-
> +-endif(Boost_FOUND)
> diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash
> new file mode 100644
> index 0000000..a25b466
> --- /dev/null
> +++ b/package/gnuradio/gnuradio.hash
> @@ -0,0 +1,2 @@
> +# From http://gnuradio.org/redmine/projects/gnuradio/files
> +md5    b4a917a548f41ce25c6c88f9bc864bca        gnuradio-3.7.5.tar.gz
> diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
> new file mode 100644
> index 0000000..4528e55
> --- /dev/null
> +++ b/package/gnuradio/gnuradio.mk
> @@ -0,0 +1,39 @@
> +################################################################################
> +#
> +# gnuradio
> +#
> +################################################################################
> +
> +GNURADIO_VERSION = 3.7.5
> +GNURADIO_SITE = http://gnuradio.org/redmine/attachments/download/792
> +GNURADIO_SOURCE = gnuradio-$(GNURADIO_VERSION).tar.gz
> +GNURADIO_LICENSE = GPLv3+
> +GNURADIO_LICENSE_FILES = COPYING
> +
> +# gnuradio prevent from in-source-tree build
> +GNURADIO_BUILDDIR = $(GNURADIO_SRCDIR)/build
> +
> +#needed for volk compile
> +GNURADIO_DEPENDENCIES += host-python-cheetah
> +GNURADIO_DEPENDENCIES += host-swig host-boost boost
Why is host-boost needed?
AFAICS, host-swig and boost is enough.

> +
> +GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_GNURADIO_PYTHON),python)
Is it only python(2) compliant, or does it also support python3?
Hmm... after a quick test it seems cheetah is not python2 compliant :-/

> +
> +GNURADIO_INSTALL_STAGING = YES
> +
> +GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF
> +GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON
> +ifeq ($(BR2_arm),y)
> +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy)
> +GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU))
> +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)"
Hum... Dubious! Enforcing these target flags won't play very well with
the toolchain wrapper!
Also, how about aarch64 targets?

> +GNURADIO_CONF_OPTS += -DCMAKE_ASM_FLAGS="-mfpu=neon -mfloat-abi=hard -march=armv7-a"
ditto

> +else
> +GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0
Since you explicitly disable have_fpu_neon symbol here in the
else-block, please set it in the if-block as well.

> +endif
> +endif
> +
> +GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=$(if $(BR2_PACKAGE_GNURADIO_BLOCKS),ON,OFF)
> +GNURADIO_CONF_OPTS += -DENABLE_PYTHON=$(if $(BR2_PACKAGE_GNURADIO_PYTHON),ON,OFF)
> +
> +$(eval $(cmake-package))
> --
> 2.0.5
>

[1] http://nightly.buildroot.org/manual.html#cmake-package-reference

Regards,

-- 
Samuel

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

* [Buildroot] [PATCH v4 3/3] GNURadio: new package
  2015-03-07 12:46   ` Samuel Martin
@ 2015-03-09 10:22     ` gwenhael.goavec
  2015-03-09 10:30       ` Thomas Petazzoni
  0 siblings, 1 reply; 13+ messages in thread
From: gwenhael.goavec @ 2015-03-09 10:22 UTC (permalink / raw)
  To: buildroot

On Sat, 7 Mar 2015 13:46:46 +0100
Samuel Martin <s.martin49@gmail.com> wrote:

> Hi Gwenhael,
> 
> On Thu, Mar 5, 2015 at 12:03 PM, Gwenhael Goavec-Merou
> <gwenj@trabucayre.com> wrote:
> > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> >
> > Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> > ---
> > Changes v2 -> v3:
> > * move comment at the beginning of the file.
> > * add a patch to suppress boost-test dependency.
> > * move python dependencies in the specific option.
> > * use stable archive instead of git.
> > * add hook specific for ARM for using neon if available (without this hook volk
> >   fails to build).
> > Changes v1 -> v2:
> > * overload _BUILDDIR variable to specify build directory
> > ---
> >  package/Config.in                                  |  1 +
> >  package/gnuradio/Config.in                         | 42 +++++++++++++++++++++
> >  ...dio-0001-suppress-boost_unitest-detection.patch | 44 ++++++++++++++++++++++
> >  package/gnuradio/gnuradio.hash                     |  2 +
> >  package/gnuradio/gnuradio.mk                       | 39 +++++++++++++++++++
> >  5 files changed, 128 insertions(+)
> >  create mode 100644 package/gnuradio/Config.in
> >  create mode 100644 package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
> >  create mode 100644 package/gnuradio/gnuradio.hash
> >  create mode 100644 package/gnuradio/gnuradio.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index ba45f32..2e167d5 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -1041,6 +1041,7 @@ menu "Miscellaneous"
> >         source "package/clamav/Config.in"
> >         source "package/collectd/Config.in"
> >         source "package/empty/Config.in"
> > +       source "package/gnuradio/Config.in"
> >         source "package/googlefontdirectory/Config.in"
> >         source "package/haveged/Config.in"
> >         source "package/mcrypt/Config.in"
> > diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> > new file mode 100644
> > index 0000000..8e5c516
> > --- /dev/null
> > +++ b/package/gnuradio/Config.in
> > @@ -0,0 +1,42 @@
> > +comment "GNURadio needs a toolchain w/ C++, mmu, threads"
> > +       depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_MMU \
> > +               && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS \
> > +               && BR2_LARGEFILE && BR2_INET_IPV6)
> > +
> > +config BR2_PACKAGE_GNURADIO
> > +       bool "GNURadio"
> > +       depends on BR2_INET_IPV6
> > +       depends on BR2_INSTALL_LIBSTDCPP
> > +       depends on BR2_LARGEFILE
> > +       depends on BR2_TOOLCHAIN_HAS_THREADS
> > +       depends on BR2_USE_MMU
> > +       depends on BR2_USE_WCHAR
> For all these 'depends on', we usually indicate why they are needed, e.g.:
> depends on BR2_USE_MMU # use fork()
> depends on BR2_INSTALL_LIBSTDCPP # boost
> 
> > +       select BR2_PACKAGE_BOOST
> > +       select BR2_PACKAGE_BOOST_DATE_TIME
> > +       select BR2_PACKAGE_BOOST_FILESYSTEM
> > +       select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
> > +       select BR2_PACKAGE_BOOST_SYSTEM
> > +       select BR2_PACKAGE_BOOST_THREAD
> > +
> > +       help
> > +         GNU Radio is a free & open-source software development toolkit that
> > +         provides signal processing blocks to implement software radios. It can be
> > +         used with readily-available low-cost external RF hardware to create
> > +         software-defined radios, or without hardware in a simulation-like
> > +         environment. It is widely used in hobbyist, academic and commercial
> > +         environments to support both wireless communications research and
> > +         real-world radio systems.
> > +
> > +         http://gnuradio.org/
> > +
> > +if BR2_PACKAGE_GNURADIO
> > +
> > +config BR2_PACKAGE_GNURADIO_BLOCKS
> > +       bool "gnuradio-blocks"
> > +
> > +config BR2_PACKAGE_GNURADIO_PYTHON
> > +       select BR2_PACKAGE_BOOST_PYTHON
> > +       select BR2_PACKAGE_PYTHON
> > +       bool "gnuradio-python"
> > +
> > +endif
> > diff --git a/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
> > new file mode 100644
> > index 0000000..7b35a59
> > --- /dev/null
> > +++ b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
> > @@ -0,0 +1,44 @@
> > +Index: gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
> > +===================================================================
> > +--- gnuradio-3.7.5.orig/volk/cmake/VolkBoost.cmake
> > ++++ gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
> > +@@ -29,7 +29,6 @@ set(__INCLUDED_VOLK_BOOST_CMAKE TRUE)
> > + set(BOOST_REQUIRED_COMPONENTS
> > +     filesystem
> > +     system
> > +-    unit_test_framework
> > +     program_options
> > + )
> > +
> > +Index: gnuradio-3.7.5/volk/lib/CMakeLists.txt
> > +===================================================================
> > +--- gnuradio-3.7.5.orig/volk/lib/CMakeLists.txt
> > ++++ gnuradio-3.7.5/volk/lib/CMakeLists.txt
> > +@@ -535,27 +535,3 @@ if(ENABLE_STATIC_LIBS)
> > +     ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_devel"   # .lib file
> > +     )
> > + endif(ENABLE_STATIC_LIBS)
> > +-
> > +-########################################################################
> > +-# Build the QA test application
> > +-########################################################################
> > +-
> > +-
> > +-if(Boost_FOUND)
> Or just (the CMake infra automatically disable some common sample/test
> symbols, see [1]):
> if(Boost_FOUND AND BUILD_TESTS)
> 
> > +-
> > +-    set_source_files_properties(
> > +-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES
> > +-        COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK;BOOST_TEST_MAIN"
> > +-    )
> > +-
> > +-    include_directories(${Boost_INCLUDE_DIRS})
> > +-    link_directories(${Boost_LIBRARY_DIRS})
> > +-
> > +-    add_executable(test_all
> > +-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
> > +-        ${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
> > +-    )
> > +-    target_link_libraries(test_all volk ${Boost_LIBRARIES})
> > +-    add_test(qa_volk_test_all test_all)
> > +-
> > +-endif(Boost_FOUND)
> > diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash
> > new file mode 100644
> > index 0000000..a25b466
> > --- /dev/null
> > +++ b/package/gnuradio/gnuradio.hash
> > @@ -0,0 +1,2 @@
> > +# From http://gnuradio.org/redmine/projects/gnuradio/files
> > +md5    b4a917a548f41ce25c6c88f9bc864bca        gnuradio-3.7.5.tar.gz
> > diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
> > new file mode 100644
> > index 0000000..4528e55
> > --- /dev/null
> > +++ b/package/gnuradio/gnuradio.mk
> > @@ -0,0 +1,39 @@
> > +################################################################################
> > +#
> > +# gnuradio
> > +#
> > +################################################################################
> > +
> > +GNURADIO_VERSION = 3.7.5
> > +GNURADIO_SITE = http://gnuradio.org/redmine/attachments/download/792
> > +GNURADIO_SOURCE = gnuradio-$(GNURADIO_VERSION).tar.gz
> > +GNURADIO_LICENSE = GPLv3+
> > +GNURADIO_LICENSE_FILES = COPYING
> > +
> > +# gnuradio prevent from in-source-tree build
> > +GNURADIO_BUILDDIR = $(GNURADIO_SRCDIR)/build
> > +
> > +#needed for volk compile
> > +GNURADIO_DEPENDENCIES += host-python-cheetah
> > +GNURADIO_DEPENDENCIES += host-swig host-boost boost
> Why is host-boost needed?
> AFAICS, host-swig and boost is enough.
> 
> > +
> > +GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_GNURADIO_PYTHON),python)
> Is it only python(2) compliant, or does it also support python3?
> Hmm... after a quick test it seems cheetah is not python2 compliant :-/
> 
python3 no ?
> > +
> > +GNURADIO_INSTALL_STAGING = YES
> > +
> > +GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF
> > +GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON
> > +ifeq ($(BR2_arm),y)
> > +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy)
> > +GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU))
> > +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)"
> Hum... Dubious! Enforcing these target flags won't play very well with
> the toolchain wrapper!
> Also, how about aarch64 targets?
>
Volk seems buggy on arm with hf, consequently this Work around is mandatory to
avoid build failure... I'm agree it's not really good but it's the recommended
solution... 
I have compiled gnuradio for aarch64 without problems but I'm not
sure volk is working on this architecture and the work around is dedicated for
BR2_arm.
> 
> > +GNURADIO_CONF_OPTS += -DCMAKE_ASM_FLAGS="-mfpu=neon -mfloat-abi=hard -march=armv7-a"
> ditto
> 
> > +else
> > +GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0
> Since you explicitly disable have_fpu_neon symbol here in the
> else-block, please set it in the if-have_fpu_neonblock as well.
>
It's possible to use have_fpu_neon to disable neon but it's not possible to use
it to enable neon, all flags must be set manually...
>
> > +endif
> > +endif
> > +
> > +GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=$(if $(BR2_PACKAGE_GNURADIO_BLOCKS),ON,OFF)
> > +GNURADIO_CONF_OPTS += -DENABLE_PYTHON=$(if $(BR2_PACKAGE_GNURADIO_PYTHON),ON,OFF)
> > +
> > +$(eval $(cmake-package))
> > --
> > 2.0.5
> >
> 
> [1] http://nightly.buildroot.org/manual.html#cmake-package-reference
> 
> Regards,
> 
> -- 
> Samuel

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

* [Buildroot] [PATCH v4 3/3] GNURadio: new package
  2015-03-09 10:22     ` gwenhael.goavec
@ 2015-03-09 10:30       ` Thomas Petazzoni
  2015-03-09 11:25         ` gwenhael.goavec
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2015-03-09 10:30 UTC (permalink / raw)
  To: buildroot

Hello,

(Please try to strip useless parts of an e-mail when replying, thanks!).

On Mon, 9 Mar 2015 11:22:23 +0100, gwenhael.goavec wrote:

> > > +GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF
> > > +GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON
> > > +ifeq ($(BR2_arm),y)
> > > +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy)
> > > +GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU))
> > > +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)"
> > Hum... Dubious! Enforcing these target flags won't play very well with
> > the toolchain wrapper!
> > Also, how about aarch64 targets?
> >
> Volk seems buggy on arm with hf, consequently this Work around is mandatory to
> avoid build failure... I'm agree it's not really good but it's the recommended
> solution... 

Can you be more specific about this? What bug?

Because what you're doing here with -mfloat-abi=hard is *precisely*
using EABIhf.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 3/3] GNURadio: new package
  2015-03-09 10:30       ` Thomas Petazzoni
@ 2015-03-09 11:25         ` gwenhael.goavec
  0 siblings, 0 replies; 13+ messages in thread
From: gwenhael.goavec @ 2015-03-09 11:25 UTC (permalink / raw)
  To: buildroot

On Mon, 9 Mar 2015 11:30:57 +0100
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Hello,
> 
> (Please try to strip useless parts of an e-mail when replying, thanks!).
> 
Sorry
> On Mon, 9 Mar 2015 11:22:23 +0100, gwenhael.goavec wrote:
> 
> > > > +GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF
> > > > +GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON
> > > > +ifeq ($(BR2_arm),y)
> > > > +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy)
> > > > +GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU))
> > > > +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)"
> > > Hum... Dubious! Enforcing these target flags won't play very well with
> > > the toolchain wrapper!
> > > Also, how about aarch64 targets?
> > >
> > Volk seems buggy on arm with hf, consequently this Work around is mandatory to
> > avoid build failure... I'm agree it's not really good but it's the recommended
> > solution... 
> 
> Can you be more specific about this? What bug?
> 
> Because what you're doing here with -mfloat-abi=hard is *precisely*
> using EABIhf.
> 

If I use -Dhave_mfpu_neon=1 or nothing in fact I have this :

../lib/libvolk.so.0.0.0: undefined reference to `volk_16i_max_star_horizontal_16i_neonasm' 
../lib/libvolk.so.0.0.0: undefined reference to `volk_32fc_x2_multiply_32fc_neonasm' 
../lib/libvolk.so.0.0.0: undefined reference to `volk_32fc_32f_dot_prod_32fc_a_neonasm' 
../lib/libvolk.so.0.0.0: undefined reference to `volk_32f_x2_dot_prod_32f_neonasm' 
../lib/libvolk.so.0.0.0: undefined reference to `volk_32f_x2_dot_prod_32f_neonasm_opts' 
../lib/libvolk.so.0.0.0: undefined reference to `volk_32fc_32f_dot_prod_32fc_a_neonpipeline' 
collect2: error: ld returned 1 exit status
make[3]: *** [volk/apps/volk-config-info] Error 1

According to [1] and [2] the only solution to compile successfully gnuradio is
to force all flags.

Gwen

[1] https://gnuradio.org/redmine/issues/692#note-12
[2] http://gnuradio.org/redmine/projects/gnuradio/wiki/Embedded#Native-Compiling

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

* [Buildroot] [PATCH v4 3/3] GNURadio: new package
  2015-03-05 11:03 ` [Buildroot] [PATCH v4 3/3] GNURadio: new package Gwenhael Goavec-Merou
  2015-03-07 12:46   ` Samuel Martin
@ 2015-03-09 21:03   ` Thomas Petazzoni
  1 sibling, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2015-03-09 21:03 UTC (permalink / raw)
  To: buildroot

Dear Gwenhael Goavec-Merou,

On Thu,  5 Mar 2015 12:03:21 +0100, Gwenhael Goavec-Merou wrote:

> diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> new file mode 100644
> index 0000000..8e5c516
> --- /dev/null
> +++ b/package/gnuradio/Config.in
> @@ -0,0 +1,42 @@
> +comment "GNURadio needs a toolchain w/ C++, mmu, threads"

GNURadio -> gnuradio

MMU shouldn't be listed in the comment. And you missed largefile, IPv6
and wide char.

> +	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_MMU \
> +		&& BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS \
> +		&& BR2_LARGEFILE && BR2_INET_IPV6)

So, this block should be:

comment "gnuradio needs a toolchain w/ C++, IPv6, threads, largefile, wchar"
	depends on BR2_USE_MMU
	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE || \
		!BR2_INET_IPV6

> +config BR2_PACKAGE_GNURADIO
> +	bool "GNURadio"

GNURadio -> gnuradio

> +	depends on BR2_INET_IPV6
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_LARGEFILE
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_USE_MMU
> +	depends on BR2_USE_WCHAR
> +	select BR2_PACKAGE_BOOST
> +	select BR2_PACKAGE_BOOST_DATE_TIME
> +	select BR2_PACKAGE_BOOST_FILESYSTEM
> +	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
> +	select BR2_PACKAGE_BOOST_SYSTEM
> +	select BR2_PACKAGE_BOOST_THREAD
> +

Unneeded empty new line.

> +	help
> +	  GNU Radio is a free & open-source software development toolkit that
> +	  provides signal processing blocks to implement software radios. It can be
> +	  used with readily-available low-cost external RF hardware to create
> +	  software-defined radios, or without hardware in a simulation-like
> +	  environment. It is widely used in hobbyist, academic and commercial
> +	  environments to support both wireless communications research and
> +	  real-world radio systems.

Too long lines, please wrap to 72 columns.

> +
> +	  http://gnuradio.org/
> +
> +if BR2_PACKAGE_GNURADIO
> +
> +config BR2_PACKAGE_GNURADIO_BLOCKS
> +	bool "gnuradio-blocks"

No need to repeat "gnuradio-" in the prompt of sub-options, since they
are indented under the main "gnuradio" option. Maybe use something like
"blocks support" instead. And please add a help text.

> +
> +config BR2_PACKAGE_GNURADIO_PYTHON
> +	select BR2_PACKAGE_BOOST_PYTHON
> +	select BR2_PACKAGE_PYTHON

select after the bool line.

> +	bool "gnuradio-python"

Ditto, the prompt should be "python support" or something like that.
And help text needed.

> +
> +endif
> diff --git a/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch
> new file mode 100644
> index 0000000..7b35a59
> --- /dev/null
> +++ b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch

The file name of the patch should be just
0001-suppress-boost_unitest-detection.patch. See the documentation on
how to name patches.

There should also be a description + Signed-off-by line in each patch.

> @@ -0,0 +1,44 @@
> +Index: gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
> +===================================================================
> +--- gnuradio-3.7.5.orig/volk/cmake/VolkBoost.cmake
> ++++ gnuradio-3.7.5/volk/cmake/VolkBoost.cmake
> +@@ -29,7 +29,6 @@ set(__INCLUDED_VOLK_BOOST_CMAKE TRUE)
> + set(BOOST_REQUIRED_COMPONENTS
> +     filesystem
> +     system
> +-    unit_test_framework
> +     program_options
> + )
> + 
> +Index: gnuradio-3.7.5/volk/lib/CMakeLists.txt
> +===================================================================
> +--- gnuradio-3.7.5.orig/volk/lib/CMakeLists.txt
> ++++ gnuradio-3.7.5/volk/lib/CMakeLists.txt
> +@@ -535,27 +535,3 @@ if(ENABLE_STATIC_LIBS)
> +     ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_devel"   # .lib file
> +     )
> + endif(ENABLE_STATIC_LIBS)
> +-
> +-########################################################################
> +-# Build the QA test application
> +-########################################################################
> +-
> +-
> +-if(Boost_FOUND)
> +-
> +-    set_source_files_properties(
> +-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES
> +-        COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK;BOOST_TEST_MAIN"
> +-    )
> +-
> +-    include_directories(${Boost_INCLUDE_DIRS})
> +-    link_directories(${Boost_LIBRARY_DIRS})
> +-
> +-    add_executable(test_all
> +-        ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
> +-        ${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
> +-    )
> +-    target_link_libraries(test_all volk ${Boost_LIBRARIES})
> +-    add_test(qa_volk_test_all test_all)
> +-
> +-endif(Boost_FOUND)
> diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash
> new file mode 100644
> index 0000000..a25b466
> --- /dev/null
> +++ b/package/gnuradio/gnuradio.hash
> @@ -0,0 +1,2 @@
> +# From http://gnuradio.org/redmine/projects/gnuradio/files
> +md5	b4a917a548f41ce25c6c88f9bc864bca	gnuradio-3.7.5.tar.gz
> diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
> new file mode 100644
> index 0000000..4528e55
> --- /dev/null
> +++ b/package/gnuradio/gnuradio.mk
> @@ -0,0 +1,39 @@
> +################################################################################
> +#
> +# gnuradio
> +#
> +################################################################################
> +
> +GNURADIO_VERSION = 3.7.5
> +GNURADIO_SITE = http://gnuradio.org/redmine/attachments/download/792
> +GNURADIO_SOURCE = gnuradio-$(GNURADIO_VERSION).tar.gz

This line is not needed since it's the default.

> +GNURADIO_LICENSE = GPLv3+
> +GNURADIO_LICENSE_FILES = COPYING
> +
> +# gnuradio prevent from in-source-tree build

# gnuradio prevents doing an in-source-tree build

> +GNURADIO_BUILDDIR = $(GNURADIO_SRCDIR)/build
> +
> +#needed for volk compile
> +GNURADIO_DEPENDENCIES += host-python-cheetah
> +GNURADIO_DEPENDENCIES += host-swig host-boost boost

Only one variable assignment needed here:

# <foo> is needed for volk to compile
GNURADIO_DEPENDENCIES = \
	host-python-cheetah \
	host-swig \
	host-boost \
	boost

> +GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_GNURADIO_PYTHON),python)

Please keep the Python related stuff together. We normally do something like:

ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y)
GNURADIO_DEPENDENCIES += python
GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
else
GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF
endif

> +
> +GNURADIO_INSTALL_STAGING = YES

Add a comment above this line to explain why it is used.

> +
> +GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF
> +GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON

Please put these earlier (i.e before the condition about
BR2_PACKAGE_GNURADIO_PYTHON, and without the += sign. Like this:

GNURADIO_CONF_OPTS = \
	-DENABLE_DEFAULT=OFF \
	-DENABLE_VOLK=ON \
	-DENABLE_GNURADIO_RUNTIME=ON

I intentionally removed -DENABLE_TESTING=OFF since it's already passed
by the cmake package infrastructure.

> +ifeq ($(BR2_arm),y)
> +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy)
> +GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU))
> +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)"
> +GNURADIO_CONF_OPTS += -DCMAKE_ASM_FLAGS="-mfpu=neon -mfloat-abi=hard -march=armv7-a"
> +else
> +GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0
> +endif
> +endif

Please replace this by:

# Yes, this is silly, because -march is already known by the compiler
# with the internal toolchain, and passed by the external wrapper for
# external toolchains. Nonetheless, gnuradio does some matching on the
# 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),y)
GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-march=armv7-a"
endif

# As soon as -mfpu=neon is supported by the compiler, gnuradio will try
# to use it. But having NEON support in the compiler doesn't necessarily
# mean we have NEON support in our CPU.
ifeq ($(BR2_ARM_CPU_HAS_NEON),)
GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0
endif

> +GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=$(if $(BR2_PACKAGE_GNURADIO_BLOCKS),ON,OFF)
> +GNURADIO_CONF_OPTS += -DENABLE_PYTHON=$(if $(BR2_PACKAGE_GNURADIO_PYTHON),ON,OFF)

See above for -DENABLE_PYTHON.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory
  2015-03-05 11:03 [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Gwenhael Goavec-Merou
                   ` (2 preceding siblings ...)
  2015-03-07 11:25 ` [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Samuel Martin
@ 2015-03-09 21:05 ` Thomas Petazzoni
  2015-03-09 21:25   ` Samuel Martin
  2015-03-09 23:19   ` Arnout Vandecappelle
  3 siblings, 2 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2015-03-09 21:05 UTC (permalink / raw)
  To: buildroot

Gwenhael, Samuel,

On Thu,  5 Mar 2015 12:03:19 +0100, Gwenhael Goavec-Merou wrote:

> +* +LIBFOO_BUILDDIR+ may overload the default build directory when a
> +  package prevents from in-source-tree build. For example,
> +  FOO_BUILDDIR = $(FOO_SRCDIR)/.build, will be used to compile foo
> +  package in .build subdirectory.

Is it really useful to be able to define the path to the build
directory? I believe we could do something simpler that consists in
just a boolean variable saying that the package does not accept
in-source build, like:

LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO

(which would default to YES)

and then the CMake package infra takes care of doing the build in some
$(@D)/buildroot-build/ directory, or something like that.

Thoughts?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory
  2015-03-09 21:05 ` Thomas Petazzoni
@ 2015-03-09 21:25   ` Samuel Martin
  2015-03-09 23:19   ` Arnout Vandecappelle
  1 sibling, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2015-03-09 21:25 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 9, 2015 at 10:05 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Gwenhael, Samuel,
>
> On Thu,  5 Mar 2015 12:03:19 +0100, Gwenhael Goavec-Merou wrote:
>
>> +* +LIBFOO_BUILDDIR+ may overload the default build directory when a
>> +  package prevents from in-source-tree build. For example,
>> +  FOO_BUILDDIR = $(FOO_SRCDIR)/.build, will be used to compile foo
>> +  package in .build subdirectory.
>
> Is it really useful to be able to define the path to the build
> directory? I believe we could do something simpler that consists in
> just a boolean variable saying that the package does not accept
> in-source build, like:
>
> LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO
>
> (which would default to YES)
>
> and then the CMake package infra takes care of doing the build in some
> $(@D)/buildroot-build/ directory, or something like that.
>
> Thoughts?

Sounds good too tm.

>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com



-- 
Samuel

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

* [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory
  2015-03-09 21:05 ` Thomas Petazzoni
  2015-03-09 21:25   ` Samuel Martin
@ 2015-03-09 23:19   ` Arnout Vandecappelle
  1 sibling, 0 replies; 13+ messages in thread
From: Arnout Vandecappelle @ 2015-03-09 23:19 UTC (permalink / raw)
  To: buildroot

On 09/03/15 22:05, Thomas Petazzoni wrote:
> Gwenhael, Samuel,
> 
> On Thu,  5 Mar 2015 12:03:19 +0100, Gwenhael Goavec-Merou wrote:
> 
>> +* +LIBFOO_BUILDDIR+ may overload the default build directory when a
>> +  package prevents from in-source-tree build. For example,
>> +  FOO_BUILDDIR = $(FOO_SRCDIR)/.build, will be used to compile foo
>> +  package in .build subdirectory.
> 
> Is it really useful to be able to define the path to the build
> directory? I believe we could do something simpler that consists in
> just a boolean variable saying that the package does not accept
> in-source build, like:
> 
> LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO
> 
> (which would default to YES)
> 
> and then the CMake package infra takes care of doing the build in some
> $(@D)/buildroot-build/ directory, or something like that.

 Or build in a subdirectory unconditionally...


 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

end of thread, other threads:[~2015-03-09 23:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 11:03 [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Gwenhael Goavec-Merou
2015-03-05 11:03 ` [Buildroot] [PATCH v4 2/3] python-cheetah: add host-package support Gwenhael Goavec-Merou
2015-03-07 11:26   ` Samuel Martin
2015-03-05 11:03 ` [Buildroot] [PATCH v4 3/3] GNURadio: new package Gwenhael Goavec-Merou
2015-03-07 12:46   ` Samuel Martin
2015-03-09 10:22     ` gwenhael.goavec
2015-03-09 10:30       ` Thomas Petazzoni
2015-03-09 11:25         ` gwenhael.goavec
2015-03-09 21:03   ` Thomas Petazzoni
2015-03-07 11:25 ` [Buildroot] [PATCH v4 1/3] pkg-cmake: allow to build package in a subdirectory Samuel Martin
2015-03-09 21:05 ` Thomas Petazzoni
2015-03-09 21:25   ` Samuel Martin
2015-03-09 23:19   ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.