libevent: add host variant
PATCH 1/5 libevent: add host variant
--- package/libevent/libevent.mk | 1 + 1 file changed, 1 insertion(+)
package/libevent/libevent.mk +1 -0
@@ -20,3 +20,4 @@ LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT endif $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.8.1.5
PATCH 2/5 boost: add host variant
--- package/boost/boost.mk | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
package/boost/boost.mk +33 -0
@@ -11,11 +11,19 @@ BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSIO BOOST_INSTALL_STAGING = YES TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion) +HOST_CC_VERSION = $(shell $(HOSTCC) -dumpversion) BOOST_DEPENDENCIES = BOOST_FLAGS = +# keep host variant as minimal as possible +HOST_BOOST_FLAGS = --without-icu \ + --without-libraries=$(subst $(space),$(comma),atomic chrono context \ + coroutine date_time exception filesystem graph graph_parallel \ + iostreams locale log math mpi program_options python random regex \ + serialization signals system test thread timer wave) + # atomic library compile only with upstream version, wait for next release # coroutine breaks on some weak toolchains and it's new for 1.54+ # log breaks with some toolchain combinations and it's new for 1.54+
@@ -54,6 +62,9 @@ ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) BOOST_DEPENDENCIES += bzip2 zlib endif +HOST_BOOST_OPT += toolset=gcc threading=multi variant=release link=shared \ + runtime-link=shared + BOOST_OPT += toolset=gcc \ threading=multi \ variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \
@@ -78,6 +89,12 @@ define BOOST_CONFIGURE_CMDS echo "" >> $(@D)/user-config.jam endef +define HOST_BOOST_CONFIGURE_CMDS + (cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS)) + echo "using gcc : $(HOST_CC_VERSION) : $(HOSTCXX) : <cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam + echo "" >> $(@D)/user-config.jam +endef + define BOOST_INSTALL_TARGET_CMDS (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ --user-config=$(@D)/user-config.jam \
@@ -86,6 +103,21 @@ define BOOST_INSTALL_TARGET_CMDS --layout=system install ) endef +define HOST_BOOST_BUILD_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPT) \ + --prefix=$(HOST_DIR)/usr ) +endef + +define HOST_BOOST_INSTALL_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPT) \ + --prefix=$(HOST_DIR)/usr \ + --layout=system install ) +endef + define BOOST_INSTALL_STAGING_CMDS (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \ --user-config=$(@D)/user-config.jam \
@@ -95,3 +127,4 @@ define BOOST_INSTALL_STAGING_CMDS endef $(eval $(generic-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.8.1.5
PATCH 2/5 boost: add host variant
Gustavo,
Please see my comment below, otherwise looks good.
Gustavo Zacarias <[email protected]> wrote on 10/25/2013 07:15:20 AM:
package/boost/boost.mk BOOST_SITE =
Quoted 10 lines
Signed-off-by Gustavo Zacarias <[email protected]>--- package/boost/boost.mk | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)package/boost/boost.mk +0
-0@@ -11,11 +11,19 @@ BOOST_SITE =
http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSIO
package/boost/boost.mk BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSIO · line 20
Quoted 10 lines
package/boost/boost.mk +2
-0BOOST_INSTALL_STAGING = YES TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion) +HOST_CC_VERSION = $(shell $(HOSTCC) -dumpversion) BOOST_DEPENDENCIES = BOOST_FLAGS = +# keep host variant as minimal as possible
Could you expand more on what you are leaving enabled and why?
package/boost/boost.mk BOOST_SITE = · line 22
Quoted 2 lines
package/boost/boost.mk +2
-0+HOST_BOOST_FLAGS = --without-icu \ + --without-libraries=$(subst $(space),$(comma),atomic chrono context
\
package/boost/boost.mk BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSIO
Quoted 5 lines
package/boost/boost.mk +4
-0+ coroutine date_time exception filesystem graph graph_parallel \ + iostreams locale log math mpi program_options python random regex \ + serialization signals system test thread timer wave) + # atomic library compile only with upstream version, wait for next
release
package/boost/boost.mk ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) · line 65
Quoted 7 lines
package/boost/boost.mk +1
-0# coroutine breaks on some weak toolchains and it's new for 1.54+ # log breaks with some toolchain combinations and it's new for 1.54+@@ -54,6 +62,9 @@ ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) BOOST_DEPENDENCIES += bzip2 zlib endif +HOST_BOOST_OPT += toolset=gcc threading=multi variant=release
link=shared \
package/boost/boost.mk define BOOST_CONFIGURE_CMDS · line 94
Quoted 12 lines
package/boost/boost.mk +5
-0+ runtime-link=shared + BOOST_OPT += toolset=gcc \ threading=multi \ variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \@@ -78,6 +89,12 @@ define BOOST_CONFIGURE_CMDS echo "" >> $(@D)/user-config.jam endef +define HOST_BOOST_CONFIGURE_CMDS + (cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS)) + echo "using gcc : $(HOST_CC_VERSION) : $(HOSTCXX) :
<cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam
Quoted 40 lines
package/boost/boost.mk +19
-0+ echo "" >> $(@D)/user-config.jam +endef + define BOOST_INSTALL_TARGET_CMDS (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ --user-config=$(@D)/user-config.jam \@@ -86,6 +103,21 @@ define BOOST_INSTALL_TARGET_CMDS --layout=system install ) endef +define HOST_BOOST_BUILD_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPT) \ + --prefix=$(HOST_DIR)/usr ) +endef + +define HOST_BOOST_INSTALL_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPT) \ + --prefix=$(HOST_DIR)/usr \ + --layout=system install ) +endef + define BOOST_INSTALL_STAGING_CMDS (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \ --user-config=$(@D)/user-config.jam \@@ -95,3 +127,4 @@ define BOOST_INSTALL_STAGING_CMDS endef $(eval $(generic-package)) +$(eval $(host-autotools-package))Signature · 6 lines
1.8.1.5 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/5 boost: add host variant
Quoted 10 lines · Ryan Barnett
Gustavo,
Please see my comment below, otherwise looks good.
Gustavo Zacarias <[email protected]> wrote on 10/25/2013 07:15:20 AM:
Quoted 1 line
+# keep host variant as minimal as possible
Could you expand more on what you are leaving enabled and why?
Just the barebones is enough for host-thrift (the tool) hence there's nothing to gain from a full host-boost other than longer build times. If the need arises it can be expanded in the future for other host-* users. Regards.
PATCH 2/5 boost: add host variant
Gustavo,
Gustavo Zacarias <[email protected]> wrote on 10/25/2013 05:23:28 PM:
Quoted 7 lines · Ryan Barnett
Quoted 6 lines
Gustavo,
Please see my comment below, otherwise looks good.
Gustavo Zacarias <[email protected]> wrote on 10/25/2013
07:15:20
Quoted 9 lines
Quoted 5 lines
AM:
Quoted 1 line
+# keep host variant as minimal as possible
Could you expand more on what you are leaving enabled and why?
Just the barebones is enough for host-thrift (the tool) hence there's nothing to gain from a full host-boost other than longer build times. If the need arises it can be expanded in the future for other host-*
users.
Mind adding a small comment along these lines - minimal configuration for host-thrift?
Thanks,
-Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131025/d34488e8/attachment-0001.html>
PATCH 2/5 boost: add host variant
In reply to Gustavo ZacariasOn 25/10/13 14:15, Gustavo Zacarias wrote:
[snip]
package/boost/boost.mk define BOOST_INSTALL_STAGING_CMDS · line 130
Quoted 5 lines
package/boost/boost.mk +1
-0@@ -95,3 +127,4 @@ define BOOST_INSTALL_STAGING_CMDS endef $(eval $(generic-package)) +$(eval $(host-autotools-package))
Wow, did it suddenly become an autotools package? :-)
Regards,
Arnout
Signature · 6 lines
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
PATCH 2/5 boost: add host variant
Quoted 9 lines · Arnout Vandecappelle
On 25/10/13 14:15, Gustavo Zacarias wrote:
[snip]package/boost/boost.mk define BOOST_INSTALL_STAGING_CMDS · line 130
Quoted 5 lines
package/boost/boost.mk +1
-0@@ -95,3 +127,4 @@ define BOOST_INSTALL_STAGING_CMDS endef $(eval $(generic-package)) +$(eval $(host-autotools-package))Wow, did it suddenly become an autotools package? :-)
Damn copy/paste!
For all intents and purposes it works since all the important steps are redefined.
I'll sent a v2 tomorrow after seeing if there's anything else to touch in the other patches.
Regards.
PATCH 3/5 python-thrift: fix cross building
In reply to Gustavo ZacariasThe C code (fastbinary.so) wasn't built using the cross compiler, hence it was unusable. Fix it.
--- package/python-thrift/python-thrift.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
package/python-thrift/python-thrift.mk +8 -3
@@ -9,13 +9,18 @@ PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz PYTHON_THRIFT_SITE = http://pypi.python.org/packages/source/t/thrift PYTHON_THRIFT_LICENSE = Apache-2.0 PYTHON_THRIFT_LICENSE_FILES = README - PYTHON_THRIFT_DEPENDENCIES = python define PYTHON_THRIFT_BUILD_CMDS (cd $(@D); \ - PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ $(HOST_DIR)/usr/bin/python setup.py build) endef
Signature · 1 line
1.8.1.5
PATCH 3/5 python-thrift: fix cross building
Gustavo Zacarias <[email protected]> wrote on 10/25/2013 07:15:21 AM:
Quoted 4 lines
The C code (fastbinary.so) wasn't built using the cross compiler, hence it was unusable. Fix it.
Signed-off-by Gustavo Zacarias <[email protected]>
Quoted 4 lines
--- package/python-thrift/python-thrift.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
PATCH 4/5 python-thrift: bump to version 0.9.1 and switch to apache
In reply to Gustavo ZacariasSwitch away from the PyPI subset version since it has a great filename clash with the full upstream apache version.
--- package/python-thrift/python-thrift.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
package/python-thrift/python-thrift.mk +5 -5
@@ -4,15 +4,15 @@ # ################################################################################ -PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_VERSION = 0.9.1 PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz -PYTHON_THRIFT_SITE = http://pypi.python.org/packages/source/t/thrift +PYTHON_THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(PYTHON_THRIFT_VERSION) PYTHON_THRIFT_LICENSE = Apache-2.0 -PYTHON_THRIFT_LICENSE_FILES = README +PYTHON_THRIFT_LICENSE_FILES = LICENSE PYTHON_THRIFT_DEPENDENCIES = python define PYTHON_THRIFT_BUILD_CMDS - (cd $(@D); \ + (cd $(@D)/lib/py; \ CC="$(TARGET_CC)" \ CFLAGS="$(TARGET_CFLAGS)" \ LDSHARED="$(TARGET_CROSS)gcc -shared" \
@@ -28,7 +28,7 @@ endef # the installation directory is in python's load path. For host-python, # it is not, so add it explicitly while installing to target. define PYTHON_THRIFT_INSTALL_TARGET_CMDS - (cd $(@D); PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + (cd $(@D)/lib/py; PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) endef
Signature · 1 line
1.8.1.5
PATCH 5/5 thrift: new package
In reply to Gustavo Zacarias--- package/Config.in | 1 + package/thrift/Config.in | 22 +++++++++++ package/thrift/thrift-01-libevent-cross.patch | 16 ++++++++ package/thrift/thrift-02-autoreconf.patch | 22 +++++++++++ package/thrift/thrift-03-zlib-cross.patch | 16 ++++++++ package/thrift/thrift.mk | 54 +++++++++++++++++++++++++++ 6 files changed, 131 insertions(+) create mode 100644 package/thrift/Config.in create mode 100644 package/thrift/thrift-01-libevent-cross.patch create mode 100644 package/thrift/thrift-02-autoreconf.patch create mode 100644 package/thrift/thrift-03-zlib-cross.patch create mode 100644 package/thrift/thrift.mk
package/Config.in +1 -0
@@ -639,6 +639,7 @@ source "package/openpgm/Config.in" source "package/ortp/Config.in" source "package/slirp/Config.in" source "package/snmppp/Config.in" +source "package/thrift/Config.in" source "package/usbredir/Config.in" source "package/wvstreams/Config.in" source "package/zeromq/Config.in"
package/thrift/Config.in new file +22 -0
@@ -0,0 +1,22 @@ +config BR2_PACKAGE_THRIFT + bool "thrift" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + help + The Apache Thrift software framework, for scalable cross-language + services development, combines a software stack with a + code generation engine to build services that work + efficiently and seamlessly between C++, Java, Python, PHP, Ruby, + Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, + OCaml and Delphi and other languages. + + http://thrift.apache.org/ + +comment "thrift needs a toolchain w/ C++, largefile, wchar, threads" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
package/thrift/thrift-01-libevent-cross.patch new file +16 -0
@@ -0,0 +1,16 @@ +Make it cross-compile happy the hard way, there's no clean way. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_event.m4 thrift-0.9.1/aclocal/ax_lib_event.m4 +--- thrift-0.9.1.orig/aclocal/ax_lib_event.m4 2013-08-15 11:04:29.000000000 -0300 ++++ thrift-0.9.1/aclocal/ax_lib_event.m4 2013-10-07 20:40:44.076435613 -0300 +@@ -75,7 +75,7 @@ + AC_LANG_PUSH([C]) + dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling, + dnl but then the version cannot be checked. +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include <sys/types.h> + #include <event.h> + ]], [[
package/thrift/thrift-02-autoreconf.patch new file +22 -0
@@ -0,0 +1,22 @@ +Fillers to make autoreconf (automake) happy. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura thrift-0.9.1.orig/AUTHORS thrift-0.9.1/AUTHORS +--- thrift-0.9.1.orig/AUTHORS 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.1/AUTHORS 2013-10-07 20:45:15.745315148 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.1.orig/ChangeLog thrift-0.9.1/ChangeLog +--- thrift-0.9.1.orig/ChangeLog 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.1/ChangeLog 2013-10-07 20:45:23.078554836 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.1.orig/NEWS thrift-0.9.1/NEWS +--- thrift-0.9.1.orig/NEWS 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.1/NEWS 2013-10-07 20:45:20.351465699 -0300 +@@ -0,0 +1,2 @@ ++ ++
package/thrift/thrift-03-zlib-cross.patch new file +16 -0
@@ -0,0 +1,16 @@ +Make zlib version detection cross-compile happy. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 thrift-0.9.1/aclocal/ax_lib_zlib.m4 +--- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 2013-08-15 11:04:29.000000000 -0300 ++++ thrift-0.9.1/aclocal/ax_lib_zlib.m4 2013-10-07 20:47:44.523177973 -0300 +@@ -73,7 +73,7 @@ + # (defined in the library). + AC_LANG_PUSH([C]) + dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling. +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include <zlib.h> + #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION + #else
package/thrift/thrift.mk new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH 5/5 thrift: new package
Gustavo,
Please see my comments below.
Gustavo Zacarias <[email protected]> wrote on 10/25/2013 07:15:23 AM:
Quoted 8 lines
Signed-off-by Gustavo Zacarias <[email protected]>--- package/Config.in | 1 + package/thrift/Config.in | 22 +++++++++++ package/thrift/thrift-01-libevent-cross.patch | 16 ++++++++ package/thrift/thrift-02-autoreconf.patch | 22 +++++++++++ package/thrift/thrift-03-zlib-cross.patch | 16 ++++++++ package/thrift/thrift.mk | 54
+++++++++++++++++++++++++++
Review
Quoted 48 lines
6 files changed, 131 insertions(+) create mode 100644 package/thrift/Config.in create mode 100644 package/thrift/thrift-01-libevent-cross.patch create mode 100644 package/thrift/thrift-02-autoreconf.patch create mode 100644 package/thrift/thrift-03-zlib-cross.patch create mode 100644 package/thrift/thrift.mkpackage/Config.in +1
-0@@ -639,6 +639,7 @@ source "package/openpgm/Config.in" source "package/ortp/Config.in" source "package/slirp/Config.in" source "package/snmppp/Config.in" +source "package/thrift/Config.in" source "package/usbredir/Config.in" source "package/wvstreams/Config.in" source "package/zeromq/Config.in"package/thrift/Config.in new file +22
-0@@ -0,0 +1,22 @@ +config BR2_PACKAGE_THRIFT + bool "thrift" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + help + The Apache Thrift software framework, for scalable cross-language + services development, combines a software stack with a + code generation engine to build services that work + efficiently and seamlessly between C++, Java, Python, PHP, Ruby, + Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, + OCaml and Delphi and other languages. + + http://thrift.apache.org/ + +comment "thrift needs a toolchain w/ C++, largefile, wchar, threads" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP(quoted diff) +0
-0
b/package/thrift/thrift-01-libevent-cross.patch
package/thrift/thrift-01-libevent-cross.patch line 5
Quoted 10 lines
new file mode 100644
index 0000000..f07caa7package/thrift/thrift-01-libevent-cross.patch new file +5
-0@@ -0,0 +1,16 @@ +Make it cross-compile happy the hard way, there's no clean way. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_event.m4
thrift-0.9.1/aclocal/ax_lib_event.m4
package/thrift/thrift-01-libevent-cross.patch line 6
Quoted 1 line
package/thrift/thrift-01-libevent-cross.patch new file +1
-0+--- thrift-0.9.1.orig/aclocal/ax_lib_event.m4 2013-08-15
11:04:29.000000000 -0300
package/thrift/thrift-01-libevent-cross.patch line 7
Quoted 1 line
package/thrift/thrift-01-libevent-cross.patch new file +1
-0++++ thrift-0.9.1/aclocal/ax_lib_event.m4 2013-10-07
20:40:44.076435613 -0300
package/thrift/thrift-01-libevent-cross.patch
Quoted 3 lines
package/thrift/thrift-01-libevent-cross.patch new file +3
-0+@@ -75,7 +75,7 @@ + AC_LANG_PUSH([C]) + dnl This can be changed to AC_LINK_IFELSE if you are
cross-compiling,
Review
Quoted 7 lines
package/thrift/thrift-01-libevent-cross.patch new file +6
-0+ dnl but then the version cannot be checked. +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include <sys/types.h> + #include <event.h> + ]], [[(quoted diff) +0
-0
b/package/thrift/thrift-02-autoreconf.patch
Review
Quoted 28 lines
new file mode 100644
index 0000000..d56212apackage/thrift/thrift-02-autoreconf.patch new file +22
-0@@ -0,0 +1,22 @@ +Fillers to make autoreconf (automake) happy. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura thrift-0.9.1.orig/AUTHORS thrift-0.9.1/AUTHORS +--- thrift-0.9.1.orig/AUTHORS 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.1/AUTHORS 2013-10-07 20:45:15.745315148 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.1.orig/ChangeLog thrift-0.9.1/ChangeLog +--- thrift-0.9.1.orig/ChangeLog 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.1/ChangeLog 2013-10-07 20:45:23.078554836 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.1.orig/NEWS thrift-0.9.1/NEWS +--- thrift-0.9.1.orig/NEWS 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.1/NEWS 2013-10-07 20:45:20.351465699 -0300 +@@ -0,0 +1,2 @@ ++ ++(quoted diff) +0
-0
b/package/thrift/thrift-03-zlib-cross.patch
package/thrift/thrift-03-zlib-cross.patch line 5
Quoted 10 lines
new file mode 100644
index 0000000..3af39c4package/thrift/thrift-03-zlib-cross.patch new file +5
-0@@ -0,0 +1,16 @@ +Make zlib version detection cross-compile happy. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4
thrift-0.9.1/aclocal/ax_lib_zlib.m4
package/thrift/thrift-03-zlib-cross.patch line 6
Quoted 1 line
package/thrift/thrift-03-zlib-cross.patch new file +1
-0+--- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 2013-08-15
11:04:29.000000000 -0300
package/thrift/thrift-03-zlib-cross.patch line 7
Quoted 1 line
package/thrift/thrift-03-zlib-cross.patch new file +1
-0++++ thrift-0.9.1/aclocal/ax_lib_zlib.m4 2013-10-07 20:47:44.523177973
-0300
package/thrift/thrift-03-zlib-cross.patch
Quoted 4 lines
package/thrift/thrift-03-zlib-cross.patch new file +4
-0+@@ -73,7 +73,7 @@ + # (defined in the library). + AC_LANG_PUSH([C]) + dnl This can be changed to AC_LINK_IFELSE if you are
cross-compiling.
package/thrift/thrift.mk
Quoted 12 lines
package/thrift/thrift-03-zlib-cross.patch new file +5
-0+- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include <zlib.h> + #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION + #elsepackage/thrift/thrift.mk new file +0
-0@@ -0,0 +1,54 @@
+################################################################################
package/thrift/thrift.mk line 4
Quoted 4 lines
package/thrift/thrift.mk new file +3
-0+# +# thrift +#
+################################################################################
package/thrift/thrift.mk
Quoted 5 lines
package/thrift/thrift.mk new file +5
-0+ +THRIFT_VERSION = 0.9.1 +THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION) +THRIFT_DEPENDENCIES = host-pkgconf host-thrift boost libevent openssl +HOST_THRIFT_DEPENDENCIES = host-boost host-libevent host-openssl
host-pkgconf
package/thrift/thrift.mk line 14
Quoted 4 lines
package/thrift/thrift.mk new file +4
-0+THRIFT_CONF_OPT = --with-sysroot=$(STAGING_DIR) --with-tests=no \ + --with-boost=$(STAGING_DIR) +HOST_THRIFT_CONF_OPT = --with-sysroot=$(HOST_DIR) --with-tests=no +THRIFT_AUTORECONF = YES
Could you move the license to right below the site? It doesn't really matter but I guess I like to see version, site, license as the first things in a package. I guess there isn't any official standard to the way a package makefile should be in but I guess that is just my person preference.
package/thrift/thrift.mk line 20
Quoted 6 lines
package/thrift/thrift.mk new file +6
-0+THRIFT_LICENSE = Apache 2.0 +THRIFT_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +# openssl uses zlib, so we need to explicitly link with it when static +THRIFT_CONF_ENV += LIBS=-lz
Shouldn't you add a dependancy on libz then?
THRIFT_DEPENDCIES += zlib
package/thrift/thrift.mk
Quoted 6 lines
package/thrift/thrift.mk new file +6
-0+endif + +# Language selection +# The generator (host tool) works with all of them regardless +# This is just for the libraries / bindings +THRIFT_LANG_CONF_OPT += --without-csharp --without-java
--without-erlang \
package/thrift/thrift.mk line 25
Quoted 1 line
package/thrift/thrift.mk new file +1
-0+ --without-python --without-perl --without-php
--without-php_extension \
Quoted 7 lines
package/thrift/thrift.mk new file +7
-0+ --without-ruby --without-haskell --without-go --without-d +HOST_THRIFT_CONF_OPT += $(THRIFT_LANG_CONF_OPT) --without-c_glib +THRIFT_CONF_OPT += $(THRIFT_LANG_CONF_OPT) + +# C bindings +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +THRIFT_DEPENDENCIES += libglib2
package/thrift/thrift.mk
Quoted 10 lines
package/thrift/thrift.mk new file +10
-0+else +THRIFT_CONF_OPT += --without-c_glib +endif + +# De-hardcode THRIFT for cross compiling +define THRIFT_BUILD_CMDS + for f in `find $(@D) -name Makefile -type f`; do \ + $(SED) "/^THRIFT =/d" $$f; \ + done + $(SED) "s:top_builddir)/compiler/cpp/thrift:THRIFT):"
$(@D)/tutorial/Makefile
package/thrift/thrift.mk line 43
Quoted 1 line
package/thrift/thrift.mk new file +1
-0+ $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C
$(@D)
package/thrift/thrift.mk line 45
Quoted 2 lines
package/thrift/thrift.mk new file +2
-0+endef +
I haven't tested this so I don't fully understand what exactly what you are doing here. I see that this is an autotools package but it doesn't appear to be building or installing using the autotools infrastructure. Could you please elaborate a little bit more of why exactly you can't use autotoools to build for this? I believe I understand what you are doing here but I guess I would like a few more details from you.
Also it looks like thrift is a compiler, so wouldn't we want to have this available as a host tool because presumably there would be a need to to add custom user packages that utilize Thrift to compile their application. Again I haven't had time to read further what exactly thrift does but these are just the few things that are coming to my mind tonight.
I will try to investigate this a little bit more in the coming days (next week) but for now this are my initial reaction comments.
package/thrift/thrift.mk
Quoted 3 lines
package/thrift/thrift.mk new file +3
-0+# Install runtime only +define THRIFT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR)
install
Quoted 6 lines
package/thrift/thrift.mk new file +4
-0+endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))Signature · 1 line
1.8.1.5
Thanks,
-Ryan
PATCH 5/5 thrift: new package
Quoted 5 lines · Ryan Barnett
Could you move the license to right below the site? It doesn't really matter but I guess I like to see version, site, license as the first things in a package. I guess there isn't any official standard to the way a package makefile should be in but I guess that is just my person preference.
Huh, that's very OCD :)
There are several packages that don't keep them ordered, specially those
Quoted 7 lines
package/thrift/thrift.mk line 20
Quoted 3 lines
package/thrift/thrift.mk new file +3
-0+ifeq ($(BR2_PREFER_STATIC_LIB),y) +# openssl uses zlib, so we need to explicitly link with it when static +THRIFT_CONF_ENV += LIBS=-lzShouldn't you add a dependancy on libz then?
THRIFT_DEPENDCIES+= zlib
It's implicit from openssl, we don't build openssl without zlib (it's possible to do so, but not really that useful and would complicate other packages).
Quoted 7 lines
I haven't tested this so I don't fully understand what exactly what you are doing here. I see that this is an autotools package but it doesn't appear to be building or installing using the autotools infrastructure. Could you please elaborate a little bit more of why exactly you can't use autotoools to build for this? I believe I understand what you are doing here but I guess I would like a few more details from you.
Quoted 8 lines
Also it looks like thrift is a compiler, so wouldn't we want to have this available as a host tool because presumably there would be a need to to add custom user packages that utilize Thrift to compile their application. Again I haven't had time to read further what exactly thrift does but these are just the few things that are coming to my mind tonight.
I will try to investigate this a little bit more in the coming days (next week) but for now this are my initial reaction comments.
A quick overlook then.
Thrift is basically a compiler and runtime libs.
The compiler component is only useful for the host because we don't do development on the target any more, that would be host-boost, which IS actually using autotools infra (no defines overriding HOST_THRIFT_*_CMDS). For the target the INSTALL phase has an override to just install the runtime libraries and avoid the compiler, tests and examples. The target BUILD override patches the thrift makefiles to use $(THRIFT) rather than hardcode it (the for-SED loop), and builds passing $(THRIFT) to the appropiate host-compiled one (since it's hell bent on using it's own built one which would be cross and wouldn't run).
This is a double catch though, i wanted to build examples as a sane way to test it that things are ok but not install them.
Regards.
PATCH 5/5 thrift: new package
Quoted 8 lines · Gustavo Zacarias
Quoted 5 lines · Ryan Barnett
Could you move the license to right below the site? It doesn't really matter but I guess I like to see version, site, license as the first things in a package. I guess there isn't any official standard to the way a package makefile should be in but I guess that is just my person preference.
Huh, that's very OCD :)
But not as much as requiring 80 hashes in the header :-)
Quoted 1 line
There are several packages that don't keep them ordered, specially those
It's not because it wasn't done right in the past that it shouldn't be
done right now :-)
I agree with Ryan that it would be a good idea to standardize on some
order of the variable definitions. But since there is not standard at the moment, we have to wait for an edict from Peter before we can enforce it.
[snip]
Quoted 11 lines
Quoted 7 lines
package/thrift/thrift.mk line 20
Quoted 3 lines
package/thrift/thrift.mk new file +3
-0+ifeq ($(BR2_PREFER_STATIC_LIB),y) +# openssl uses zlib, so we need to explicitly link with it when static +THRIFT_CONF_ENV += LIBS=-lzShouldn't you add a dependancy on libz then?
THRIFT_DEPENDCIES+= zlibIt's implicit from openssl, we don't build openssl without zlib (it's possible to do so, but not really that useful and would complicate other packages).
That it's implicit from openssl is not really relevant - if the
dependency is ever removed from openssl (OK, this will not happen, but just imagine) then we'd like to keep the correct dependency here.
Quoted 17 lines
Quoted 8 lines
I haven't tested this so I don't fully understand what exactly what you are doing here. I see that this is an autotools package but it doesn't appear to be building or installing using the autotools infrastructure. Could you please elaborate a little bit more of why exactly you can't use autotoools to build for this? I believe I understand what you are doing here but I guess I would like a few more details from you.
Quoted 8 lines
Also it looks like thrift is a compiler, so wouldn't we want to have this available as a host tool because presumably there would be a need to to add custom user packages that utilize Thrift to compile their application. Again I haven't had time to read further what exactly thrift does but these are just the few things that are coming to my mind tonight.
I will try to investigate this a little bit more in the coming days (next week) but for now this are my initial reaction comments.
Quoted 13 lines
A quick overlook then.
Thrift is basically a compiler and runtime libs.
The compiler component is only useful for the host because we don't do development on the target any more, that would be host-boost, which IS actually using autotools infra (no defines overriding HOST_THRIFT_*_CMDS). For the target the INSTALL phase has an override to just install the runtime libraries and avoid the compiler, tests and examples. The target BUILD override patches the thrift makefiles to use $(THRIFT) rather than hardcode it (the for-SED loop), and builds passing $(THRIFT) to the appropiate host-compiled one (since it's hell bent on using it's own built one which would be cross and wouldn't run).
This is a double catch though, i wanted to build examples as a sane way to test it that things are ok but not install them.
It would be nicer though if that could be done with an upstreamable
patch, but I think you said before that it wasn't going to happen.
I do think that your sed magic should be done in POST_PATCH_HOOKS on
the Makefile.am, though. Patching up the generated Makefiles just feels icky to me.
Regards,
Arnout
Signature · 6 lines
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
PATCH 5/5 thrift: new package
Quoted 1 line · Arnout Vandecappelle
But not as much as requiring 80 hashes in the header :-)
Pfffft, that's not mine :)
Quoted 2 lines
It's not because it wasn't done right in the past that it shouldn't be
done right now :-)
Some licenses were defined a few days ago that weren't the last lines before defines and nobody said anything, you should have shown up then :P
Quoted 4 lines
I agree with Ryan that it would be a good idea to standardize on some
order of the variable definitions. But since there is not standard at the moment, we have to wait for an edict from Peter before we can enforce it.
Propose it then and get it rolling, for the time being there's no rule about it.
Quoted 3 lines
That it's implicit from openssl is not really relevant - if the
dependency is ever removed from openssl (OK, this will not happen, but just imagine) then we'd like to keep the correct dependency here.
Ok.
All the packages that use openssl should be checked though, almost none of them do zlib either (doesn't mean they use it directly, but a good check wouldn't hurt).
Quoted 6 lines
It would be nicer though if that could be done with an upstreamable
patch, but I think you said before that it wasn't going to happen.I do think that your sed magic should be done in
POST_PATCH_HOOKSon
the Makefile.am, though. Patching up the generated Makefiles just feels icky to me.
I don't think i've said that, but i might be wrong.
At the moment i prefer SED rather than a patch because there are many instances around, i'll try reaching upstream to see how receptive they are to a patch that just defines THRIFT ?= .. for a clean cross build. It was a leftover from a quick hack to get it to build properly that i've overlooked when cleaning up.
Fixed, i'll send a revised patchset soon.
Regards.
PATCH 5/5 thrift: new package
Gustavo, Arnout,
Gustavo Zacarias <[email protected]> wrote on 10/28/2013 06:02:30 AM:
Quoted 7 lines · Arnout Vandecappelle
Quoted 2 lines
But not as much as requiring 80 hashes in the header :-)
Pfffft, that's not mine :)
Quoted 1 line
It's not because it wasn't done right in the past that it shouldn't
be
Quoted 4 lines
Quoted 1 line
done right now :-)
Some licenses were defined a few days ago that weren't the last lines before defines and nobody said anything, you should have shown up then
:P
Quoted 8 lines
Quoted 5 lines
I agree with Ryan that it would be a good idea to standardize on some
order of the variable definitions. But since there is not standard at the moment, we have to wait for an edict from Peter before we can enforce it.Propose it then and get it rolling, for the time being there's no rule about it.
I never was intending for you to change it, rather it was a suggestion and I don't have any standard to fall back on to back me up.
Quoted 8 lines
Quoted 3 lines
That it's implicit from openssl is not really relevant - if the
dependency is ever removed from openssl (OK, this will not happen, but just imagine) then we'd like to keep the correct dependency here.Ok.
All the packages that use openssl should be checked though, almost none of them do zlib either (doesn't mean they use it directly, but a good check wouldn't hurt).
I guess all I really care about is a comment in regards to zlib being built from having dependancy on openssl. I don't always remember these things so just a friendly reminder comment is good enough.
Thanks,
-Ryan
PATCH 5/5 thrift: new package
Quoted 4 lines · Ryan Barnett
Quoted 4 lines
Quoted 3 lines
That it's implicit from openssl is not really relevant - if the
dependency is ever removed from openssl (OK, this will not happen, but just imagine) then we'd like to keep the correct dependency here.
Quoted 8 lines
Quoted 4 lines
Ok.
All the packages that use openssl should be checked though, almost none of them do zlib either (doesn't mean they use it directly, but a good check wouldn't hurt).I guess all I really care about is a comment in regards to zlib being built from having dependancy on openssl. I don't always remember these things so just a friendly reminder comment is good enough.
Point is thrift has a hard dependency on zlib right now (regardless of openssl, for channel compression) so it is a dependency.
It can be built without it and loose the TZlibTransport but really it's already pulled in by openssl so making it optional is kind of pointless. What should be checked is the same holding true for other packages that do use openssl and _maybe_ use zlib as well in a separate fashion which haven't accounted for it (like thrift).
So the comment itself wouldn't apply, pulling in zlib does (select + DEPENDENCIES) which is what i'm doing for the next patchset version. Regards.