Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPython linking issues on Windows #96

Open
SeleDreams opened this issue Feb 26, 2025 · 3 comments
Open

CPython linking issues on Windows #96

SeleDreams opened this issue Feb 26, 2025 · 3 comments

Comments

@SeleDreams
Copy link

errorlog (1).txt

It seems that when installing pyopenjtalk via pip, the pip install fails when building the C++ code.
I have all the required dependencies, the linking issues seem to be related to the python libraries.

I'm on Windows 11 64-bit using Visual Studio 2022 with MSVC 14.43.34808 and Python 3.10

@SeleDreams
Copy link
Author

One guess I have is that it might be trying to build 32-bit binaries with the 64-bit python

@SeleDreams
Copy link
Author

I identified the issue !
It seems that by default, it does consider the windows environment to be 32-bit and calls the 32-bit msvc environment !

modifying the setup.py like this

class custom_build_ext(setuptools.command.build_ext.build_ext):
    def initialize_options(self):
        super().initialize_options()
        self.plat_name = 'win-amd64'

Allows it to build without issues and install.
So now, it would only require to add a conditional check so that it only does it on 64-bit windows machine. I'll probably do a pull request once done

@SeleDreams
Copy link
Author

Image

A fix without modifying the source is to set the env variable PLAT_NAME before installing the pip package. I think this could be added to the install instructions !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant