Dmitry Golovin via llvm-dev
2017-Jun-02 14:49 UTC
[llvm-dev] Failed to build libunwind the libcxx's __config header
I'm building LLVM with Clang, LLD, compiler-rt, libunwind, libcxx and libcxxabi. I'm using GCC 7.1.1 and binutils 2.28.0 to build. The compilation is aborted during libunwind build due to gcc not being able to parse libcxx's __config: /usr/bin/cc -DLLVM_BUILD_GLOBAL_ISEL -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/libunwind/src -I../projects/libunwind/src -Iinclude -I../include -I../projects/libunwind/include -I../projects/libcxx/include -fPIC -Werror=date-time -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment -ffunction-sections -fdata-sections -O3 -DNDEBUG -Werror=return-type -W -Wall -Wchar-subscripts -Wconversion -Wmissing-braces -Wno-unused-function -Wshadow -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings -Wundef -Wno-error -pedantic -D_DEBUG -UNDEBUG -D_LIBUNWIND_IS_NATIVE_ONLY -fPIC -fno-exceptions -funwind-tables -std=c99 -fPIC -Werror=date-time -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment -ffunction-sections -fdata-sections -funwind-tables -MD -MT projects/libunwind/src/CMakeFiles/unwind_objects.dir/UnwindLevel1.c.o -MF projects/libunwind/src/CMakeFiles/unwind_objects.dir/UnwindLevel1.c.o.d -o projects/libunwind/src/CMakeFiles/unwind_objects.dir/UnwindLevel1.c.o -c ../projects/libunwind/src/UnwindLevel1.c In file included from ../projects/libcxx/include/inttypes.h:234:0, from ../projects/libunwind/src/UnwindLevel1.c:22: ../projects/libcxx/include/__config:1140:18: error: missing binary operator before token "(" __has_feature(attribute_availability_with_strict) && \ ^ The exact line that fails: https://github.com/llvm-mirror/libcxx/blob/master/include/__config#L1140 Does anyone else have this problem? What can possibly cause such error? Regards, Dmitry
Tim Northover via llvm-dev
2017-Jun-02 15:06 UTC
[llvm-dev] Failed to build libunwind the libcxx's __config header
Hi Dmitry, On 2 June 2017 at 07:49, Dmitry Golovin via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Does anyone else have this problem? What can possibly cause such error?G++ doesn't support __has_feature, so it should be picking up the default "#define __has_feature(__x) 0" further up in __config. The preprocessed output (via "-E -dD") would be interesting to diagnose the issue, if no-one else has seen it before. Cheers. Tim.
Dmitry Golovin via llvm-dev
2017-Jun-02 15:30 UTC
[llvm-dev] Failed to build libunwind the libcxx's __config header
Hi Tim, You can find the preprocessed UnwindLevel1.c and UnwindLevel1-gcc-ext.c attached. Regards, Dmitry 02.06.2017, 18:06, "Tim Northover" <t.p.northover at gmail.com>:> Hi Dmitry, > > On 2 June 2017 at 07:49, Dmitry Golovin via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Does anyone else have this problem? What can possibly cause such error? > > G++ doesn't support __has_feature, so it should be picking up the > default "#define __has_feature(__x) 0" further up in __config. The > preprocessed output (via "-E -dD") would be interesting to diagnose > the issue, if no-one else has seen it before. > > Cheers. > > Tim.-------------- next part -------------- A non-text attachment was scrubbed... Name: UnwindLevel1-gcc-ext.c.pp Type: application/octet-stream Size: 160363 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/77fee23e/attachment-0002.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: UnwindLevel1.c.pp Type: application/octet-stream Size: 173121 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/77fee23e/attachment-0003.obj>
Dmitry Golovin via llvm-dev
2017-Jun-02 15:35 UTC
[llvm-dev] Failed to build libunwind the libcxx's __config header
Hi Tim, You can find the preprocessed UnwindLevel1.c and UnwindLevel1-gcc-ext.c attached. I first sent it without compression, so it turned out to be over 100Kb and should be approved first before it can make to the mailing list, so I gzipped the files. Expect to get a duplicate of this message when the first copy gets its approval. Regards, Dmitry 02.06.2017, 18:06, "Tim Northover" <t.p.northover at gmail.com>:> Hi Dmitry, > > On 2 June 2017 at 07:49, Dmitry Golovin via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Does anyone else have this problem? What can possibly cause such error? > > G++ doesn't support __has_feature, so it should be picking up the > default "#define __has_feature(__x) 0" further up in __config. The > preprocessed output (via "-E -dD") would be interesting to diagnose > the issue, if no-one else has seen it before. > > Cheers. > > Tim.-------------- next part -------------- A non-text attachment was scrubbed... Name: preprocessed.tar.gz Type: application/x-gzip Size: 55987 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/e5e7f6cd/attachment-0001.bin>