Skip to content

Conversation

@SSDGADsss
Copy link

When I was building the source code of msgpack-c, I encountered a CMP0167 warning. Although it did not affect the code building process, it was a minor flaw. I believed that adding CONFIG to find_package(Boost REQUIRED) could solve the issue. Therefore, I organized the code repository and fixed this minor issue.

When I was building the source code of msgpack-c, I encountered a
CMP0167 warning. Although it did not affect the code building process,
it was a minor flaw. I believed that adding CONFIG to
`find_package(Boost REQUIRED)` could solve the issue. Therefore, I
organized the code repository and fixed this minor issue.
@SSDGADsss
Copy link
Author

It seems that all the test cases on macOS have failed, but I noticed that the previous commit had already fixed the issue with the CMake version. Should I adjust the CMake version to a later one? I would appreciate any guidance from the maintainer.

@redboltz
Copy link
Contributor

redboltz commented Jan 9, 2026

@SSDGADsss Thank you for sending the PR.

If your branch was created based on the older point of cpp_master, please rebase your branch form the up to date cpp_master.
Then force push the branch. CI would work well.

@SSDGADsss
Copy link
Author

I checked, and the latest commit hash for the cpp_master branch is a0b2ec09da. Currently, my branch is based on this commit. Could you further clarify which commit I should rebase onto?
Additionally, I re-examined the macOS build error. Should we raise the minimum CMake version to 3.6? The current minimum CMake version for the codebase is 3.5, which aligns with my commit. I'd appreciate more guidance from the maintainers and would be happy to help.

@redboltz
Copy link
Contributor

redboltz commented Jan 9, 2026

The CI log indicates that all tests are passed.
And then, cmake error occurs.

tests are executed from this line:
https://github.com/SSDGADsss/msgpack-c/blob/fix_cmake_CP0167/ci/build_cmake.sh#L32

Then test-install process started.
https://github.com/SSDGADsss/msgpack-c/blob/fix_cmake_CP0167/ci/build_cmake.sh#L51

In the test-install process, the following CMakeLists.txt is read.
https://github.com/SSDGADsss/msgpack-c/blob/fix_cmake_CP0167/test-install/CMakeLists.txt#L1

cmake_minimum_required(VERSION 3.1 FATAL_ERROR)

It is incompatible to the root one.

https://github.com/SSDGADsss/msgpack-c/blob/fix_cmake_CP0167/CMakeLists.txt#L1

CMAKE_MINIMUM_REQUIRED (VERSION 3.5...4.0)

I guess that test-install/CMakeLists.txt should be

cmake_minimum_required(VERSION 3.5...4.0)

NOTE: FATAL_ERROR is default behavior. It is no longer needed.

Could you try this?

@SSDGADsss
Copy link
Author

Thank you very much, I'll fix this issue

@SSDGADsss
Copy link
Author

There's only one last error left. It seems the issue is in the DevOps continuous integration part, with the error being that the Boost library cannot be found. I revisited the CMake FindBoost documentation—could it be due to an outdated Boost version? While reviewing previous issues, I found that defining MSGPACK_USE_BOOST=OFF can disable the Boost library. I'm not sure how to proceed with the fix—could you help me out?

@redboltz
Copy link
Contributor

It seems that the appveyor image has various versions of boost.

So replacing

https://github.com/SSDGADsss/msgpack-c/blob/fix_cmake_CP0167/appveyor.yml#L12

      boost_prefix: C:\Libraries\boost_1_69_0

to

      boost_prefix: C:\Libraries\boost_1_86_0

would work.

Could you try this?

@SSDGADsss
Copy link
Author

Thank you very much for your help. I'll give it another try

@SSDGADsss SSDGADsss force-pushed the fix_cmake_CP0167 branch 3 times, most recently from a6a0b35 to cc7b67a Compare January 11, 2026 08:16
@SSDGADsss
Copy link
Author

SSDGADsss commented Jan 11, 2026

I tried modifying CMAKE_PREFIX_PATH to C:\Libraries\boost_1_86_0\lib32-msvc-14.0\cmake\Boost-1.86.0, but still couldn't find the Boost library. I downloaded the precompiled binaries locally and didn't encounter this issue. Could you help check if there's a BoostConfig.cmake file in this path? I'm not very familiar with the continuous deployment environment configuration.

@redboltz
Copy link
Contributor

It seems that your branch is not rebased.

I checked, and the latest commit hash for the cpp_master branch is a0b2ec0. Currently, my branch is based on this commit. Could you further clarify which commit I should rebase onto?

I overlooked this comment.
PR must be based on up to date branch.

@redboltz
Copy link
Contributor

You need to add debug code to appveyor.yml (e.g. enter DIR command to check boost dir, etc)
In addition, BOOST_ROOT environment variable and/or cmake option -DBOOST_ROOT could help to find the library.
cmake find boost is extremely difficult to understand for me.
I guess that more try and error is required.

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