Typecast changed for compatibility with Visual Studio 2019.
Changed (char **) to (const char **) for VS2019 #20785
pull SkybuckFlying wants to merge 1 commits into bitcoin:master from SkybuckFlying:master changing 1 files +1 −1-
SkybuckFlying commented at 2:08 PM on December 28, 2020: none
-
fed0f610f0
Changed (char **) to (const char **) for VS2019
Typecast changed for compatibility with Visual Studio 2019.
- fanquake added the label Refactoring on Dec 28, 2020
-
SkybuckFlying commented at 2:27 PM on December 28, 2020: none
Why did these automated checks fail ?
The latest source of libevent does use (const char **) as can be seen on this line:
https://github.com/libevent/libevent/blob/master/include/event2/http.h#L966
Are automated checks using old code ?
Does bitcoin use an older version of libevent ? Or will it update to a newer version of libevent ?
-
sipsorcery commented at 2:33 PM on December 28, 2020: member
The Bitcoin Core dependencies for production builds are pegged and are unlikely to ever be using the latest versions of a 3rd party library.
The Visual Studio build is not used in production and is provided for developer convenience only. When doing a Visual Studio build on the Appveyor CI platform the dependencies, including libevent, are installed using Microsoft's vcpkg. The version is pegged by checking out a specific version of the vcpkg port files. Currently libevent is at
2.1.12.Which libevent version are you having a problem with and what's the warning or error you're getting?
-
MarcoFalke commented at 2:45 PM on December 28, 2020: member
This hasn't been released yet https://github.com/libevent/libevent/commit/a18301a2bb160ff7c3ffaf5b7653c39ffe27b385
- MarcoFalke closed this on Dec 28, 2020
-
SkybuckFlying commented at 2:57 PM on December 28, 2020: none
The Bitcoin Core dependencies for production builds are pegged and are unlikely to ever be using the latest versions of a 3rd party library.
I am not sure what pegged means in this context ? I assume delayed ?
The Visual Studio build is not used in production and is provided for developer convenience only. When doing a Visual >Studio build on the Appveyor CI platform the dependencies, including libevent, are installed using Microsoft's vcpkg.
Ok good to know this. I also tried and use the vcpkg. However I don't know yet exactly how that works and the bitcoind source code I am trying to compile is compiling against the latest libevent source code pulled straight from git by myself.
So I am still in the process of trying to get bitcoind compiling and linking and ran into this. Perhaps later I would have switched to this vcpkg... it was said on some website that vcpkg is maintained by Microsoft and such... no idea how far that lags behind with latest version.
The version is pegged by checking out a specific version of the vcpkg port files. Currently libevent is at
2.1.12.Again not sure what pegged means in this context ? (I am not native english person, but dutch :), I tried a dictionary but can't really understand the meaning of this word pegged)
Which libevent version are you having a problem with and what's the warning or error you're getting?
I am using latest git source code for libevent. I am not exactly sure how to check the version number, neither on git nor ok vcpkg. I dont know yet exactly how to use vcpkg. I tried some install and some, it did seem to hang bash a little bit, so I am not even sure if it installed properly. I may have to get some kind of libevent library working later.
The change log for libevent seems out of date. The version mentioned in there is 2.1.8-stable (22 January 2017)
Could you advise me how to figure out the exact version of libevent ?
Which version of libevent would be needed to compile and link for bitcoin ?
-
MarcoFalke commented at 2:59 PM on December 28, 2020: member
Which version of libevent would be needed to compile and link for bitcoin ?
See
doc/dependencies.md -
SkybuckFlying commented at 3:03 PM on December 28, 2020: none
Which version of libevent would be needed to compile and link for bitcoin ?
See
doc/dependencies.mdOk thanks a lot !
I found it via that document:
https://github.com/libevent/libevent/releases/tag/release-2.1.12-stable
-
sipsorcery commented at 3:15 PM on December 28, 2020: member
I used "pegged" to mean the dependency is set at a specific version and not subject to any kind of automatic updating.
The idea with vcpkg is that if it's installed and in your path then the dependencies should all get installed automatically by
msbuild(or more correctlymsbuildautomatically callingvcpkg).You could try these steps:
- Clone the vcpkg repo (sounds like you've already done this).
- Build the vcpkg binaries using
bootstrap-vcpkg.bat - Add the directory with vcpkg.exe to your path,
- Change dir to the build_msvc directory in the bitcoin core source tree,
- Run
vcpkg install --triplet x64-windows-static - Run
msvc-autogen.py - Run
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
Proper instructions are at https://github.com/bitcoin/bitcoin/tree/master/build_msvc.
-
SkybuckFlying commented at 3:25 PM on December 28, 2020: none
Thanks for the instructions if my own method fails then I'll give yours and other documents a try, I indeed try some part of these instructions got half way, after that I got a bit confused as git bash seemed to hang and I am not sure what these tools do and I am not sure exactly what to build, but I like to try and build stuff manually so I know what is going on instead of automation :)
For now I try my own solution for libevent and see how far I get with that, there was some strange comment on their release that dist should be used and not git source files ? Perhaps they mean newer versions, but checking out this older commit should work ?
git checkout release-2.1.12-stable
-
sipsorcery commented at 3:28 PM on December 28, 2020: member
For now I try my own solution for libevent and see how far I get with that,
Sure, it's always good to be able to build directly from source.
Note that it gets a lot more challenging to build some of the other dependencies on Windows particularly Qt...
- DrahtBot locked this on Feb 15, 2022