[llvm-dev] LLVM/Clang version 7.0.0rc2 fails with gcc (Debian 8.2.0-4)
Sedat Dilek via llvm-dev
llvm-dev at lists.llvm.org
Thu Sep 6 06:17:06 PDT 2018
On Wed, Aug 29, 2018 at 4:55 PM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
> On Wed, Aug 29, 2018 at 4:36 PM, Matthias Klose <doko at debian.org> wrote:
>> On 29.08.2018 13:10, Sedat Dilek wrote:
>>> On Wed, Aug 29, 2018 at 9:29 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>>>> On Wed, Aug 29, 2018 at 7:51 AM, Matthias Klose <doko at debian.org> wrote:
>>>>> On 28.08.2018 13:55, Sedat Dilek wrote:
>>>>>> On Tue, Aug 28, 2018 at 10:59 AM, Hans Wennborg <hans at chromium.org> wrote:
>>>>>>> On Tue, Aug 28, 2018 at 10:26 AM, Sedat Dilek via llvm-dev
>>>>>>> <llvm-dev at lists.llvm.org> wrote:
>>>>>>>> On Mon, Aug 27, 2018 at 6:09 PM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have not sent yet any bug-reports to llvm-dev but I am seeing this
>>>>>>>>> build-failure:
>>>>>>>>>
>>>>>>>>> ...
>>>>>>>>> [574/3685] Building CXX object
>>>>>>>>> lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o
>>>>>>>>> FAILED: lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o
>>>>>>>>> /usr/bin/g++-8 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE
>>>>>>>>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>>>>>>>>> -Ilib/Bitcode/Reader
>>>>>>>>> -I/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader -Iinclude
>>>>>>>>> -I/home/sdi/src/llvm-toolchain/llvm/include -fPIC
>>>>>>>>> -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra
>>>>>>>>> -Wno-unused-parameter -Wwrite-strings -Wcast-qual
>>>>>>>>> -Wno-missing-field-initializers -pedantic -Wno-long-long
>>>>>>>>> -Wno-maybe-uninitialized -Wno-class-memaccess
>>>>>>>>> -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color
>>>>>>>>> -ffunction-sections -fdata-sections -O3 -UNDEBUG -fno-exceptions
>>>>>>>>> -fno-rtti -MD -MT
>>>>>>>>> lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o
>>>>>>>>> -MF lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d
>>>>>>>>> -o lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o
>>>>>>>>> -c /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
>>>>>>>>> /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:
>>>>>>>>> In member function 'llvm::Error
>>>>>>>>> llvm::MetadataLoader::MetadataLoaderImpl::parseOneMetadata(llvm::SmallVectorImpl<long
>>>>>>>>> unsigned int>&, unsigned int,
>>>>>>>>> {anonymous}::{anonymous}::PlaceholderQueue&, llvm::StringRef, unsigned
>>>>>>>>> int&)':
>>>>>>>>> /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:1771:1:
>>>>>>>>> internal compiler error: Segmentation fault
>>>>>>>>> }
>>>>>>>>> ^
>>>>>>>>> Please submit a full bug report,
>>>>>>>>> with preprocessed source if appropriate.
>>>>>>>>> See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions.
>>>>>>>>>
>>>>>>>>> root at inizai# gcc --version
>>>>>>>>> gcc (Debian 8.2.0-4) 8.2.0
>>>>>>>>> Copyright (C) 2018 Free Software Foundation, Inc.
>>>>>>>>> This is free software; see the source for copying conditions. There is NO
>>>>>>>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>>>>>>>>
>>>>>>>>> Is that a known issue?
>>>>>>>>> Any workoround or fix available?
>>>>>>>>>
>>>>>>>>
>>>>>>>> Building with my selfmade llvm-toolchain was successful.
>>>>>>>> So this seems to be a GCC bug.
>>>>>>>
>>>>>>> I tried building the 7.0.0 branch with a vanilla gcc 8.2.0 build, but
>>>>>>> I couldn't reproduce the error.
>>>>>>>
>>>>>>> Have you reported the bug to the gcc bugzilla?
>>>>>>>
>>>>>>> Even if it's not an LLVM bug, it would be unfortunate if the release
>>>>>>> doesn't build with Debian's gcc, so it would be good to get to the
>>>>>>> bottom of this.
>>>>>>>
>>>>>>
>>>>>> [ CC debian-gcc and Matthias Klose ]
>>>>>>
>>>>>> My last GCC bug report is a while ago.
>>>>>> Maybe this is a known issue in the Debian world.
>>>>>>
>>>>>> Adding my scripts for the sake of completeness.
>>>>>
>>>>> Debian's GCC is built from the gcc-8-branch. See gcc -v how it is configured.
>>>>> You didn't tell how you configured your GCC build. Please provide the
>>>>> preprocessed source and the command line options used for the build.
>>>>>
>>>>
>>>> Hi Matthias,
>>>>
>>>> not sure if I understand this correctly, I am using the GCC from
>>>> Debian/buster not a selfmade one.
>>>>
>>>> root at iniza# gcc-8 -v
>>>> Using built-in specs.
>>>> COLLECT_GCC=gcc-8
>>>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
>>>> OFFLOAD_TARGET_NAMES=nvptx-none
>>>> OFFLOAD_TARGET_DEFAULT=1
>>>> Target: x86_64-linux-gnu
>>>> Configured with: ../src/configure -v --with-pkgversion='Debian
>>>> 8.2.0-4' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
>>>> --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++
>>>> --prefix=/usr --with-gcc-major-version-only --program-suffix=-8
>>>> --program-prefix=x86_64-linux-gnu- --enable-shared
>>>> --enable-linker-build-id --libexecdir=/usr/lib
>>>> --without-included-gettext --enable-threads=posix --libdir=/usr/lib
>>>> --enable-nls --with-sysroot=/ --enable-clocale=gnu
>>>> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
>>>> --with-default-libstdcxx-abi=new --enable-gnu-unique-object
>>>> --disable-vtable-verify --enable-libmpx --enable-plugin
>>>> --enable-default-pie --with-system-zlib --with-target-system-zlib
>>>> --enable-objc-gc=auto --enable-multiarch --disable-werror
>>>> --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
>>>> --enable-multilib --with-tune=generic
>>>> --enable-offload-targets=nvptx-none --without-cuda-driver
>>>> --enable-checking=release --build=x86_64-linux-gnu
>>>> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>>>> Thread model: posix
>>>> gcc version 8.2.0 (Debian 8.2.0-4)
>>>>
>>>> I have to check how to get the full cmake line(s) and the preprocessed
>>>> source file.
>>>>
>>>> Thanks.
>>>>
>>>> Regards,
>>>> - Sedat -
>>>
>>> Hi Matthias,
>>>
>>> I hope this got all informations you need?
>>>
>>> [ gcc-bug_preprocessed.sh ]
>>>
>>> LANG=C
>>>
>>> cd build
>>>
>>> /usr/bin/g++-8 \
>>> -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE \
>>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
>>> -Ilib/Bitcode/Reader \
>>> -I/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader
>>> -Iinclude -I/home/sdi/src/llvm-toolchain/llvm/include \
>>> -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11
>>> -Wall -Wextra \
>>> -Wno-unused-parameter -Wwrite-strings -Wcast-qual \
>>> -Wno-missing-field-initializers -pedantic -Wno-long-long \
>>> -Wno-maybe-uninitialized -Wno-class-memaccess \
>>> -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color \
>>> -ffunction-sections -fdata-sections -O3 -UNDEBUG -fno-exceptions \
>>> -fno-rtti -MD -MT \
>>> lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o \
>>> -MF lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d
>>> \
>>> -o lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o
>>> \
>>> -c /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
>>>
>>> /usr/bin/g++-8 \
>>> -o /tmp/preprocessed.ii \
>>> -I/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader
>>> -Iinclude -I/home/sdi/src/llvm-toolchain/llvm/include \
>>> -E /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
>>
>> I get errors when running this command. I assume the first command is the one
>> which is run by the build process. Please could you just run that one with an
>> additional -save-temps option and then send the (compressed) MetadataLoader.ii?
>>
>
> Hi Matthias,
>
> thank you for jumping in this issue.
>
> I have collected all relevant files in the attached tarball.
>
> Hope that helps you.
>
> Regards,
> - Sedat -
>
> P.S.: List content of for-doko directory
>
> sdi at iniza:~/src/llvm-toolchain$ LC_ALL=C ls -lhR for-doko/
> for-doko/:
> total 4.5M
> -rw-r--r-- 1 sdi sdi 271K Aug 29 16:47 MetadataLoader.cpp.o
> -rw-r--r-- 1 sdi sdi 20K Aug 29 16:47 MetadataLoader.cpp.o.d
> -rw-r--r-- 1 sdi sdi 3.6M Aug 29 16:47 MetadataLoader.ii
> -rw-r--r-- 1 sdi sdi 603K Aug 29 16:47 MetadataLoader.s
> -rwxr-xr-x 1 sdi sdi 1009 Aug 29 16:46 gcc-bug_preprocessed_doko.sh
> -rw-r--r-- 1 sdi sdi 602 Aug 29 16:50 ls-lh.txt
Hi Matthias,
do you had a chance to look into this issue?
I have pulled latest commits from release_70 Git branches (see below) ...
$ cd llvm-git/
$ git log --oneline -1
a5b9a59eac78 (HEAD -> release_70, origin/release_70) Merging r341512:
------------------------------------------------------------------------
r341512 | ctopper | 2018-09-06 04:03:14 +0200 (Thu, 06 Sep 2018) | 7
lines
$ cd tools/clang/
$ git log --oneline -1
958eec8d4243 (HEAD -> release_70, origin/release_70) ReleaseNotes: tiny tweak
$ cd ../../projects/compiler-rt/
$ git log --oneline -1
a4cbb02bca3b (HEAD -> release_70, origin/release_70) Merging r341442:
------------------------------------------------------------------------
r341442 | bcain | 2018-09-05 04:15:54 +0200 (Wed, 05 Sep 2018) | 8
lines
..and was able to build and install with gcc-8 (8.2.0-4).
Just wanted to let you know.
Thanks.
Regards,
- Sedat -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_clang-with-ninja.sh
Type: application/x-shellscript
Size: 2283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180906/39acddd8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: install_clang-with-ninja.sh
Type: application/x-shellscript
Size: 1265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180906/39acddd8/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clone_llvm-git.sh
Type: application/x-shellscript
Size: 571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180906/39acddd8/attachment-0002.bin>
More information about the llvm-dev
mailing list