Skip to content

Conversation

@lukester1975
Copy link
Contributor

Hi

Just tripped over a weird issue using Fedora's concurrentqueue package. Its generated concurrentqueueConfigVersion.cmake has this at the end:

# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "")
  return()
endif()

# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "4")
  math(EXPR installedBits "4 * 8")
  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
  set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

which causes meson to fail to find the package using its cmake dependency finder, as CMAKE_SIZEOF_VOID_P is 8.

To remove that chunk of cmake completely, it looks like adding ARCH_INDEPENDENT to write_basic_package_version_file is the thing to do. Certainly regenerating the Fedora package with this patch removes the above and allows meson to find the package, but I avoid cmake at all costs ( OR "4" STREQUAL ""?!) so wouldn't like to say it's the best approach...

Thanks

PS also noticed the version isn't updated at the top of the CMakeLists.txt.

@cameron314
Copy link
Owner

At this point, I really feel like I made a mistake accepting PRs for supporting various build and packaging systems in the first place. This is supposed to be a header-only library. Sigh. Thanks for the fix, this seems reasonable.

I will try to remember to bump the CMake version in the next release, thanks for the note.

@cameron314 cameron314 merged commit 24b7878 into cameron314:master Apr 28, 2025
cameron314 added a commit to cameron314/readerwriterqueue that referenced this pull request Apr 28, 2025
@lukester1975 lukester1975 deleted the arch_independent branch April 28, 2025 05:18
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