boostorg / cmake

CMake support infrastructure Boost submodule
94 stars 27 forks source link

Recent change breaks version match #68

Closed soro closed 4 months ago

soro commented 4 months ago

It seems that this change breaks version matching: 440dd10f57f86a91c9d0ae23f096f343fdd004cb

  Could not find a configuration file for package "boost_context" that
  exactly matches requested version "1.85.0".

  The following configuration files were considered but not accepted:

    /home/dev/.cache/bazel/_bazel_dev/15902ddbe5afade2111503033c667920/sandbox/processwrapper-sandbox/7/execroot/cpp/bazel-out/k8-fastbuild/bin/external/com_github_facebook_folly/facebook_folly.ext_build_deps/boost/lib/cmake/boost_context-1.85.0-static/boost_context-config.cmake, version: 1.85.0 (static)

The suffix means it's not an exact match. I doubt that was the intended effect?

pdimov commented 4 months ago

It's not the suffix; my guess is that you have Boost_USE_STATIC_LIBS set to OFF.

soro commented 4 months ago

I have it set to ON, hence the assumption that it has something to do with the suffix - at the 1.85.0 release tag the names didn't yet have the suffix iirc and the change to add the HINT actually allowed it to build.

pdimov commented 4 months ago

As you can see here

https://github.com/boostorg/cmake/blob/5eab56dd6cf2e96d7194525839fee3e5b30ec4c1/include/BoostInstall.cmake#L489-L494

the "(static)" suffix is only added to the version when DEFINED Boost_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS.

pdimov commented 4 months ago

Although I'm not sure why the version is 1.85.0, because the static/shared change has been added after 1.85 was released. So the version should be 1.86.0 when using a current develop or master.

soro commented 4 months ago

I just updated the cmake submodule, not the entire tree. Maybe that was the problem? I have reverted to the 1.85.0 version and applied only the hint change and it builds again. Sorry, I'm currently doing this as a side project to get rid of our old way of managing some third party dependencies and have limited time to dig into it. Trying to be as helpful as I can :)

pdimov commented 4 months ago

Updating just the cmake module should have worked; at this point I have no idea where the problem might be. As I said above, the version is only appended " (static)" so that it can appear in the error message, and this only happens when Boost_USE_STATIC_LIBS is OFF.

soro commented 4 months ago

I guess I'll close this for now - maybe it was a caching issue. Will let you know once I try to update to next release