From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/2] boost: make build with python an option
Date: Tue, 4 Mar 2014 19:02:32 +0100 [thread overview]
Message-ID: <20140304190232.4a927d29@skate> (raw)
In-Reply-To: <1393952027-21201-2-git-send-email-johan.derycke@barco.com>
Dear Johan Derycke,
Thanks a lot for your persistence with those patches, really
appreciated!
On Tue, 4 Mar 2014 17:53:47 +0100, Johan Derycke wrote:
> +config BR2_PACKAGE_BOOST_PYTHON
> + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
> + bool "boost-python"
Ok, so this means that boost::python is compatible with Python 3, which
seems to match various claims I've seen on the web.
> # 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+
> -BOOST_WITHOUT_FLAGS = atomic coroutine log python
> +BOOST_WITHOUT_FLAGS = atomic coroutine log
>
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context)
> @@ -40,6 +40,7 @@ BOOST_WITHOUT_FLAGS += $(if
> $(BR2_PACKAGE_BOOST_LOCALE),,locale)
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MATH),,math)
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MPI),,mpi)
> BOOST_WITHOUT_FLAGS += $(if
> $(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),,program_options)
> +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PYTHON),,python)
Ok.
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_RANDOM),,random)
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_REGEX),,regex)
> BOOST_WITHOUT_FLAGS += $(if
> $(BR2_PACKAGE_BOOST_SERIALIZATION),,serialization)
> @@ -50,6 +51,8 @@ BOOST_WITHOUT_FLAGS += $(if
> $(BR2_PACKAGE_BOOST_THREAD),,thread)
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TIMER),,timer)
> BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave)
>
> +BOOST_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
> +
> ifeq ($(BR2_PACKAGE_ICU),y)
> BOOST_FLAGS += --with-icu=$(STAGING_DIR)/usr
> BOOST_DEPENDENCIES += icu
> @@ -61,6 +64,12 @@ ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y)
> BOOST_DEPENDENCIES += bzip2 zlib
> endif
>
> +ifeq ($(BR2_PACKAGE_BOOST_PYTHON),y)
> +BOOST_FLAGS += --with-python-root=$(HOST_DIR)
Depending on what Boost needs exactly, this might be correct or not. It
is correct to find a Python interpreter that runs on the build machine.
But Boost uses that to ask the Python interpreter various details about
the Python installation (such as the location of Python modules, the
cross-compiler to use, etc.), then it will be wrong. I guess I'll have
to have a look.
> +BOOST_TARGET_CXXFLAGS
> += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)/
> +BOOST_DEPENDENCIES += python
This isn't going to work with Python 3. It should be:
ifeq ($(BR2_PACKAGE_PYTHON3),y)
BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
BOOST_DEPENDENCIES += python3
else
BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
BOOST_DEPENDENCIES += python
endif
> +endif
> +
> HOST_BOOST_OPT += toolset=gcc threading=multi variant=release link=shared
> \
> runtime-link=shared
>
> @@ -84,7 +93,7 @@ BOOST_FLAGS += $(if
> $(BOOST_WITHOUT_FLAGS_COMMASEPERATED), --without-libraries=$
>
> define BOOST_CONFIGURE_CMDS
> (cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS))
> - echo "using gcc : $(TARGET_CC_VERSION) : $(TARGET_CXX) :
> <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" >
> $(@D)/user-config.jam
> + echo "using gcc : $(TARGET_CC_VERSION) : $(TARGET_CXX) :
> <cxxflags>\"$(BOOST_TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;"
> > $(@D)/user-config.jam
> echo "" >> $(@D)/user-config.jam
> endef
>
Ok.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-03-04 18:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 16:53 [Buildroot] [PATCH v3 1/2] python-libconfig: new package Johan Derycke
2014-03-04 16:53 ` [Buildroot] [PATCH v3 2/2] boost: make build with python an option Johan Derycke
2014-03-04 18:02 ` Thomas Petazzoni [this message]
2014-03-04 17:58 ` [Buildroot] [PATCH v3 1/2] python-libconfig: new package Thomas Petazzoni
2014-03-05 14:10 ` Derycke, Johan
-- strict thread matches above, loose matches on Subject: below --
2014-03-04 16:59 [Buildroot] [PATCH v3 2/2] boost: make build with python an option Johan Derycke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140304190232.4a927d29@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.