Skip to content

Commit

Permalink
boost: 1.65.0 Update + Fixes
Browse files Browse the repository at this point in the history
This commit updates the boost libraries to version 1.65.0

This new version brings two new libraries:
 - Boost.Stacktrace [1]
   -> Gather, store, copy and print backtraces, from Antony Polukhin.
 - Boost.PolyCollection [2]
   -> Fast containers of polymorphic objects, from Joaquín M López Muñoz.

Fixes in this commit:
 - Boost.Python for Python 3.6
   -> The dynamic library was not being compiled, resulting in an empty package. Fixed.
 - Boost.TypeErasure
   -> The dynamic library was not available to install. Fixed.
 - Boost.Serialization
   -> The wserialization dynamic library was being compiled but not available to install. Fixed.

Extras:
 - This commit also contains the post-release fixes, which did not make it into the final release [3].

As always, more information about this release, can be found in [4].

[1]: http://www.boost.org/doc/libs/1_65_0/doc/html/stacktrace.html
[2]: http://www.boost.org/doc/libs/1_65_0/doc/html/poly_collection.html
[3]: http://www.boost.org/patches/
[4]: http://www.boost.org/users/history/version_1_65_0.html

Signed-off-by: Carlos Miguel Ferreira <carlosmf.pt@gmail.com>
  • Loading branch information
ClaymorePT committed Aug 30, 2017
1 parent d4e9a4f commit cf67f5f
Show file tree
Hide file tree
Showing 5 changed files with 395 additions and 121 deletions.
53 changes: 39 additions & 14 deletions libs/boost/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/target.mk

PKG_NAME:=boost
PKG_VERSION:=1.64.0
PKG_SOURCE_VERSION:=1_64_0
PKG_VERSION:=1.65.0
PKG_SOURCE_VERSION:=1_65_0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
PKG_HASH:=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
PKG_HASH:=ea26712742e2fb079c2a566a31f3266973b76e38222b9f88b387e3c8b2f9902c
PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>

Expand All @@ -44,7 +44,7 @@ define Package/boost/Default
endef

define Package/boost/description
This package provides the Boost v1.64 libraries.
This package provides the Boost v1.65 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.

-----------------------------------------------------------------------------
Expand Down Expand Up @@ -80,15 +80,17 @@ This package provides the following run-time libraries:
- python3
- random
- regex
- serialization
- serialization and wserialization
- signals
- stackstrace (new in 1.65.0)
- system
- thread
- timer
- type_erasure
- wave

There are many more header-only libraries supported by Boost.
See more at http://www.boost.org/doc/libs/1_64_0/
See more at http://www.boost.org/doc/libs/1_65_0/
endef

PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
Expand Down Expand Up @@ -302,10 +304,10 @@ $(eval $(call DefineBoostLibrary,context,chrono system thread,))
$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
$(eval $(call DefineBoostLibrary,date_time,,))
#$(eval $(call DefineBoostLibrary,exception,,))
$(eval $(call DefineBoostLibrary,fiber,coroutine,,))
$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
$(eval $(call DefineBoostLibrary,iostreams,,+zlib))
$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma))
$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
$(eval $(call DefineBoostLibrary,math,,))
Expand All @@ -316,10 +318,13 @@ $(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
$(eval $(call DefineBoostLibrary,random,system,))
$(eval $(call DefineBoostLibrary,regex,,))
$(eval $(call DefineBoostLibrary,serialization,,))
$(eval $(call DefineBoostLibrary,wserialization,serialization,))
$(eval $(call DefineBoostLibrary,signals,,))
$(eval $(call DefineBoostLibrary,stacktrace,,))
$(eval $(call DefineBoostLibrary,system,,))
$(eval $(call DefineBoostLibrary,thread,system chrono atomic,))
$(eval $(call DefineBoostLibrary,timer,chrono))
$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))


Expand All @@ -333,7 +338,7 @@ TARGET_LDFLAGS += -pthread -lrt

