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

Fix incorrect error message in configure #5667

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Sep 14, 2023

opam requires both a 32-bit and a 64-bit C compiler when compiling for 64-bit Windows. However, for mingw-w64, the error message confusingly displayed the architecture of the compiler which was installed.

@dra27 dra27 linked an issue Sep 14, 2023 that may be closed by this pull request
@rjbou
Copy link
Collaborator

rjbou commented Sep 14, 2023

related #5661

configure.ac Outdated
@@ -202,8 +202,10 @@ AS_IF([ test ${WIN32} -eq 1 ],[
AS_IF([ test "x${CC64}" = "x" ], [
AS_IF([ test "$ARCH" = "i386" ],
[T_CC64=x86_64-w64-mingw32-gcc
COMP_ARCH='x64'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe

Suggested change
COMP_ARCH='x64'
COMP_ARCH='x86_64'

given that’s how it is named by cygwin

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a confusing one - Microsoft call it x64 (cf. the other side of the AS_IF!). However, I think you're right and I've changed it - if we're building 32-bit mingw, then we call it x86_64 in the display (as you say, because Cygwin and GCC do!); if we're building 32-bit MSVC, then we call it x64 (because Microsoft does) and then the complaint always matches the name of the missing compiler! 🤯

Somewhat confusingly, the architecture referred to the compiler which
had definitely just been found.
@kit-ty-kate
Copy link
Member

Thanks!

@kit-ty-kate kit-ty-kate merged commit f8ea5e0 into ocaml:master Nov 10, 2023
29 checks passed
@dra27 dra27 deleted the putenv-c-msg branch November 10, 2023 16:07
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.

C compiler not found on Windows
3 participants