* [Buildroot] [PATCH v4 1/2] openpgm: new package
@ 2013-03-04 9:48 Alexander Lukichev
2013-03-04 9:48 ` [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support Alexander Lukichev
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alexander Lukichev @ 2013-03-04 9:48 UTC (permalink / raw)
To: buildroot
From: Alexander Lukichev <alexander.lukichev@espotel.com>
OpenPGM is an open source implementation of the Pragmatic General
Multicast (PGM) specification in RFC 3208 available at www.ietf.org.
It is required for PGM/EPGM support in ZeroMQ library.
Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
---
v4:
- included into a patch series to add PGM/EPGM support to zeromq;
- downgraded to version 5.1.118~dfsg as zeromq needs openpgm 5.1.x.
v3: improved according to community suggestions:
- added Signed-off-by and the reason to the cross-compilation patch;
- specified toolchain requirements in Config.in.
The package can be built without WCHAR but this is supported
only by its SCons and CMake build systems (for development). Autotools
based build system (for releases) does not support this. IPV6 and
thread support requirements are mandatory.
v2: improved according to community suggestions:
- legal information supplied;
- OPENPGM_SUBDIR is used instead of a post extract hook;
- more recent release of the package is used;
- cross-compilation fix uses cached values instead of hard-coded ones.
The last thing has been implemented as recommended in Autoconf manual
(http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Runtime.html#Runtime)
for cross-compilation-friendly runtime tests. Direct caching of
pgm_unaligned_pointers variable produced a warning during autoreconfigure
that said that only variables containing _cv_ were cached, and
ac_cv_lbl_unaligned_fail was already used in Buildroot, so I based the
test on that one and set pgm_unaligned_pointers later from its result.
---
package/Config.in | 1 +
package/openpgm/Config.in | 16 ++++++++++++
package/openpgm/openpgm-cross-compile.patch | 38 +++++++++++++++++++++++++++++
package/openpgm/openpgm.mk | 18 ++++++++++++++
4 files changed, 73 insertions(+)
create mode 100644 package/openpgm/Config.in
create mode 100644 package/openpgm/openpgm-cross-compile.patch
create mode 100644 package/openpgm/openpgm.mk
diff --git a/package/Config.in b/package/Config.in
index 8a02506..b405922 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -527,6 +527,7 @@ source "package/libtorrent/Config.in"
source "package/libupnp/Config.in"
source "package/libvncserver/Config.in"
source "package/nss-mdns/Config.in"
+source "package/openpgm/Config.in"
source "package/ortp/Config.in"
source "package/slirp/Config.in"
source "package/usbredir/Config.in"
diff --git a/package/openpgm/Config.in b/package/openpgm/Config.in
new file mode 100644
index 0000000..1b385a3
--- /dev/null
+++ b/package/openpgm/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_OPENPGM
+ bool "openpgm"
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_INET_IPV6
+ depends on BR2_USE_WCHAR
+ help
+ OpenPGM is an open source implementation of the Pragmatic General
+ Multicast (PGM) specification in RFC 3208 available at www.ietf.org.
+ PGM is a reliable and scalable multicast protocol that enables
+ receivers to detect loss, request retransmission of lost data, or
+ notify an application of unrecoverable loss.
+
+ http://code.google.com/p/openpgm/
+
+comment "openpgm needs a toolchain with WCHAR, threads and IPv6 support"
+ depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_INET_IPV6 && BR2_USE_WCHAR)
diff --git a/package/openpgm/openpgm-cross-compile.patch b/package/openpgm/openpgm-cross-compile.patch
new file mode 100644
index 0000000..07a2449
--- /dev/null
+++ b/package/openpgm/openpgm-cross-compile.patch
@@ -0,0 +1,38 @@
+configure.ac: cross-compilation fix
+
+This patch enables to configure the package when cross-compiling in a way
+recommended by Autoconf manual (see manual for version 2.69, Section 6.6
+Checking Runtime Behavior).
+
+Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
+
+--- a/openpgm/pgm/configure.ac 2011-09-27 20:59:08.000000000 +0300
++++ b/openpgm/pgm/configure.ac 2013-02-12 10:33:53.000000000 +0200
+@@ -272,14 +272,19 @@ uint32_t add32_with_carry (uint32_t a, u
+ ;;
+ esac
+ # ticket spinlock friendly: unaligned pointers & atomic ops (excl. Sun Pro)
+-AC_MSG_CHECKING([for unaligned pointers])
+-AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM([[char* nezumi = "mouse";]],
+- [[short x = *(short*)(nezumi + 2)]])],
+- [AC_MSG_RESULT([yes])
+- pgm_unaligned_pointers=yes],
+- [AC_MSG_RESULT([no])
+- pgm_unaligned_pointers=no])
++AC_CACHE_CHECK([if unaligned access fails], [ac_cv_lbl_unaligned_fail],
++ [AC_RUN_IFELSE(
++ [AC_LANG_PROGRAM([[char* nezumi = "mouse";]],
++ [[short x = *(short*)(nezumi + 2)]])],
++ [ac_cv_lbl_unaligned_fail=no],
++ [ac_cv_lbl_unaligned_fail=yes],
++ [ac_cv_lbl_unaligned_fail=yes])
++ ])
++if test "$ac_cv_lbl_unaligned_fail" = yes; then
++ pgm_unaligned_pointers=no
++else
++ pgm_unaligned_pointers=yes
++fi
+ AC_MSG_CHECKING([for intrinsic atomic ops])
+ # AC_PREPROC_IFELSE not always portable
+ AC_COMPILE_IFELSE(
diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk
new file mode 100644
index 0000000..c476014
--- /dev/null
+++ b/package/openpgm/openpgm.mk
@@ -0,0 +1,18 @@
+#############################################################
+#
+# openpgm
+#
+#############################################################
+
+OPENPGM_VERSION = 5.1.118~dfsg
+OPENPGM_SOURCE = libpgm-$(OPENPGM_VERSION).tar.gz
+OPENPGM_SITE = http://openpgm.googlecode.com/files/
+OPENPGM_LICENSE = LGPLv2.1+
+OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE
+OPENPGM_INSTALL_STAGING = YES
+OPENPGM_AUTORECONF = YES
+OPENPGM_SUBDIR = openpgm/pgm/
+OPENPGM_CONF_ENV = ac_cv_file__proc_cpuinfo=yes ac_cv_file__dev_rtc=no \
+ ac_cv_file__dev_hpet=no
+
+$(eval $(autotools-package))
--
1.8.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support
2013-03-04 9:48 [Buildroot] [PATCH v4 1/2] openpgm: new package Alexander Lukichev
@ 2013-03-04 9:48 ` Alexander Lukichev
2013-03-11 17:45 ` Thomas Petazzoni
2013-03-11 17:45 ` [Buildroot] [PATCH v4 1/2] openpgm: new package Thomas Petazzoni
2013-03-17 15:03 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Alexander Lukichev @ 2013-03-04 9:48 UTC (permalink / raw)
To: buildroot
This adds support for Pragmatic General Multicast protocol on raw
IP (PGM, RFC 3208) or UDP frames (EPGM) for use as zeromq reliable
multicast transport. The library relies on openpgm package to
implement the protocol itself.
Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
---
Although zeromq sources come with a pre-packaged version of
openpgm, due to cross-compilation problems of openpgm it is easier
to build it independently of zeromq, install it into staging tree
and then make zeromq link against installed library using
--with-system-pgm configure option. The patch takes this approach,
placing a dependency on openpgm package and selecting to build it
when a user selects "PGM/EPGM support" option in Buildroot config.
---
package/zeromq/Config.in | 9 +++++++++
package/zeromq/zeromq.mk | 5 +++++
2 files changed, 14 insertions(+)
diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in
index e1d3d52..b7dc8a6 100644
--- a/package/zeromq/Config.in
+++ b/package/zeromq/Config.in
@@ -23,3 +23,12 @@ config BR2_PACKAGE_ZEROMQ
?MQ is from iMatix and is LGPL open source.
http://www.zeromq.org/
+
+config BR2_PACKAGE_ZEROMQ_PGM
+ bool "PGM/EPGM support"
+ depends on BR2_PACKAGE_ZEROMQ
+ select BR2_PACKAGE_OPENPGM
+ help
+ Add support for Pragmatic General Multicast protocol (RFC 3208)
+ implemented either over raw IP packets or UDP datagrams
+ (encapsulated PGM). This requires OpenPGM library.
diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
index 284a168..2ee6cf3 100644
--- a/package/zeromq/zeromq.mk
+++ b/package/zeromq/zeromq.mk
@@ -11,4 +11,9 @@ ZEROMQ_DEPENDENCIES = util-linux
ZEROMQ_LICENSE = LGPLv3+ with exceptions
ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER
+ifeq ($(BR2_PACKAGE_ZEROMQ_PGM),y)
+ ZEROMQ_DEPENDENCIES += host-pkgconf openpgm
+ ZEROMQ_CONF_OPT = --with-system-pgm
+endif
+
$(eval $(autotools-package))
--
1.8.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 1/2] openpgm: new package
2013-03-04 9:48 [Buildroot] [PATCH v4 1/2] openpgm: new package Alexander Lukichev
2013-03-04 9:48 ` [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support Alexander Lukichev
@ 2013-03-11 17:45 ` Thomas Petazzoni
2013-03-17 15:03 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2013-03-11 17:45 UTC (permalink / raw)
To: buildroot
Dear Alexander Lukichev,
On Mon, 4 Mar 2013 11:48:11 +0200, Alexander Lukichev wrote:
> From: Alexander Lukichev <alexander.lukichev@espotel.com>
>
> OpenPGM is an open source implementation of the Pragmatic General
> Multicast (PGM) specification in RFC 3208 available at www.ietf.org.
> It is required for PGM/EPGM support in ZeroMQ library.
>
> Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support
2013-03-04 9:48 ` [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support Alexander Lukichev
@ 2013-03-11 17:45 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2013-03-11 17:45 UTC (permalink / raw)
To: buildroot
Dear Alexander Lukichev,
On Mon, 4 Mar 2013 11:48:12 +0200, Alexander Lukichev wrote:
> This adds support for Pragmatic General Multicast protocol on raw
> IP (PGM, RFC 3208) or UDP frames (EPGM) for use as zeromq reliable
> multicast transport. The library relies on openpgm package to
> implement the protocol itself.
>
> Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 1/2] openpgm: new package
2013-03-04 9:48 [Buildroot] [PATCH v4 1/2] openpgm: new package Alexander Lukichev
2013-03-04 9:48 ` [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support Alexander Lukichev
2013-03-11 17:45 ` [Buildroot] [PATCH v4 1/2] openpgm: new package Thomas Petazzoni
@ 2013-03-17 15:03 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2013-03-17 15:03 UTC (permalink / raw)
To: buildroot
>>>>> "Alexander" == Alexander Lukichev <alexander.lukichev@gmail.com> writes:
Alexander> From: Alexander Lukichev <alexander.lukichev@espotel.com>
Alexander> OpenPGM is an open source implementation of the Pragmatic General
Alexander> Multicast (PGM) specification in RFC 3208 available at www.ietf.org.
Alexander> It is required for PGM/EPGM support in ZeroMQ library.
Committed both, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-17 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 9:48 [Buildroot] [PATCH v4 1/2] openpgm: new package Alexander Lukichev
2013-03-04 9:48 ` [Buildroot] [PATCH v4 2/2] zeromq: add PGM/EPGM support Alexander Lukichev
2013-03-11 17:45 ` Thomas Petazzoni
2013-03-11 17:45 ` [Buildroot] [PATCH v4 1/2] openpgm: new package Thomas Petazzoni
2013-03-17 15:03 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox