Skip to content

Conversation

@MementoRC
Copy link
Contributor

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Testing Scripts:
- test-env-paths: Validate OCAMLLIB, OCAML_TOPLEVEL_PATH, activation
- test-config: OCaml configuration validation (ld.conf, Makefile.config)
- test-cross-arch: Binary architecture verification for cross-builds
- test-tool-versions: Version checks for all OCaml tools
- test-native-only-tools: ocamldoc and ocamldebug validation
- test-compilation: Bytecode, native, and multi-file compilation tests
- test-cross-compilers: Cross-compiler functionality for aarch64, ppc64le, arm64
- test-toolchain-vars: CONDA_OCAML_* variable validation

Platform Coverage:
- Unix (.sh) and Windows (.bat) variants for all applicable tests
- QEMU limitation handling for cross-compiled packages
- Native-only tool tests skip cross-platform builds

Recipe Updates:
- recipe.yaml: Comprehensive test suite integration with platform guards

Test Features:
- Environment variable validation
- Resource path verification
- Architecture detection for cross-builds
- Compilation test with library linking
- Cross-compiler wrapper validation

All tests implement proper skip logic for:
- Cross-platform builds (QEMU instability)
- Platform-specific tools (ocamldoc, ocamldebug)
- Architecture-specific scenarios (arm64 on macOS)
@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

@MementoRC MementoRC marked this pull request as ready for review January 9, 2026 03:21
@MementoRC MementoRC changed the title Mnt/v5.4.0 0 MNT: v5.4.0_0 Jan 9, 2026
@MementoRC MementoRC force-pushed the mnt/v5.4.0_0 branch 2 times, most recently from 911e392 to 8ae2709 Compare January 9, 2026 22:07
- Add custom Makefile.cross with crosscompiledopt/crosscompiledruntime targets
  (removed in upstream OCaml 5.4.0 but needed for Stage 3 fast path)
- Update apply_cross_patches() to copy Makefile.cross and apply dynlink fixes
- Fix build-cross-target.sh to use crosscompiledopt (not crossopt)
- Remove CONDA_OCAML_AS/MKEXE overrides - native tools need native assembler/linker

Results:
- linux-64: Native build + cross-compilers successful
- linux-aarch64: Cross-platform build successful (tests fail as expected - QEMU)
Copy link
Contributor

@dslarm dslarm left a comment

Choose a reason for hiding this comment

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

LGTM. I guess it's better to merge to 5.3.0x one to get a working 5.3.0 build before this otherwise it'd skip and just to 5.4.0x as the default.

@MementoRC
Copy link
Contributor Author

@dslarm Sure, that was my expectation. I will test the 5.3.0 on the opam recipe and I may have to iterate on 5.3.0 as I move through the various downstream packages for a full conda OCAML suite

@MementoRC MementoRC marked this pull request as draft January 12, 2026 21:44
MementoRC and others added 2 commits January 22, 2026 21:46
OCaml 5.4.0 changed how configure processes compiler flags. Passing
CFLAGS as configure arguments causes the generated Makefile to misparse
flags like '-O2' as make targets/dependencies instead of compiler flags.

Error before fix:
  make[2]: O2: No such file or directory
  make[2]: [Makefile:2217: tools/checkstack.o] Error 127

Fix: Export CC, CFLAGS, LDFLAGS as environment variables before calling
configure. The configure script reads these from the environment and
writes them correctly to Makefile.config.

Affected files:
- build-native.sh: native compiler configuration
- build-cross-compiler.sh: cross-compiler configuration
- build-cross-target.sh: cross-target configuration

Co-Authored-By: Claude Opus 4.5 <[email protected]>
OCaml 5.4.0 introduced CHECKSTACK_CC in Makefile but never defined it.
When undefined, the build command becomes just flags being executed:
  make[2]: O2: No such file or directory

Fix: Append 'CHECKSTACK_CC = $(CC)' to Makefile.config after configure.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Cherry-picked from 5.3.0 branch fix/v5.3.0_5-cross-arch-test (3a805a8):
- Add --mandir to cross-compiler and cross-target configure
- Add xt context variable for platform-specific exe extension
- Add strict: true for package_contents tests
- Consolidate binary listings with brace expansion

Original-commit: 3a805a8
Co-Authored-By: Claude Opus 4.5 <[email protected]>
@MementoRC MementoRC force-pushed the mnt/v5.4.0_0 branch 3 times, most recently from 3f4ee2a to 616b3d5 Compare January 26, 2026 18:03
Cherry-picked from 5.3.0 branch (b8cd602):
- Add -mmacosx-version-min flag to MKEXE/MKDLL to match SDK version
- Add fix-macos-install-names.sh to fix install_names for shared libraries
- Silence expected 'undefined symbol: custom_prim' in architecture test
- Consolidate recipe.yaml patterns using brace expansion
- Move compiler deps from test to run requirements
- Rename "Windows" references to "non-unix" for consistency

Original-commit: b8cd602

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@MementoRC MementoRC marked this pull request as ready for review January 27, 2026 01:55
@MementoRC
Copy link
Contributor Author

@conda-forge-admin please rerender

@MementoRC MementoRC force-pushed the mnt/v5.4.0_0 branch 8 times, most recently from 40335c4 to ad961c0 Compare January 31, 2026 17:14
@MementoRC
Copy link
Contributor Author

@dslarm We should first merge this one before the jump to 5.4.0 _1 since it will break many of the cross-compiled downstream packages (cross-compilers will be separated)

@MementoRC MementoRC force-pushed the mnt/v5.4.0_0 branch 2 times, most recently from 8de36ad to 0e450ac Compare February 2, 2026 20:23
@MementoRC
Copy link
Contributor Author

@conda-forge-admin Please rerender

@MementoRC
Copy link
Contributor Author

@conda-forge-admin Please rerender

@MementoRC MementoRC force-pushed the mnt/v5.4.0_0 branch 2 times, most recently from 5fb2bfb to 7fd4939 Compare February 3, 2026 02:39
@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

@MementoRC
Copy link
Contributor Author

@conda-forge-admin Please rerender

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.

3 participants