[Sol2] make CMake config-version arch-independent#14000
Conversation
|
Sol2 was just added erlier today as a dependency for OSRM, the OSRM recipe revield this issue, see #13992. |
|
Um, what do you mean by
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? |
|
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? |
|
Hi @imciner2 may I ask you for any thoughts on this? |
|
Does anyone have any suggestions on how to proceed with this? |
Make the AnyPlatform config-version arch-independent (else 32-bit consumers reject the 64-bit-built config).