Boost logo

Boost :

Subject: Re: [boost] [log] Problem Building Boost 1.55 With GCC Using C++11 Mode Due to AVX2 Support
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-08-18 16:30:09


On Mon, Aug 18, 2014 at 9:51 PM, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
> We've run into a problem building log. It doesn't appear to be a known issue and we're not sure how to work around it. We found a hack to make our builds succeed, but there may well be a better workaround and we're not certain whether there are any issues with what we've done.
>
> There are many lines of output; I've elided similar messages to highlight the unique ones:
>
> {standard input}: Assembler messages:
> {standard input}:611: Error: operand type mismatch for `vpsrldq'
> ...
> {standard input}:819: Error: no such instruction: `vextracti128 $0x1,%ymm2,%xmm2'
> ...
> {standard input}:1087: Error: no such instruction: `vextracti128 $0x1,%ymm3,48(%r15)'
> ...
> {standard input}:1312: Error: operand type mismatch for `vpaddb'

There seems to be some problem with your binutils (too old maybe?).
The assembler tool does not recognize AVX2 instructions while the
compilers do support them.

> While there might be a way to actually get b2 to disable AVX2 support, we hacked libs/log/build/Jamfile.v2 with these commands:
>
> sed -i 's:dump_avx2::g' libs/log/build/Jamfile.v2
> sed -i 's:<define>BOOST_LOG_USE_AVX2::g' libs/log/build/Jamfile.v2
>
> Those remove dump_avx2 from BOOST_LOG_COMMON_AVX2_SRC and remove the definition of BOOST_LOG_USE_AVX2, which prevents compiling enable_avx2().
>
> Is there a better way to solve or work around this problem?

There is no switch to disable these optimized routines. The support
for ISA extensions is auto-detected at build time, which makes me
wonder why the config tests for AVX2 were positive in your case. What
does the "compiler-supports-avx2" line say when you invoke b2? If it
says "yes", does it actually succeed to compile (see bin.v2/config.log
and whether there is avx2.o in bin.v2/libs/log/config/x86-ext/...)?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk