title: undefined reference to `pthread_sigmask@GLIBC_2.32' installing diesel_cli
body: <p>I'm trying to install the diesel_cli crate using <code>cargo install diesel_cli</code> however I keep getting this error:</p>
  <pre><code>  = note: /usr/bin/ld: /usr/lib/libpq.so: undefined reference to `pthread_sigmask@GLIBC_2.32'
        collect2: error: ld returned 1 exit status
  
  
    error: aborting due to previous error
  
    error: failed to compile `diesel_cli v1.4.1`, intermediate artifacts can be found at `/tmp/cargo-installM4z849`
  
    Caused by:
      could not compile `diesel_cli`.
  </code></pre>
  <p>Every solution I've found indicates I need to pass a -pthread flag to the compiler, however all the solutions are related to c/c++ where the command is being run manually or with a make file where the flag can easily be added. Is there a way of passing this flag when running the command through cargo install?</p>
  <p>I'm running:</p>
  <ul>
  <li>Cargo version 1.45.0</li>
  <li>rustc version 1.45.0</li>
  <li>Arch linux</li>
  </ul>
  <p>The output of <code>ldd /usr/lib/libpq.so</code>:</p>
  <pre><code>/usr/lib/libpq.so: /usr/lib/libc.so.6: version `GLIBC_2.32' not found (required by /usr/lib/libpq.so)
  linux-vdso.so.1 (0x00007ffd863fa000)
  libssl.so.1.1 =&gt; /usr/lib/libssl.so.1.1 (0x00007f4723fe7000)
  libcrypto.so.1.1 =&gt; /usr/lib/libcrypto.so.1.1 (0x00007f4723d0a000)
  libgssapi_krb5.so.2 =&gt; /usr/lib/libgssapi_krb5.so.2 (0x00007f4723cb5000)
  libldap_r-2.4.so.2 =&gt; /usr/lib/libldap_r-2.4.so.2 (0x00007f4723c5f000)
  libpthread.so.0 =&gt; /usr/lib/libpthread.so.0 (0x00007f4723c3d000)
  libc.so.6 =&gt; /usr/lib/libc.so.6 (0x00007f4723a76000)
  libdl.so.2 =&gt; /usr/lib/libdl.so.2 (0x00007f4723a6e000)
  libkrb5.so.3 =&gt; /usr/lib/libkrb5.so.3 (0x00007f4723988000)
  libk5crypto.so.3 =&gt; /usr/lib/libk5crypto.so.3 (0x00007f4723957000)
  libcom_err.so.2 =&gt; /usr/lib/libcom_err.so.2 (0x00007f4723951000)
  libkrb5support.so.0 =&gt; /usr/lib/libkrb5support.so.0 (0x00007f4723942000)
  libkeyutils.so.1 =&gt; /usr/lib/libkeyutils.so.1 (0x00007f472393b000)
  libresolv.so.2 =&gt; /usr/lib/libresolv.so.2 (0x00007f472391f000)
  liblber-2.4.so.2 =&gt; /usr/lib/liblber-2.4.so.2 (0x00007f472390f000)
  libsasl2.so.3 =&gt; /usr/lib/libsasl2.so.3 (0x00007f47238f1000)
  /usr/lib64/ld-linux-x86-64.so.2 (0x00007f47240f1000)
  </code></pre>