ortclib / ortclib-sdk

C# / C++ ORTC Lib SDK for UWP, iOS, and Android
BSD 2-Clause "Simplified" License
100 stars 36 forks source link

m62 branch: broken ortclib-sdk\webrtc\windows\solutions\WebRtc.sln #6

Closed vmancic closed 6 years ago

vmancic commented 6 years ago

//////////////////////////// error ////////////////////////////// 4>webrtc.lib(files.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in DataChannel.obj

//////////////////////////// log //////////////////////////// 4>------ Build started: Project: Org.WebRtc.Uwp, Configuration: Debug x64 ------ 4>DataChannel.cc 4>GlobalObserver.cc 4>Marshalling.cc 4>Media.cc 4>MediaSourceHelper.cc 4>PeerConnectionInterface.cc 4>RTMediaStreamSource.cc 4>WinUWPDeviceManager.cc 4>LINK : the 32-bit linker (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe) failed to do memory mapped file I/O on `C:\Work\mar26-ortclib-m62\ortclib-sdk\webrtc\windows\projects\msvc\Org.WebRtc.Uwp..........\webrtc\xplatform\webrtc\WEBRTC_BUILD\webrtc\Debug\x64\webrtc.lib' and is going to restart linking with a 64-bit linker for better throughput 4>LINK : failed to locate a 64-bit linker on %PATH%; continue the current linking 4>webrtc.lib(files.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in DataChannel.obj 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: bool cdecl std::ios_base::good(void)const " (?good@ios_base@std@@QEBA_NXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: int cdecl std::ios_base::flags(void)const " (?flags@ios_base@std@@QEBAHXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: int64 cdecl std::basic_streambuf<char,struct std::char_traits >::sputn(char const ,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits > cdecl std::basic_ios<char,struct std::char_traits >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits > * __cdecl std::basic_ios<char,struct std::char_traits >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: char cdecl std::basic_ios<char,struct std::char_traits >::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: void cdecl std::basic_ostream<char,struct std::char_traits >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits > & __cdecl std::basic_ostream<char,struct std::char_traits >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: bool cdecl std::ios_base::fail(void)const " (?fail@ios_base@std@@QEBA_NXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: cdecl std::basic_streambuf<char,struct std::char_traits >::basic_streambuf<char,struct std::char_traits >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: virtual __cdecl std::basic_streambuf<char,struct std::char_traits >::~basic_streambuf<char,struct std::char_traits >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: char * cdecl std::basic_streambuf<char,struct std::char_traits >::eback(void)const " (?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: char __cdecl std::basic_streambuf<char,struct std::char_traits >::gptr(void)const " (?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: char cdecl std::basic_streambuf<char,struct std::char_traits >::pptr(void)const " (?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits >::egptr(void)const " (?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: void cdecl std::basic_streambuf<char,struct std::char_traits >::gbump(int)" (?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: void cdecl std::basic_streambuf<char,struct std::char_traits >::setg(char ,char ,char )" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: char __cdecl std::basic_streambuf<char,struct std::char_traits >::epptr(void)const " (?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: void cdecl std::basic_streambuf<char,struct std::char_traits >::pbump(int)" (?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: void cdecl std::basic_streambuf<char,struct std::char_traits >::setp(char ,char )" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: virtual cdecl std::basic_ios<char,struct std::char_traits >::~basic_ios<char,struct std::char_traits >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "protected: cdecl std::basic_ios<char,struct std::char_traits >::basic_ios<char,struct std::char_traits >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: cdecl std::basic_ostream<char,struct std::char_traits >::basic_ostream<char,struct std::char_traits >(class std::basic_streambuf<char,struct std::char_traits > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: virtual cdecl std::basic_ostream<char,struct std::char_traits >::~basic_ostream<char,struct std::char_traits >(void)" (??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: cdecl std::basic_istream<char,struct std::char_traits >::basic_istream<char,struct std::char_traits >(class std::basic_streambuf<char,struct std::char_traits > ,bool)" (??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: virtual __cdecl std::basic_istream<char,struct std::char_traits >::~basic_istream<char,struct std::char_traits >(void)" (??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: cdecl std::locale::id::operator unsigned int64(void)" (??Bid@locale@std@@QEAA_KXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: bool cdecl std::ctype::is(short,char)const " (?is@?$ctype@D@std@@QEBA_NFD@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: static unsigned int64 __cdecl std::ctype::_Getcat(class std::locale::facet const ,class std::locale const )" (?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: bool cdecl std::ios_base::eof(void)const " (?eof@ios_base@std@@QEBA_NXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: class std::locale cdecl std::ios_base::getloc(void)const " (?getloc@ios_base@std@@QEBA?AVlocale@2@XZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: int cdecl std::basic_streambuf<char,struct std::char_traits >::sgetc(void)" (?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits >::snextc(void)" (?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: bool cdecl std::basic_istream<char,struct std::char_traits >::_Ipfx(bool)" (?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: class std::basic_istream<char,struct std::char_traits > & cdecl std::basic_istream<char,struct std::char_traits >::read(char *,int64)" (?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z) already defined in webrtc.lib(files.obj) 4>msvcprtd.lib(MSVCP140D_APP.dll) : error LNK2005: "public: int64 cdecl std::basic_istream<char,struct std::char_traits >::gcount(void)const " (?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ) already defined in webrtc.lib(files.obj) 4>LINK : fatal error LNK1104: cannot open file 'libcpmtd.lib' 4>Done building project "Org.WebRtc.Uwp.vcxproj" -- FAILED. 5>------ Build started: Project: PeerConnectionClient.WebRtc, Configuration: Debug x64 ------ 5>CSC : error CS0006: Metadata file 'C:\Work\mar26-ortclib-m62\ortclib-sdk\webrtc\windows\solutions\Build\Output\Org.WebRtc.Uwp\Debug\x64\Org.WebRtc.winmd' could not be found ========== Build: 3 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

vmancic commented 6 years ago

Update:

  1. /////////////////////////////////////////////////////////////////

The code merged from branch Robin/m62-chromium-build is causing LNK2038.

With m62 code that I (fortunately) cloned from ortclib-sdk short time before merge, project Org.WebRtc.Uwp from webrtc/windows/solution/WebRtc.sln builds fine. With m62 code that contains changes merged from Robin/m62-chromium-build, the same Org.WebRtc.Uwp project build fails (with LNK2038).

  1. /////////////////////////////////////////////////////////////////

Linker log "failed to do memory mapped file" appears also in the working code (before merge), so this can be ignored.

  1. /////////////////////////////////////////////////////////////////

I found some useful information here: https://stackoverflow.com/questions/14714877/mismatch-detected-for-runtimelibrary

I tried changing MTd and MDd options for Org.WebRtc.Uwp (from Project Properties -> C/C++ -> Code Generation -> RuntimeLibrary), but this did not help.

  1. ////////////////////////////////////////////////////////////////

I tried also comparing ninja files for working and broken builds. There are 394 ninja files under out/winuwp_x64_debug/obj, and there are differencies between working and broken versions.

They are different in differetn ways. For example, some ninja files are different in MTd/MDd, some other are diferent in libs. For example, obj/webrtc/webrtc.ninja for broken code does not have boringssl_asm.lib while obj/webrtc/webrtc.ninja for working code contains that lib, etc. I tried copying webrtc.ninja from working to broken folder (because webrtc.lib is mentioned in LNK2038 error), but this did not help.