Building on Windows -fPIC issue #3094
-
Hello, I'm trying to build Carbon, but the following error is reported:
how can I fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The C++ toolchain configuration we have for Bazel doesn't yet support building on Windows, really sorry. We'd actually love to support this, but none of the currently active contributors uses Windows enough to have the expertise and experience to get it working. We're actively looking for a contributor interested in Windows support, and comfortable working with Bazel, Clang's native installs on Windows, and MSVC. If you or someone else is interested in contributing to getting all of this working, please let us know and happy to chat on Discord about an approach and such. Hopefully, if we get a contributor up for it, we'll then be able to add Windows to our CI to make sure it stays working, and update our docs to help folks get started. Until then, you should be able to use WSL to build on Windows using our existing instructions. Several folks have reported pretty good success building with WSL already. |
Beta Was this translation helpful? Give feedback.
-
Windows does not use PIC. We can use different configurations in .bazelrc, e.g.
For now, you can comment out the line above in your |
Beta Was this translation helpful? Give feedback.
The C++ toolchain configuration we have for Bazel doesn't yet support building on Windows, really sorry.
We'd actually love to support this, but none of the currently active contributors uses Windows enough to have the expertise and experience to get it working. We're actively looking for a contributor interested in Windows support, and comfortable working with Bazel, Clang's native installs on Windows, and MSVC. If you or someone else is interested in contributing to getting all of this working, please let us know and happy to chat on Discord about an approach and such. Hopefully, if we get a contributor up for it, we'll then be able to add Windows to our CI to make sure it stays working…