LNK1112 Error on Windows
Hi,
I can build python binding on Ubuntu, however, when I want to build python binding on Windows, I always met this error: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86', I have changed the toolchain from nightly to nightly-2019-11-01, but it doesn't work. Do you have any idea?
Best Wishes!
What is your process to compile on windows? Did you run cargo build?
Thanks for your reply! On Windows, I run cargo build under tokenizers folder, it works well. But when I run python setup.py install under python folder, it outputs above error.
Hi @Mansterteddy ,
Do you observe the same error by running pip install . from the python folder ?
Hi @mfuntowicz ,
Thanks for your reply! Yes, I observe the same error: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' error: cargo failed with code: 101
pip install . outputs another line:
ERROR: Could not build wheels for tokenizers which use PEP 517 and cannot be installed directly
Do you have any idea?
Best Wishes!
I just got the same problem while trying to build for Python 32-bit on windows. I was able to fix it by making sure that both Python and the selected Rust toolchain matched:
- If you build for a python 32-bit version you should use rust
nightly-i686-pc-windows-msvc. - For python 64-bit you should use rust
nightly-x86_64-pc-windows-msvc
Let me know how it goes!
It works, thanks a lot!