[log] Problem Building Boost 1.55 With GCC Using C++11 Mode Due to AVX2 Support
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.
We tried to build Boost 1.55 with GCC 4.8.1, 4.8.3, and 4.9.1 with the following commands:
./bootstrap.sh --prefix=<prefix> --libdir=<prefix>/lib --with-toolset=gcc
./b2 --build-type=complete --layout=versioned 'cxxflags=-m64 -O2 -g -pipe' 'cflags=-m64 -O2 -g -pipe' 'linkflags=-Wl,-rpath -Wl,<prefix>/lib -L
On Mon, Aug 18, 2014 at 9:51 PM, Stewart, Robert
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/...)?
Andrey Semashev wrote:
On Mon, Aug 18, 2014 at 9:51 PM, Stewart, Robert
wrote: We've run into a problem building log.
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.
We were able to update binutils and that solved the problem. Thanks! _____ Rob Stewart robert.stewart@sig.com Software Engineer, Middleware using std::disclaimer; Susquehanna International Group, LLP http://www.sig.com ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
participants (2)
-
Andrey Semashev
-
Stewart, Robert