Skip to content

Libtorrent 2.1.1 build fails #8733

Description

@alervd

I'm trying to use the very same build script which I've successfully used to build Libtorrent 2.0.11 for Windows.
Build seems to going fine and it actually builds the static lib. However, at the very end, it outputs weird errors and fails.

Is it a bug? Or maybe something was changed in the build system and I need to adjust my build script accordingly?

[... omitted output ....]
common.copy D:\Work\Source\proj\libtorrent-build\v2_1\windowsx86\lib\libtorrent-rasterbar.lib
bin\msvc-14.3\debug\cxxstd-20-iso\deprecated-functions-off\link-static\logging-off\threading-multi\libtorrent-rasterbar.lib
        1 file(s) copied.
Jamfile<D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel>.make_libjuice_msvc deps\libdatachannel\bin\juice-static.lib
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.42.34436.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Configuring done (8.5s)
-- Generating done (0.1s)
-- Build files have been written to: D:/Work/Source/proj/libtorrent-build/v2_1/libtorrent-x86/deps/libdatachannel/deps/libjuice/build-openssl-debug
MSBuild version 17.12.12+1cce77968 for .NET Framework
Build started 8/14/2026 12:46:46 PM.

Project "D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln" on node 1 (default targets).
D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln.metaproj : error MSB4126: The specified solution configuration "debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln]
Done Building Project "D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln" (default targets) -- FAILED.

Build FAILED.

"D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
  D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln.metaproj : error MSB4126: The specified solution configuration "debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\libjuice\build-openssl-debug\libjuice.sln]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.05
'cp' is not recognized as an internal or external command,
operable program or batch file.

        SET OLDD=%CD%
    cd D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel/deps/libjuice
    mkdir build-openssl-debug
    cd build-openssl-debug
    cmake -G "Visual Studio 17 2022" -DUSE_NETTLE=0 ..
    msbuild libjuice.sln /property:Configuration=debug
    cd %OLDD%
    cp D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel/deps/libjuice/build-openssl-debug/Release/juice-static.lib deps\libdatachannel\bin\juice-static.lib

...failed Jamfile<D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel>.make_libjuice_msvc deps\libdatachannel\bin\juice-static.lib...
...skipped <pD:\Work\Source\proj\libtorrent-build\v2_1\windowsx86\lib>juice-static.lib for lack of <pdeps\libdatachannel\bin>juice-static.lib...
Jamfile<D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel>.make_libusrsctp_msvc deps\libdatachannel\bin\usrsctp.lib
CMake Warning (dev) at CMakeLists.txt:32 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.42.34436.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- No build type selected, using DEBUG
-- Looking for include file sys/queue.h
-- Looking for include file sys/queue.h - not found
-- Looking for include files sys/socket.h, linux/if_addr.h
-- Looking for include files sys/socket.h, linux/if_addr.h - not found
-- Looking for include files sys/socket.h, linux/rtnetlink.h
-- Looking for include files sys/socket.h, linux/rtnetlink.h - not found
-- Looking for 4 include files sys/types.h, ..., netinet/ip_icmp.h
-- Looking for 4 include files sys/types.h, ..., netinet/ip_icmp.h - not found
-- Looking for 3 include files sys/types.h, ..., net/route.h
-- Looking for 3 include files sys/types.h, ..., net/route.h - not found
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - not found
-- Looking for usrsctp.h
-- Looking for usrsctp.h - found
-- Performing Test have_sa_len
-- Performing Test have_sa_len - Failed
-- Performing Test have_sin_len
-- Performing Test have_sin_len - Failed
-- Performing Test have_sin6_len
-- Performing Test have_sin6_len - Failed
-- Performing Test have_sconn_len
-- Performing Test have_sconn_len - Failed
-- Compiler flags (CMAKE_C_FLAGS): /DWIN32 /D_WINDOWS /W4 /wd4100 /wd4127 /wd4200 /wd4214 /wd4706 /wd4245 /wd4389 /wd4702 /wd4701 /wd4244
-- Performing Test has_wno_address_of_packed_member
-- Performing Test has_wno_address_of_packed_member - Failed
-- Performing Test has_wno_deprecated_declarations
-- Performing Test has_wno_deprecated_declarations - Failed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- link library: ws2_32
-- Configuring done (15.4s)
-- Generating done (0.1s)
-- Build files have been written to: D:/Work/Source/proj/libtorrent-build/v2_1/libtorrent-x86/deps/libdatachannel/deps/usrsctp/build-debug
MSBuild version 17.12.12+1cce77968 for .NET Framework
Build started 8/14/2026 12:46:52 PM.

Project "D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln" on node 1 (default targets).
D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln.metaproj : error MSB4126: The specified solution configuration "debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln]
Done Building Project "D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln" (default targets) -- FAILED.

Build FAILED.

"D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
  D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln.metaproj : error MSB4126: The specified solution configuration "debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel\deps\usrsctp\build-debug\usrsctplib.sln]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.04
'cp' is not recognized as an internal or external command,
operable program or batch file.

        SET OLDD=%CD%
    cd D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel/deps/usrsctp
    mkdir build-debug
    cd build-debug
    cmake -G "Visual Studio 17 2022" -Dsctp_werror=0 -Dsctp_build_shared_lib=0 -Dsctp_build_programs=0 -Dsctp_inet=0 -Dsctp_inet6=0 ..
    msbuild usrsctplib.sln /property:Configuration=debug
    cd %OLDD%
    cp D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel/deps/usrsctp/build-debug/usrsctplib/Release/usrsctp.lib deps\libdatachannel\bin\usrsctp.lib

...failed Jamfile<D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel>.make_libusrsctp_msvc deps\libdatachannel\bin\usrsctp.lib...
...skipped <pD:\Work\Source\proj\libtorrent-build\v2_1\windowsx86\lib>usrsctp.lib for lack of <pdeps\libdatachannel\bin>usrsctp.lib...

...updated 589 targets...

...skipped 2 targets...
   <pD:\Work\Source\proj\libtorrent-build\v2_1\windowsx86\lib>juice-static.lib
   <pD:\Work\Source\proj\libtorrent-build\v2_1\windowsx86\lib>usrsctp.lib

...failed updating 2 targets...
   Jamfile<D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel>.make_libjuice_msvc deps\libdatachannel\bin\juice-static.lib
   Jamfile<D:\Work\Source\proj\libtorrent-build\v2_1\libtorrent-x86\deps\libdatachannel>.make_libusrsctp_msvc deps\libdatachannel\bin\usrsctp.lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions