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

    <tr>
        <th>Summary</th>
        <td>
            building with OpenMP complains local libpython installation is not PIC
        </td>
    </tr>

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

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

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

<pre>
    I'm building `clang` and `openmp` using the `LLVM_ENABLE_PROJECTS` option:
```cmake
cmake -G Ninja -DLLVM_ENABLE_PROJECTS='clang;openmp' -DLLVM_ENABLE_PIC=ON -DCMAKE_BUILD_TYPE=Release ../llvm
cmake --build .
```
and the compiler complains:
```
FAILED: projects/openmp/libompd/gdb-plugin/python-module/ompd/ompdModule.so
: && ......<some falgs>..... /opt/local/lib/libpython3.9.a -ldl && :
.......ld: /opt/local/lib/libpython3.9.a(XXXX.o): relocation R_X86_64_32 against symbol XXX can not be used when making a shared object; recompile with -fPIC
```

The problem is, i have no permission to recompile and modify the system `libpython` build (and that's why i'm building clang form source code), do we have any options to remove the dependency on local libpython libraries?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVF2PqzYQ_TXOywjE2oGEBx7yWaXNfmi7rdKnyOAJ-F5jI2w2yr-vbGf39n48NIrAHoaZMz7nwK2VrUasSL4m-XbGJ9eZsaqRa2euqGa1EbfqQOiih3qSSkjdAimyRnHdkiIDroXfmwF1P_jAZH2K69CHj8e_H8-7p9X6uDu_vD7_vtu8_emTzOCk0YStSLYl2YoUWfw3Pf-KMRaWkPwGT1J_4ZBsf1mLbQldRDBsfQdBFz9mHzaEbZ-fINluHld_7M7rvw7H7fntn5cdYdtXVMgtQpoSulfqvf-ufxKmhvQHoHHrh_eTNqYfpMIxLBSX2v48WtzuV4fjbkvYCobRfMHGWUL3H7j3StamHwSh-1bUyaCmVmpC98PNdUYnvRGTQp8fc_ztMcRSa-7d2AoILQgtIA0_wjbW9AgXrlpL2C4EIfR0vqFpuIqN4zW2YmmZckiUUB_VPueJZVMlYqv_UYfQ5el0OqWG0NK_NKLP9vzD6_m0LM7F_Mwo8NafmwN762uj4HQ6QcM1aOOgRpgsCrh2qKHnX73AONiOjyjA1P4YCVvDiHce4CpdB8nF8_4rEuL1rUNPQq2wB2kJ3YCEjr8jaAMDjr201mN05j-FPeG9EfJyC7zbm3XYe6F_juzVHSVD6DLqgztCFxau3Q3k90YKwoWLGXuwZhobrySB_pzoBoSBK0ZEXN_ulrERT2_eMSAQOKAWqJsbGA2BBvjE4lcjHyVawvYzUTFRspLPsHooyiynbJnPZ12Vi6a85OWybHhTNA85R3qZNw95s7wsHxo2n8mKZpRlC7rM8nzB5mlZItIyKxsuSuSLmswz7LlUqXdPasZ2Jq2dsCrmD8vFTPEalQ0fGEo1XiE8JJT6781Y-XeSemotmWdKWme_VXHSKaw-Tyuw-jygfnz5ZrSfZvYi4kpFgUkbBPRy2MymUVWdc0OwJt17j0nXTXXamP7D-PGW3K1J6D5A9RYNo_wbAAD__0Qwoho">