Skip to content

Fix Window compilation instructions for camlidl#29653

Open
yakobowski wants to merge 1 commit intoocaml:masterfrom
yakobowski:camlidl
Open

Fix Window compilation instructions for camlidl#29653
yakobowski wants to merge 1 commit intoocaml:masterfrom
yakobowski:camlidl

Conversation

@yakobowski
Copy link
Copy Markdown
Contributor

The Windows Makefile extension is win32, not mingw

@yakobowski
Copy link
Copy Markdown
Contributor Author

Actually it's more complex than what I thought...

@yakobowski yakobowski force-pushed the camlidl branch 4 times, most recently from 0aff640 to 2a6d096 Compare April 6, 2026 17:59
Use Makefile.unix for MinGW and Cygwin builds, and Makefile.win32
only for MSVC builds, distinguished via host-system-msvc.

The previous configuration referenced a non-existent Makefile.mingw.
Makefile.win32 uses CC=cl and MSVC flags, so it must not be used for
MinGW/Cygwin which rely on a gcc-based toolchain like Makefile.unix.

Also patch the source for GCC 14 compatibility on MinGW:
- comerror.c: use caml_format_exception instead of the deprecated
  format_caml_exception (required under CAML_NAME_SPACE)
- config/Makefile.unix: add -Wno-error=incompatible-pointer-types to
  CFLAGS to work around int/LONG mismatch in comintf.c

Amp-Thread-ID: https://ampcode.com/threads/T-019d63cc-72f8-75f4-8999-2b6b29608ff4
Co-authored-by: Amp <amp@ampcode.com>
@yakobowski
Copy link
Copy Markdown
Contributor Author

Fixed the errors coming from the switch to GCC 14 too. Not sure how you were planning to handle them repository-wise, but I wanted to test my patches.

@yakobowski
Copy link
Copy Markdown
Contributor Author

I had a look at the errors in opam-ci. They were either due to the switch to GCC 14, or unrelated to camlidl.

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.

1 participant