TARGET_CFLAGS += \
$(if $(CONFIG_PACKAGE_boost-python), -I$(STAGING_DIR)/usr/include/python2.7/) \
$(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.5/) \
$(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.6/) \
$(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC

EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
Expand All @@ -358,11 +363,11 @@ define Build/Compile
( cd $(PKG_BUILD_DIR) ; \
echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
$(if $(CONFIG_PACKAGE_boost-python3), \
echo "using python : 3.5 : $(STAGING_DIR_ROOT)/usr/bin/python3 : $(STAGING_DIR)/usr/include/python3.5/ ;" >> \
echo "using python : 3.6 : : $(STAGING_DIR)/usr/include/python3.6/ : $(STAGING_DIR)/usr/lib/libpython3.6.so ;" >> \
tools/build/src/user-config.jam; \
) \
$(if $(CONFIG_PACKAGE_boost-python), \
echo "using python : 2.7 : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.7/ ;" >> \
echo "using python : 2.7 : : $(STAGING_DIR)/usr/include/python2.7/ : $(STAGING_DIR)/usr/lib/libpython2.7.so ;" >> \
tools/build/src/user-config.jam; \
) \
b2 \
Expand All @@ -389,15 +394,35 @@ define Build/Compile
$(if $(CONFIG_PACKAGE_boost-test),,--without-test) \
$(foreach lib,$(BOOST_LIBS), \
$(if $(findstring python,$(lib)), \
$(if $(or $(CONFIG_PACKAGE_boost-python),$(CONFIG_PACKAGE_boost-python3)),,--without-python), \
$(if $(CONFIG_PACKAGE_boost-python),python=2.7,--without-python), \
$(if $(CONFIG_PACKAGE_boost-$(lib)),,--without-$(lib))) \
) \
$(if $(CONFIG_PACKAGE_boost-locale),boost.locale.iconv=on -sICONV_PATH=$(ICONV_PREFIX) boost.locale.posix=$(if $(USE_MUSL),on,off), \
boost.locale.iconv=off) \
\
$(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
-sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
install \
install ;\
b2 \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
--disable-long-double \
$(if $(CONFIG_boost-variant-release), variant=release,) \
$(if $(CONFIG_boost-variant-debug), variant=debug,) \
$(if $(CONFIG_boost-variant-profile), variant=profile,) \
$(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
$(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
$(if $(CONFIG_boost-shared-libs),link=shared,) \
$(if $(CONFIG_boost-static-libs),link=static,) \
$(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
$(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
$(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
$(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
$(if $(CONFIG_boost-single-thread),threading=single,) \
threading=multi \
$(if $(CONFIG_PACKAGE_boost-python3),--with-python python=3.6,) \
install ;\
)
endef

Expand Down Expand Up @@ -447,7 +472,7 @@ endef

define BuildBoostLibrary
define Package/boost-$(1)/install
$(call Package/boost/Default/install,$$(1),$(1))
$(call Package/boost/Default/install,$$(1),$(1))
endef

$$(eval $$(call BuildPackage,boost-$(1)))
Expand Down

6 comments on commit cf67f5f

@BennyWang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ClaymorePT Why call b2 twice in Build/Compile? I found when I build boost, first time build libraries that only selected in make menuconfig, but second time build all.

@ClaymorePT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BennyWang Well, I know it's strange but so is b2.
To build the Boost Python3 module, b2 needs to be called again, since it cannot build both python2 and python3 modules at the same time.

I have followed the same method used for ArchLinux

@BennyWang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ClaymorePT Thanks, I don't known the python3 issue.
But I think we can check CONFIG_PACKAGE_boost-python3 before call b2 second time, because if I don't check python3 module, then whole boost will be rebuilt.

@ClaymorePT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @BennyWang , the Makefile could check that to prevent calling b2 a second time, but don't worry, Boost is not completely rebuilt since the --with-python python=3.6 is there to tell b2 to just build the Boost.Python module.

But I will take your suggestion and update the Makefile as soon as I can.

@BennyWang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ClaymorePT Thanks

@ClaymorePT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.