Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake do not find msgpack on Windows #53

Open
Lihis opened this issue Jan 8, 2022 · 4 comments
Open

CMake do not find msgpack on Windows #53

Lihis opened this issue Jan 8, 2022 · 4 comments
Labels
help wanted Extra attention is needed windows Windows specific issue
Projects

Comments

@Lihis
Copy link
Owner

Lihis commented Jan 8, 2022

Build fails as CMake do not find Findmsgpack.cmake, see: https://ci.appveyor.com/project/Lihis/ets2-job-logger/builds/42129622.

@Lihis Lihis added help wanted Extra attention is needed windows Windows specific issue labels Jan 8, 2022
@Lihis Lihis added this to the v0.1.0 milestone Jan 8, 2022
@ResTedRU
Copy link

There seem to be two options to fix this:

  1. I think this is the simplest. You need to use VC 2019, don't know why but for 2017 it doesn't work automatically.
    So, before opening the project, you need to install the dependent libraries in (vcpkg) :
vcpkg install msgpack:x64-windows
vcpkg install websocketpp:x64-windows
vcpkg install jsoncpp:x64-windows
vcpkg install wxWidgets:x64-windows
vcpkg install boost:x64-windows

this may take about an hour. When the libraries are installed, you need to do the integration:
vcpkg integrate install

Now this problem should not appear.

  1. This way is suitable for VC 2017.
    You also need to install the libraries from the first method.
    Now that they have been installed, you need to copy and paste each library into their respective conan folders :
    C:\Users\your name\.conan\data\

now the cache should be generated without problems

@Lihis
Copy link
Owner Author

Lihis commented Jan 16, 2022

  1. I think this is the simplest. ... you need to install the dependent libraries in ... this may take about an hour.

I have mixed feelings about this option.. An hour for installing dependencies doesn't sound good. If every build on CI takes an hour, not that it will eat up CI usage but also have to wait a long time to see that the build passes. But in other hand it sounds a bit more pleasant to use than Conan; no need to hardcode library versions (unless Conan supports something like latest in the conanfile.txt) and iirc it might be easier to integrate with VS.

  1. This way is suitable for VC 2017.

I think we should not use two package managers.


So in summary, unless vcpkg install step can't be speed up by utilizing a caching or something on CI so at least consecutive builds takes as long as the builds took with Conan (I think about 5-10 minutes) then I would stick with Conan. Quick googling makes the difference between these two clear; vcpkg builds from source when you do the install while Conan downloads pre-built binary.

And what it comes to Conan, question is have they stopped packaging the msgpackConfig.cmake file? Or has Conan also received some bigger changes which effectively has broken our usage (need to do some manual migration like had to with the Bincrafters?). This seems interesting Conan-CMake transparent integration.

@ResTedRU
Copy link

An hour for installing dependencies doesn't sound good.

It depends on your PC, on one it took me almost an hour, on my home computer I installed it within 10 minutes, I wrote about an hour so that it would not be a surprise if someone tries it.

they stopped packaging the msgpackConfig.cmake file?

I didn't find any information about it. But I must say that after I was able to fix the error with msgpack, I got the same error for jsoncpp - the settings files were also needed (jsoncppConfig.cmake).
So in my opinion the best solution is to use VC 2019

@Lihis
Copy link
Owner Author

Lihis commented Jan 16, 2022

10 minutes is still reasonable and hopefully CI could get close to that so in that case vcpkg sounds better option.

@Lihis Lihis added this to To Do in Windows via automation Apr 23, 2022
@Lihis Lihis removed this from the v0.1.0 milestone Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed windows Windows specific issue
Projects
Windows
To Do
Development

No branches or pull requests

2 participants