Skip to content

[IQTree] new recipe for v3.1.2#13787

Open
danvinci wants to merge 7 commits into
JuliaPackaging:masterfrom
danvinci:add-iqtree
Open

[IQTree] new recipe for v3.1.2#13787
danvinci wants to merge 7 commits into
JuliaPackaging:masterfrom
danvinci:add-iqtree

Conversation

@danvinci

@danvinci danvinci commented May 22, 2026

Copy link
Copy Markdown
Contributor

Adds a builder for IQ-TREE, maximum-likelihood phylogenetic inference. The JLL ships the iqtree3 executable.

Resolves #7097, bumped to v3.1.2 (the active iqtree3 upstream).

Build notes:

  • lsd2 and cmaple are git submodules of iqtree3. Fetched as separate GitSources and relocated in the script. Upstream ships only platform-binary release archives, not source tarballs.
  • Platforms restricted to 64-bit x86_64 and aarch64. Upstream doesn't support 32-bit and hardcodes -msse3/-mavx/-mfma on any non-ARM target, so powerpc64le and riscv64 fail in vectorclass and pll. Matches upstream's release matrix (Linux/macOS x86_64+ARM, Windows x86_64).
  • julia_compat set to 1.10. Zlib_jll pinned to 1.2.13 and CompilerSupportLibraries_jll to 1.0.5, matching what Julia 1.10 ships as stdlib. Older Julia bundles an incompatible Zlib_jll, which would silently break Pkg.add at install time. aarch64-unknown-freebsd dropped: Julia 1.10-1.12 stdlib Zlib_jll (1.2.13+1, 1.3.1+0) has no aarch64-freebsd binary.
  • Four patches in bundled/patches/:
    • openmp-find-package.patch: bundled lib/libomp.a is glibc-only on Linux (references __sysconf, fails on musl), and libmac/libomp.a references ___chkstk_darwin on x86_64 macOS, which BB's clang-rt doesn't ship. Switched both branches to find_package(OpenMP): libgomp via CompilerSupportLibraries_jll on Linux, libomp via LLVMOpenMP_jll on macOS/FreeBSD. (aarch64 macOS isn't affected by chkstk_darwin.)
    • cmaple-openmp-find-package.patch: cmaple ships its own bundled libomp.a chain, separate from iqtree3's. Same fix, applied to cmaple/CMakeLists.txt.
    • respect-cross-compile-osx-arch.patch: upstream uses uname -m on the build host for OSX_NATIVE_ARCHITECTURE, which returns x86_64 under BB cross-compile from Linux and breaks aarch64-apple-darwin. Reads CMAKE_OSX_ARCHITECTURES first.
    • cmaple-disable-lto.patch: cmaple turns on LTO unconditionally on macOS / Linux x86_64 / FreeBSD. Archive link fails on cross-toolchains without llvm-ar.
  • -march / -mcpu scrubbed across all CMakeLists.txt (BB rejects forced microarchitecture flags; iqtree3 hardcodes them in three places).
  • COMMAND copy in iqtree3's Windows post-build steps replaced with COMMAND ${CMAKE_COMMAND} -E copy. The Windows shell copy isn't available in the mingw cross-compile sandbox.
  • AppleDouble sidecars dropped from the rootfs CMake modules dir. BB's tar unpack leaves ._* files on macOS hosts that trip CMake compiler detection; no-op on Linux CI.

@danvinci danvinci marked this pull request as ready for review May 22, 2026 18:12
@lgoettgens

Copy link
Copy Markdown
Member

Have you tried upstreaming the patches? We usually prefer not carrying huge patches alongside the recipes, if possible.

@danvinci

danvinci commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

I opened this PR on a whim as it would have closed #7097, but that issue is old and I'm unsure about downstream Julia users that would actually benefit from this _jll + having this as an addition in the general registry.

Thinking of just saving the patches for now - do you think all of them are worth up-streaming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iqtree] builder request

2 participants