Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors building boost on windows "#error "Not ARM"" & "error: No best alternative for"

I am building boost on windows with mingw and getting errors such as "#error "Not ARM"" or "error: No best alternative for...". Are these errors that I should be worried about or is it just testing the system it is building on? There is a lot of noise in the default output but put a compressed version of the output bellow. Thanks

...found 13 targets...
...updating 5 targets...
common.mkdir bbuild\boost\bin.v2\libs\context
common.mkdir bbuild\boost\bin.v2\libs\context\config
common.mkdir bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1
common.mkdir bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1\debug
gcc.compile.c++ bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1\debug\32.o
...updated 5 targets...
Performing configuration checks

    - 32-bit                   : yes
...found 2 targets...
...updating 1 target...
gcc.compile.c++ bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1\debug\arm.o
E:\boost_1_54_0_win\libs\context\config\arm.cpp:12:2: error: #error "Not ARM"
 #error "Not ARM"
  ^

    "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g  -DBOOST_ALL_NO_LIB=1  -I"." -c -o "bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1\debug\arm.o" "E:\boost_1_54_0_win\libs\context\config\arm.cpp"

...failed gcc.compile.c++ bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1\debug\arm.o...
...failed updating 1 target...
    - arm                      : no
...found 2 targets...
...updating 1 target...
gcc.compile.c++ bbuild\boost\bin.v2\libs\context\config\gcc-mingw-4.8.1\debug\mips1.o
E:\boost_1_54_0_win\libs\context\config\mips1.cpp:10:2: error: #error "Not MIPS1"
 #error "Not MIPS1"
...
 #error "Not PPC"
...
 #error "Not SPARC"
...
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
...
libs\locale\src\..\build\has_icu_test.cpp:12:30: fatal error: unicode/uversion.h: No such file or directory
 #include <unicode/uversion.h>
                              ^
compilation terminated.
...
gcc.compile.c++ bbuild\boost\bin.v2\libs\locale\build\gcc-mingw-4.8.1\debug\has_icu64_obj.o
libs\locale\src\..\build\has_icu_test.cpp:12:30: fatal error: unicode/uversion.h: No such file or directory
 #include <unicode/uversion.h>
                              ^
compilation terminated.
...
g++: error: unrecognized command line option '-shared-libstdc++'
...
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
...
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
    - zlib                     : yes (cached)
    - zlib                     : yes (cached)
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
error: No best alternative for libs/coroutine/build/allocator_sources
    next alternative: required properties: <link>static <target-os>windows <threading>multi
        not matched
    next alternative: required properties: <link>static <segmented-stacks>on <threading>multi
        not matched
    next alternative: required properties: <link>static <threading>multi
        not matched
    - zlib                     : yes (cached)
...

Component configuration:

    - atomic                   : building
    - chrono                   : building
    - context                  : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : building
...
like image 872
user1404617 Avatar asked Nov 01 '22 13:11

user1404617


1 Answers

It's a bug in boost-1.54. You could open file lib/coroutine/build/Jamfile.v2 and replace this line:

    explicit yield_sources ;

with

    explicit allocator_sources ;

or wait for boost-1.55

like image 117
olk Avatar answered Nov 04 '22 06:11

olk