Skip to content

[Sol2] make CMake config-version arch-independent#14000

Merged
imciner2 merged 4 commits into
JuliaPackaging:masterfrom
jrklasen:fix-sol2
Jul 9, 2026
Merged

[Sol2] make CMake config-version arch-independent#14000
imciner2 merged 4 commits into
JuliaPackaging:masterfrom
jrklasen:fix-sol2

Conversation

@jrklasen

Copy link
Copy Markdown
Contributor

Make the AnyPlatform config-version arch-independent (else 32-bit consumers reject the 64-bit-built config).

@jrklasen

Copy link
Copy Markdown
Contributor Author

Sol2 was just added erlier today as a dependency for OSRM, the OSRM recipe revield this issue, see #13992.

@imciner2

Copy link
Copy Markdown
Member

Um, what do you mean by

(else 32-bit consumers reject the 64-bit-built config).

If you have different integer sizes on the two API sides, that is actually a problem. Shouldn't the fix be to build Sol2 as 32-bit on the platforms that are 32-bit?

@jrklasen

Copy link
Copy Markdown
Contributor Author

Sorry I was traveling and didn't manage to get back to this earlier.

You're right that a real integer-size mismatch would be a problem — but that's not the case here.

Sol2 is header-only hence AnyPlatform(). The only issue is CMake metadata — by default write_basic_package_version_file() bakes the build host's sizeof(void*) into the config, so find_package(sol2) rejects it on a 32-bit consumer (#13992). For headers there's nothing to link, so that guard is spurious.

The fix is the ARCH_INDEPENDENT flag, which is documented for exactly this — same thing nlohmann_json does (#1697). I've updated the recipe to pass it upstream instead of post-editing the generated file, which also drops the brittle hardcoded "8".

Is this fine like this?

@jrklasen

Copy link
Copy Markdown
Contributor Author

Hi @imciner2 may I ask you for any thoughts on this?

@jrklasen

jrklasen commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Does anyone have any suggestions on how to proceed with this?

@imciner2 imciner2 merged commit 7ac93a4 into JuliaPackaging:master Jul 9, 2026
5 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