Closed tdarbinyan closed 3 months ago
Can you verify that you actually install/use version 0.21.2 of the port?
It seems that they don't define RTC_EXPORTS
when building the dynamic lib, but I would need to check that.
Unfortunately the examples can't be built standalone without patching, otherwise I might have added a test port with https://github.com/microsoft/vcpkg/pull/40337. The streamer examples looks like a good candidate.
Yes, it's the version 0.21.2. When reinstalling I cleared the archive so it's most certainly the latest version
Do you know if the version before worked? (Don't spend extra time, it is just personal interest after authoring the last port update.)
Before the update example was not working, unfortunately i didn't save the error log, but it was all LNK2019 of rtc:: elements and no other errors.
But aside from the example, I tried to write some minimal code in a new project (just declaring a variable of type rtc::Configuration and modifying it). What's interesting, it worked before but doesn't now
WIN32_LEAN_AND_MEAN
definition.Sorry, I forgot to mention, that I already added it before every #include <windows.h>
, also linked against ws2_32.lib for winsock. I will try to reinstall everything and try once more
Oops, I see another RTC_STATIC
now.
Hello! When can I test the updated port? Is the problem diagnosed and is it close to the solution? Sorry if the question is rude, but I have a deadline set. I appreciate your help very much✨
https://github.com/microsoft/vcpkg/pull/40439. Reminds me of the second RTC_STATIC.
Reminds me of the second RTC_STATIC.
Already fixed. Just waiting for feedback.
I cloned the pr on the fresh github clone of vcpkg, installed libdatachannel, but the issue persisted. But I noticed something. In CMakeLists.txt
of the example there is this piece of code
if(MSVC)
add_custom_command(TARGET streamer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
$<TARGET_FILE_DIR:streamer>
)
endif()
but the is no datachannel.dll
anywhere to be found in my vcpkg folder. I tried to copy it from cmake build of the exact libdatachannel repository to vcpkg\installed\x86-windows\bin
, but sadly it didn't help. Where should I paste the datachannel.dll
file to test if it's the reason of failure?
I cloned the pr on the fresh github clone of vcpkg, installed libdatachannel, but the issue persisted.
The original link issue?
But I noticed something. In
CMakeLists.txt
of the example there is this piece of code ...
This is for copying a runtime lib. That's not for the link issue but for runtime. vcpkg has another way for appl-local deployment, but with the link error, you don't get to POST_BUILD
.
the is no datachannel.dll anywhere to be found in my vcpkg folder.
Hm, vcpkg CI also doesn't have DLLs... I have to take second look.
the is no datachannel.dll anywhere to be found in my vcpkg folder.
Hm, vcpkg CI also doesn't have DLLs... I have to take second look.
Found it :facepalm: PR updated.
I applied your latest change and my minimal code from here
But aside from the example, I tried to write some minimal code in a new project (just declaring a variable of type rtc::Configuration and modifying it). What's interesting, it worked before but doesn't now
started working again. What comes to the streamer example, there are now only LINK2019 errors with element, that are inside #ifdef RTC_ENABLE_MEDIA
(which is already a great success). I tried to manually fix that in ports/libdatachannel/portfile.cmake
by adding
file(GLOB_RECURSE ALL_RTC_FILES "${CURRENT_PACKAGES_DIR}/include/rtc/*")
foreach(FILE_PATH ${ALL_RTC_FILES})
vcpkg_replace_string("${FILE_PATH}" "#ifdef RTC_ENABLE_MEDIA" "#if 1")
endforeach()
but sadly without results(
If you want the media stuff, you must install libdatachannel[srtp]
.
Yup, vcpkg install libdatachannel[srtp]:x86-windows --recurse
solved all the problems, I am closing the issue now. Thank you very much!!
Operating system
Windows 11
Compiler
MSVC (VS 2022)
Steps to reproduce the behavior
Failure logs
Additional context
I'm sorry in advance for logs in russian, but I hope the error codes will be enough to grasp what happens. Also I don't know if I filled the issue blank correctly, so feel free to correct me. So here is how it went
I tried recreating the example from libdatachannels github with x86-windows triplet, but received linkage errors as shown in the Failure logs.
Then yesterday I saw, that someone had a similar issue which was corrected in #40337 , so i removed vcpkg completely as vcpkg upgrade is not advised to use, and reinstalled it. All the other dependencies in my main project installed via vcpkg work perfectly fine, but the issue with libdatachannel persists.
I tried also using the static triplet
x86-windows-static
, setvcpkg use static libraries
toYes
and changed/MDd
to/MTd
, and got a bit different kind of errorsNotes: I'm using vcpkg in global mode, also some of the errors are deleted from Failure log because it was too long
Help would be very appreciated, as I lack understanding of why this happens and am stuck for more than a week