<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Trouble compiling scidb source code"
   href="https://bugs.llvm.org/show_bug.cgi?id=35632">35632</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Trouble compiling scidb source code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++11
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>froz3nshade@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19538" name="attach_19538" title="scid clang diagnostic">attachment 19538</a> <a href="attachment.cgi?id=19538&action=edit" title="scid clang diagnostic">[details]</a></span>
scid clang diagnostic

Scidb is a chess program written in C++11. 
I tried to compile the latest revision (r1453) from
<a href="https://svn.code.sf.net/p/scidb/code/trunk">https://svn.code.sf.net/p/scidb/code/trunk</a>

Clang segfaults during compilation (please see attached files).

Clang version is:
$ clang --version
clang version 5.0.1-svn319952-1~exp1 (branches/release_50)

Operating system is Ubuntu 16.04. I am using the official xenial update channel
for llvm.

Since I can't attach individual files I've attached a zip file.

Build log:
#9 0x00007fef8ece868f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x8c868f)
#10 0x000000000083bc55 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/lib/llvm-5.0/bin/clang+0x83bc55)
#11 0x0000000000d055c0 (/usr/lib/llvm-5.0/bin/clang+0xd055c0)
#12 0x0000000000e28f18 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/llvm-5.0/bin/clang+0xe28f18)
#13 0x0000000000d04d47 clang::CodeGenAction::ExecuteAction()
(/usr/lib/llvm-5.0/bin/clang+0xd04d47)
#14 0x0000000000ba1a1e clang::FrontendAction::Execute()
(/usr/lib/llvm-5.0/bin/clang+0xba1a1e)
#15 0x0000000000b6ea16
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/llvm-5.0/bin/clang+0xb6ea16)
#16 0x0000000000c28652
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/llvm-5.0/bin/clang+0xc28652)
#17 0x00000000007fb428 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-5.0/bin/clang+0x7fb428)
#18 0x00000000007e9577 main (/usr/lib/llvm-5.0/bin/clang+0x7e9577)
#19 0x00007fef8d570830 __libc_start_main
/build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
#20 0x00000000007f92e9 _start (/usr/lib/llvm-5.0/bin/clang+0x7f92e9)
Stack dump:
0.      Program arguments: /usr/lib/llvm-5.0/bin/clang -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name db_bpgn_reader.cpp -mrelocation-model
static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-feature -sse2 -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file
/home/bogdb/projects/scidb-code/src/db/db_bpgn_reader.gcno -resource-dir
/usr/lib/llvm-5.0/lib/clang/5.0.1 -I /usr/include/tcl8.6 -D SCI_NAMEBASE_FIX=1
-D BROKEN_LINKER_HACK=1 -D DONT_USE_GDB -D DONT_USE_FRAME_ADDR -I . -I cql -I
sci -I sci/v91 -I sci/v92 -I sci/v93 -I si3 -I cbh -I cbf -I ../mstl -I ../util
-I ../util/libTeXt -I ../util/libharu -I ../util/universalchardet -I
../util/expat -I ../sys -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward
-internal-isystem /usr/include/clang/5.0.1/include/ -internal-isystem
/usr/local/include -internal-isystem /usr/lib/llvm-5.0/lib/clang/5.0.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall
-Wno-mismatched-tags -Wno-gnu -Wno-invalid-source-encoding -Wno-format-security
-std=c++0x -fdeprecated-macro -fdebug-compilation-dir
/home/bogdb/projects/scidb-code/src/db -ferror-limit 19 -fmessage-length 0
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o
db_bpgn_reader.o -x c++ db_bpgn_reader.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'db_bpgn_reader.cpp'.
4.      Running pass 'X86 FP Stackifier' on function
'@_ZN2db10BpgnReader21estimateNumberOfGamesEj'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.1-svn319952-1~exp1 (branches/release_50)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/db_bpgn_reader-1ee9c4.cpp
clang: note: diagnostic msg: /tmp/db_bpgn_reader-1ee9c4.sh
clang: note: diagnostic msg: 

********************
Makefile:161: recipe for target 'db_bpgn_reader.o' failed
make[2]: *** [db_bpgn_reader.o] Error 254
Makefile:205: recipe for target 'recursive' failed
make[1]: *** [recursive] Error 1
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

Hope this helps. 

Best regards,
Bogdan</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>