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

Cannot run WIndows build #306

Open
sryze opened this issue Dec 13, 2022 · 4 comments
Open

Cannot run WIndows build #306

sryze opened this issue Dec 13, 2022 · 4 comments

Comments

@sryze
Copy link

sryze commented Dec 13, 2022

When I run q.exe:

The code execution cannot proceed because python38.dll was not found. Reinstalling the program may fix this problem. 

I expected it to run without requiring any DLLs as mentioend on the website:

q is packaged as a compiled standalone-executable that has no dependencies, not even python itself

Could you please look into linking with Python statically in the Windows build?

Thanks.

@harelba
Copy link
Owner

harelba commented Dec 13, 2022

The windows build also uses static linking, so this is very odd.

Can you send some details about your windows? Perhaps it will provide a clue as to why it's not working.

@sryze
Copy link
Author

sryze commented Dec 13, 2022

Windows 10 x64
Version of q: 3.1.6

It looks like python38.dll was dynamically linked:

image

@sryze
Copy link
Author

sryze commented Dec 14, 2022

Accoding to https://pyoxidizer.readthedocs.io/en/stable/pyoxidizer_packaging_static_linking.html#building-statically-linked-binaries-on-windows to produce a statically linked .exe on Windows, it's necessary to add flavor="standalone_static" to this line in pyoxidizer.bzl:

dist = default_python_distribution(python_version=PYTHON_VERSION)

I just tried this and it appears to indeed link with Python statically.

image

The executable is huge though.... about 50 MB now vs 34 MB before.

@harelba
Copy link
Owner

harelba commented Dec 14, 2022

yes, i remember now... There was an issue with github actions' Windows support which prevent this from working well.

Perhaps now github actions improved their support for this. I'll take a look.

Thanks a lot for checking this out.

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

2 participants