<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 - "CommandLine Error: Option 'filter' registered more than once!" crash on startup in applications using libclang"
   href="https://bugs.llvm.org/show_bug.cgi?id=47117">47117</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"CommandLine Error: Option 'filter' registered more than once!" crash on startup in applications using libclang
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>libclang
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>bero@lindev.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Several applications that use (dynamically linked) libclang crash on startup
with libclang 11-rc1, including doxygen and the Qt6 version of lupdate.

$ ./bin/doxygen 
: CommandLine Error: Option 'filter' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)

Doxygen isn't doing anything funny like mixing shared and static libraries.
The crash seems to happen in a global constructor in libclang, before even
doxygen's main() is called.

#0  0x00007ffff3dd386f in raise () from /lib64/libc.so.6
#1  0x00007ffff3db9538 in abort () from /lib64/libc.so.6
#2  0x00007fffedc4cb39 in llvm::report_fatal_error(llvm::Twine const&, bool) ()
from /usr/lib64/libLLVMSupport.so.11.0
#3  0x00007fffedc4c978 in llvm::report_fatal_error(char const*, bool) () from
/usr/lib64/libLLVMSupport.so.11.0
#4  0x00007fffedc32904 in ?? () from /usr/lib64/libLLVMSupport.so.11.0
#5  0x00007fffedc24044 in ?? () from /usr/lib64/libLLVMSupport.so.11.0
#6  0x00007fffedc2207d in llvm::cl::Option::addArgument() () from
/usr/lib64/libLLVMSupport.so.11.0
#7  0x00007ffff76ff910 in ?? () from /usr/lib64/libclang-cpp.so.11.0
#8  0x00007ffff7702da6 in ?? () from /usr/lib64/libclang-cpp.so.11.0
#9  0x00007ffff7fe1f0e in call_init () from /lib64/ld-linux-x86-64.so.2
#10 0x00007ffff7fe1fec in _dl_init () from /lib64/ld-linux-x86-64.so.2
#11 0x00007ffff7fd20ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#12 0x0000000000000001 in ?? ()
#13 0x00007fffffffd8db in ?? ()
#14 0x0000000000000000 in ?? ()</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>