Sedat Dilek via llvm-dev
2018-Aug-29 08:18 UTC
[llvm-dev] Get full cmake lines and prepocessed source for a GCC bug report
On Wed, Aug 29, 2018 at 10:14 AM, Hans Wennborg <hans at chromium.org> wrote:> On Wed, Aug 29, 2018 at 9:45 AM, Sedat Dilek via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Hi, >> >> for filing a GCC v8.2.0 bug in Debian/buster AMD64 the Debian/GCC >> mainatiners want two things... >> >> [ FULL CMAKE LINE ] >> >> How do I configure this in the LLVM/Clang build? >> Can I set an option of cmake? >> >> [ PREPROCESSED SOURCE FILES ] >> >> How and where do I get the preprocessed source? >> Do I need to set options for this in my build-script? > > From your other email, when the compiler crashed, ninja printed the invocation: > > /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 > > > To generate preprocessed source from that, you use the -E flag, so > adding something like this to the end of command-line should work: > > -E -o /tmp/preprocessed.ii > > > To see the internal GCC invocation, you can add the -### option to the > command. The output of that, and the preprocessed source, should be > enough to reproduce the bug. >Thanks, Hans. I kept the build-directory of my build with my selfmade llvm-toolchain v7.0.0rc2. So I can run this gcc-line directly? - sed@ -
Hans Wennborg via llvm-dev
2018-Aug-29 08:53 UTC
[llvm-dev] Get full cmake lines and prepocessed source for a GCC bug report
On Wed, Aug 29, 2018 at 10:18 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote:> On Wed, Aug 29, 2018 at 10:14 AM, Hans Wennborg <hans at chromium.org> wrote: >> On Wed, Aug 29, 2018 at 9:45 AM, Sedat Dilek via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >>> Hi, >>> >>> for filing a GCC v8.2.0 bug in Debian/buster AMD64 the Debian/GCC >>> mainatiners want two things... >>> >>> [ FULL CMAKE LINE ] >>> >>> How do I configure this in the LLVM/Clang build? >>> Can I set an option of cmake? >>> >>> [ PREPROCESSED SOURCE FILES ] >>> >>> How and where do I get the preprocessed source? >>> Do I need to set options for this in my build-script? >> >> From your other email, when the compiler crashed, ninja printed the invocation: >> >> /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 >> >> >> To generate preprocessed source from that, you use the -E flag, so >> adding something like this to the end of command-line should work: >> >> -E -o /tmp/preprocessed.ii >> >> >> To see the internal GCC invocation, you can add the -### option to the >> command. The output of that, and the preprocessed source, should be >> enough to reproduce the bug. >> > > Thanks, Hans. > > I kept the build-directory of my build with my selfmade llvm-toolchain > v7.0.0rc2. > > So I can run this gcc-line directly?Yes, I think that should work.
Sedat Dilek via llvm-dev
2018-Aug-29 10:20 UTC
[llvm-dev] Get full cmake lines and prepocessed source for a GCC bug report
On Wed, Aug 29, 2018 at 10:53 AM, Hans Wennborg <hans at chromium.org> wrote:> On Wed, Aug 29, 2018 at 10:18 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote: >> On Wed, Aug 29, 2018 at 10:14 AM, Hans Wennborg <hans at chromium.org> wrote: >>> On Wed, Aug 29, 2018 at 9:45 AM, Sedat Dilek via llvm-dev >>> <llvm-dev at lists.llvm.org> wrote: >>>> Hi, >>>> >>>> for filing a GCC v8.2.0 bug in Debian/buster AMD64 the Debian/GCC >>>> mainatiners want two things... >>>> >>>> [ FULL CMAKE LINE ] >>>> >>>> How do I configure this in the LLVM/Clang build? >>>> Can I set an option of cmake? >>>> >>>> [ PREPROCESSED SOURCE FILES ] >>>> >>>> How and where do I get the preprocessed source? >>>> Do I need to set options for this in my build-script? >>> >>> From your other email, when the compiler crashed, ninja printed the invocation: >>> >>> /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 >>> >>> >>> To generate preprocessed source from that, you use the -E flag, so >>> adding something like this to the end of command-line should work: >>> >>> -E -o /tmp/preprocessed.ii >>> >>> >>> To see the internal GCC invocation, you can add the -### option to the >>> command. The output of that, and the preprocessed source, should be >>> enough to reproduce the bug. >>> >> >> Thanks, Hans. >> >> I kept the build-directory of my build with my selfmade llvm-toolchain >> v7.0.0rc2. >> >> So I can run this gcc-line directly? > > Yes, I think that should work.sdi at iniza:~/src/llvm-toolchain$ ./scripts/gcc-bug.sh sdi at iniza:~/src/llvm-toolchain$ find build/ -name '*MetadataLoader*' build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d sdi at iniza:~/src/llvm-toolchain$ LC_ALL=C ls -lh build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d -rw-r--r-- 1 sdi sdi 271K Aug 29 12:15 build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o -rw-r--r-- 1 sdi sdi 20K Aug 29 12:15 build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d Above seems to generate the files correctly? No, Error messages. sdi at iniza:~/src/llvm-toolchain$ LC_ALL=C ./scripts/gcc-bug_preprocessed-source.sh cc1plus: error: output filename specified twice cc1plus: error: too many filenames given. Type cc1plus --help for usage cc1plus: fatal error: /tmp/preprocessed.d: No such file or directory compilation terminated. What's wrong with the 2nd run when trying to generate preprocessed.ii? I tried to replace/move... - -o lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o \ + -E -o /tmp/preprocessed.ii \ Thanks. - Sedat - -------------- next part -------------- A non-text attachment was scrubbed... Name: gcc-bug.sh Type: application/x-shellscript Size: 986 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180829/84a8301f/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: gcc-bug_preprocessed-source.sh Type: application/x-shellscript Size: 1016 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180829/84a8301f/attachment-0001.bin>
Sedat Dilek via llvm-dev
2018-Aug-29 10:28 UTC
[llvm-dev] Get full cmake lines and prepocessed source for a GCC bug report
On Wed, Aug 29, 2018 at 10:53 AM, Hans Wennborg <hans at chromium.org> wrote:> On Wed, Aug 29, 2018 at 10:18 AM, Sedat Dilek <sedat.dilek at gmail.com> wrote: >> On Wed, Aug 29, 2018 at 10:14 AM, Hans Wennborg <hans at chromium.org> wrote: >>> On Wed, Aug 29, 2018 at 9:45 AM, Sedat Dilek via llvm-dev >>> <llvm-dev at lists.llvm.org> wrote: >>>> Hi, >>>> >>>> for filing a GCC v8.2.0 bug in Debian/buster AMD64 the Debian/GCC >>>> mainatiners want two things... >>>> >>>> [ FULL CMAKE LINE ] >>>> >>>> How do I configure this in the LLVM/Clang build? >>>> Can I set an option of cmake? >>>> >>>> [ PREPROCESSED SOURCE FILES ] >>>> >>>> How and where do I get the preprocessed source? >>>> Do I need to set options for this in my build-script? >>> >>> From your other email, when the compiler crashed, ninja printed the invocation: >>> >>> /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 >>> >>> >>> To generate preprocessed source from that, you use the -E flag, so >>> adding something like this to the end of command-line should work: >>> >>> -E -o /tmp/preprocessed.ii >>> >>> >>> To see the internal GCC invocation, you can add the -### option to the >>> command. The output of that, and the preprocessed source, should be >>> enough to reproduce the bug. >>> >> >> Thanks, Hans. >> >> I kept the build-directory of my build with my selfmade llvm-toolchain >> v7.0.0rc2. >> >> So I can run this gcc-line directly? > > Yes, I think that should work.[ 2nd tryout ] sdi at iniza:~/src/llvm-toolchain$ LANG=C rm -v build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d removed 'build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o' removed 'build/lib/Bitcode/Reader/CMakeFiles/LLVMBitReader.dir/MetadataLoader.cpp.o.d' sdi at iniza:~/src/llvm-toolchain$ ./scripts/gcc-bug_preprocessed.sh # 1 "/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "<command-line>" 2 # 1 "/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp" # 10 "/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp" # 1 "/home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.h" 1 In file included from /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:10: /home/sdi/src/llvm-toolchain/llvm/lib/Bitcode/Reader/MetadataLoader.h:17:10: fatal error: llvm/ADT/SmallVector.h: No such file or directory #include "llvm/ADT/SmallVector.h" ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. New script attached. - Sedat - -------------- next part -------------- A non-text attachment was scrubbed... Name: gcc-bug_preprocessed.sh Type: application/x-shellscript Size: 1085 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180829/41baa656/attachment.bin>