- Incorporated code for version 3.3.1
- Reverted constexpr commits for hex_map:
- 352e36500c
- 6a264d6f73
as they created a lot of problems during builds on
Windows/MSVC.
- Tested binaried linked dynamically with:
- MSYS2 (production-ready)
- MSVC (only for testing) !!!danger of memory leaks!!!
- Tested binaries linked statically on win32 x64 platform
- Populated libasio for both MSYS2 and MSVC builds on Windows
- Pipeline fixes to build on Windows using only:
- vcpkg for MSVC
- MSYS2 pacman for MinGW
and remove the external dependency directory
The reference Windows builds are accessible in the following IPFS directory:
https://bafybeihsrak7orgubrnl5lvpcyzb4xf6kc7cd4tfvctucftg6vfqdhphlq.ipfs.dweb.link/
- Based on Windows build adjustment code from @novemus
(see his magnificient code merge request #716)
- Determined full-static and dynamic link libraries for
Windows if built using MSYS2 or MSVC
- Built without restinio and llhttp [TODO]
- Set for automatic fetching and population from the network
the following libraries for MSYS2:
- GnuTLS 3.8.4 for 64-bit Windows (tested for dynamic
and static builds)
- Auto name adjustments for GnuTLS
- GnuTLS 3.8.9 for 32-bit Windows (untested)
- cJSON as a dependency for msgpack
- msgpack 6.1.1
- jsoncpp 1.9.5
- libfmt 11.1.2
- libasio 1.30.2
for MSVC:
- cJSON (used by msgpack in dynamic builds)
- jsoncpp 1.9.5
- libfmt 11.1.2
- Various build scenario fixes for MSVC dynamic builds
- Added modular codebase for infohash.cpp to avoid header
treatment mismatches in MSVC when compiling DLL
- Added convenience prints in the build scenario
- Fixed inconvenient usage of pkgconfig in Windows, the
link scenarios adjusted accordingly
- Fixed hardcoded find_library calls
- Added standard CMake handler for Boost library using
BOOST_ROOT variable, including environmental definition
- Fixed libreadline linkage on POSIX when the default link
point is turned off for OPENDHT_TOOLS (Mint Linux)
- Added versioned handler for CMP0167 policy (from CMake 3.30)
- Code fixes for compatibility headers in Windows (crypto.cpp,
network_utils.h, utils.h)
- Urgent fix for improper redefinition of _WINNT_VERSION for
Windows 10/11
(https://github.com/savoirfairelinux/opendht/pull/716#issuecomment-2793129052)
- Compile definitions fixed for opendht_EXPORTS and OPENDHT_BUILD
in build scenario for OPENDHT_TOOLS
- Urgent fix for GnuTLS version handler in the code (type
redefinition in version 3.8.7 and later)
https://github.com/savoirfairelinux/opendht/pull/716#issuecomment-2792592951
- Various fixes for proper dynamic linking in Windows
- Built and tested in dynamic and static build scenarios under
MSYS2 in Windows 10 and Windows 11, proven working. The
static build does not seem fully static, the redevelopment
of the MSVC build scenario is proposed by @novemus
- Built and tested in static mode under MSVC/Visual Studio 2022.
Proven working
- Improper usage of the C's free() function is detected in GnuTLS
dynamically linked in Windows (shiftmedia-gnutls 3.7.2 to 3.8.7)
- Added a MSVC-specific source hack to avoid using gnutls_free()
function when built in Windows using dynamic link.
!!! CAUTION !!!
This implementation should be considered as a dirty hack likely
leading to memory leaks! The code should be thoroughly tested
and refactored to avoid memory leaks, but the true origin of
errors is still not revealed [TODO]
- My respect to @novemus and his works over #716