<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/54480>54480</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-14 on RISC-V 64bit: Illegal instruction / #0 0x0000003fc00dacd8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          sanderjo
      </td>
    </tr>
</table>

<pre>
    Debian on RISC-V: clang-14 (and clang-13) gives the following.

Tips how to solve? Or will I get flamed because it's a Debian thing, or a noob thing?

```
$ clang-14 --version
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang-14 --version
1.      Compilation construction
#0 0x0000003fc00dacd8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8)
Illegal instruction
```

```
sipeed@sipeed:~$ ll /usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8
ls: cannot access '/usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8': No such file or directory

```
Hmmm, not good. Let's see what does exist:
```
sipeed@sipeed:~$ ll /usr/lib/riscv64-linux-gnu/libLLVM-1*
lrwxrwxrwx 1 root root       15 Mar  6 01:50 /usr/lib/riscv64-linux-gnu/libLLVM-13.0.1.so.1 -> libLLVM-13.so.1
lrwxrwxrwx 1 root root       15 Mar  6 01:50 /usr/lib/riscv64-linux-gnu/libLLVM-13.so -> libLLVM-13.so.1
-rw-r--r-- 1 root root 82786872 Mar  6 01:50 /usr/lib/riscv64-linux-gnu/libLLVM-13.so.1
lrwxrwxrwx 1 root root       15 Mar 11 18:28 /usr/lib/riscv64-linux-gnu/libLLVM-14.0.0.so.1 -> libLLVM-14.so.1
lrwxrwxrwx 1 root root       15 Mar 11 18:28 /usr/lib/riscv64-linux-gnu/libLLVM-14.so -> libLLVM-14.so.1
-rw-r--r-- 1 root root 92293248 Mar 11 18:28 /usr/lib/riscv64-linux-gnu/libLLVM-14.so.1
```

So clang-14 is pointing to a non-existing file?

A symlink does not solve it:

```
sipeed@sipeed:~$ sudo ln -s /usr/lib/riscv64-linux-gnu/libLLVM-14.so.1 /usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8

sipeed@sipeed:~$ file /usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8
/usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8: symbolic link to /usr/lib/riscv64-linux-gnu/libLLVM-14.so.1


sipeed@sipeed:~$ clang-14 --version
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang-14 --version
1.      Compilation construction
#0 0x0000003fdd756cd8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/riscv64-linux-gnu/libLLVM-14.so.1+0xe6ccd8)
Illegal instruction


```

Tips how to proceed?

```
sipeed@sipeed:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bookworm/sid
Release:        unstable
Codename:       sid
```
```
sipeed@sipeed:~$ uname -a
Linux sipeed 5.4.61 #217 PREEMPT Thu Dec 30 06:50:31 UTC 2021 riscv64 GNU/Linux
sipeed@sipeed:~$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztV1tzmzoQ_jX4ZQcGBAb84IdcnHMy4_RkmrSvHYFkUCOQRxJ28u_PSjhO6qZpc-mZ6cyRGQxaaffbq5ZKsbv5Ka8E7UH18PH86iT8HKRHUEvaN2GSQUBK2rP79zQgM2jEhhuwLYeVklJtRd9EQ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