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

Fixed compilation error on MinGW-w64. #231

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Conversation

hiiiik
Copy link
Contributor

@hiiiik hiiiik commented Jun 11, 2024

The default behavior of windres.exe to read the output of the preprocessor is using popen. However, the popen implementation may be buggy on some non-English hosts, which would cause a compilation error like this:

windres.exe: can't open file `page:': Invalid argument

It can be fixed by adding --use-temp-file option and windres.exe will use a temporary file to read instead of using opoen. I also tried compiling with the option on English-only locale and it also works fine, so it is probably a good idea to add it.

The default behavior of windres.exe to read the output of the
preprocessor is using popen. However, the popen implementation may be
buggy on some non-English hosts, which would cause a compilation error
like this:

windres.exe: can't open file `page:': Invalid argument

Fix by adding '--use-temp-file' option and windres.exe will use a
temporary file to read instead of using opoen.

Signed-off-by: ik <hello_ik@outlook.com>
@Lastique
Copy link
Member

Should Boost.Build be modified the same way?

@hiiiik
Copy link
Contributor Author

hiiiik commented Jun 12, 2024

Should Boost.Build be modified the same way?

I haven't tried compiling this library through b2, don't known if it can work or not. I will test it tomorrow, BTW, bootstrap of b2 itself does not work because of the same problem, I'd like to create a PR for that later.

@hiiiik
Copy link
Contributor Author

hiiiik commented Jun 13, 2024

The error doesn't occur if the library is built with b2. Support for the event log is actually disable since b2 only support mc.exe but not GNU's windmc.exe.

@Lastique
Copy link
Member

Ok, thanks for checking. And for the PR.

@Lastique Lastique merged commit d3670d2 into boostorg:develop Jun 13, 2024
41 of 42 checks passed
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

Successfully merging this pull request may close these issues.

2 participants