|
Boost Users : |
From: Robert Dailey (rcdailey.lists_at_[hidden])
Date: 2019-06-19 15:29:31
Looks like part of this is related to:
https://github.com/boostorg/build/issues/385
However it also seems that the subfeature can't have hyphens in the
name on the command line. I guess those are delimiters. So if I use
`arm` instead of `armeabi-v7a`, it works fine, if I also have a patch
applied due to issue #385
On Wed, Jun 19, 2019 at 9:48 AM Robert Dailey <rcdailey.lists_at_[hidden]> wrote:
>
> I am working on a user-config.jam file to build boost 1.70 against
> Android NDK r19. My jam file looks like this:
>
> ```
> import os ;
>
> local ndk_cxx = [ os.environ CXX ] ;
> local ndk_ar = [ os.environ AR ] ;
> local ndk_ranlib = [ os.environ RANLIB ] ;
> local ndk_flags = [ os.environ CXXFLAGS ] ;
>
> using clang : x86 : "$(ndk_cxx)"
> :
> <cxxflags>"$(ndk_flags)"
> <archiver>"$(ndk_ar)"
> <ranlib>"$(ndk_ranlib)"
> <architecture>x86
> <address-model>32
> <binary-format>x86
> <abi>x86
> ;
>
> using clang : armeabi-v7a : "$(ndk_cxx)"
> :
> <cxxflags>"$(ndk_flags)"
> <archiver>"$(ndk_ar)"
> <ranlib>"$(ndk_ranlib)"
> <architecture>arm
> <address-model>32
> <binary-format>elf
> <abi>aapcs
> ;
> ```
>
> And my command line is:
>
> ```
> ./bootstrap.sh --prefix=$INSTALL_DIR/boost || cat bootstrap.log
> ./b2 -j8 \
> --without-python \
> --without-test \
> target-os=android \
> toolset=clang-${ANDROID_ABI} \
> variant=release \
> threading=multi \
> threadapi=pthread \
> link=static \
> runtime-link=shared \
> install
> ```
>
> When I run the commands above I get:
>
> ```
> /_build/boost_1_70_0/tools/build/src/build/feature.jam:314: in
> implied-subfeature from module feature
> error: "armeabi" is not a known subfeature value of <toolset>clang
> /_build/boost_1_70_0/tools/build/src/build/feature.jam:497: in
> feature.validate-value-string from module feature
> /_build/boost_1_70_0/tools/build/src/build/property.jam:341: in
> validate1 from module property
> /_build/boost_1_70_0/tools/build/src/build/property.jam:367: in
> validate from module property
> /_build/boost_1_70_0/tools/build/src/build/property.jam:376: in
> property.validate-property-sets from module property
> /_build/boost_1_70_0/tools/build/src/build/toolset.jam:187: in
> toolset.flags from module toolset
> /_build/boost_1_70_0/tools/build/src/tools/common.jam:447: in
> common.handle-options from module common
> /_build/boost_1_70_0/tools/build/src/tools/clang-linux.jam:62: in
> clang-linux.init from module clang-linux
> /_build/boost_1_70_0/tools/build/src/build/toolset.jam:44: in
> toolset.using from module toolset
> /_build/boost_1_70_0/tools/build/src/tools/clang.jam:33: in clang.init
> from module clang
> /_build/boost_1_70_0/tools/build/src/build/toolset.jam:44: in
> toolset.using from module toolset
> /_build/boost_1_70_0/tools/build/src/build/project.jam:1104: in using
> from module project-rules
> /home/build/user-config.jam:28: in modules.load from module user-config
> /_build/boost_1_70_0/tools/build/src/build-system.jam:255: in
> load-config from module build-system
> /_build/boost_1_70_0/tools/build/src/build-system.jam:453: in
> load-configuration-files from module build-system
> /_build/boost_1_70_0/tools/build/src/build-system.jam:607: in load
> from module build-system
> /_build/boost_1_70_0/tools/build/src/kernel/modules.jam:295: in import
> from module modules
> /_build/boost_1_70_0/tools/build/src/kernel/bootstrap.jam:139: in
> boost-build from module
> /_build/boost_1_70_0/boost-build.jam:17: in module scope from module
> ```
>
> The value of `ANDROID_ABI` is either `x86` or `armeabi-v7a`. What I'm
> not sure about is this syntax in the JAM file:
>
> ```
> using <platform> : <subfeature> : <toolchain>
> ```
>
> Why is this failing? Can someone explain this strange syntax in the
> JAM file? What is "subfeature" for and what values does it accept? How
> does this map to the command line arguments? How should I best set up
> my user config jam file for providing different build parameters per
> architecture in a cross-compilation setting (building for Android)?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net