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

Windows binaries not working starting from pkg 5.13.0 #85

Closed
robertsLando opened this issue Aug 28, 2024 · 2 comments · Fixed by #86
Closed

Windows binaries not working starting from pkg 5.13.0 #85

robertsLando opened this issue Aug 28, 2024 · 2 comments · Fixed by #86
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@robertsLando
Copy link
Member

Find the reason here: yao-pkg/pkg-fetch#37

Any help fixing this on pkg-fetch side is more then welcome

@robertsLando robertsLando added bug Something isn't working help wanted Extra attention is needed labels Aug 28, 2024
@robertsLando robertsLando pinned this issue Aug 28, 2024
@faulpeltz
Copy link

I managed to find the cause for this issue.

The order for placeholders (except bakery which occurs only once) is:

Windows binary:
<placeholder in source string> <bakery> <placeholder in bytecode(?)>

Linux binary:
<placeholder in bytecode(?)> <bakery> <placeholder in source string>

The producer always replaces the first occurence, and replacing the source string does nothing
Replacing the correct one fixes the generated binary on windows

Hacking together a quick fix works on my Windows test box
faulpeltz@f4d254c

However the fix is bit ugly, maybe there is a more elegant solution.
I'm not sure why the order is like that, maybe it depends on the platform linker settings?

@robertsLando
Copy link
Member Author

@faulpeltz Thanks so much for looking at this! Could you submit a PR? I sincerly have no idea why this has changed starting from latest nodejs versions, if you find out more let me know. In the meanwhile please open a PR and also add a comment that reference to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants