none
Webrtc media server with chromium build issue in Visual studio 2019 RRS feed

  • Question

  • Hello All,

    I'm actually facing a problem while building my webrtc-media-server using Visual Studio 2019. What's happening is I'm using chromium as an additional dependency in my media-server and I know that chromium doesn't support MSVC build. For that I'm using is_clang=true so that the msvc compiler is not selected and it also builds successfully using ninja. But when I use my media-server with chromium as mentioned earlier I'm getting this error.

     Error C1189 #error: "Only clang-cl is supported on Windows, see https://crbug.com/988071"   Server D:\projects\chromium-src\src\base\compiler_specific.h   13 


    The code responsible for this in chromium is this in base/compiler_specific.h

        #if defined(COMPILER_MSVC)
        #if !defined(__clang__)
        #error "Only clang-cl is supported on Windows, see https://crbug.com/988071"
        #endif
        ....
        ....
        ....

    I'm not able to get why is VisualStudio not detecting clang. I even did install LLVM 9.0 from its official source but was of no help.

     Please correct my steps if I'm wrong and suggest me anything by which I can run my media-server  



    vishal


    Thursday, March 12, 2020 9:26 AM

All replies

  • Hi _remo,

    Welcome to MSDN forum.

    You could try to go to Project Properties -> C/C++ -> Preprocessor Definitions, then define "__clang__"

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, March 13, 2020 2:28 AM
  • Thanks for that Dylan, Now the Visual studio detects __clang__ but there is one more issue now Error STL1000:: Unexpected compiler version, expected Clang 8.0.1 or newer. But my clang version is 9.0

    clang version 9.0.0 (tags/RELEASE_900/final)
    Target: i686-pc-windows-msvc
    Thread model: posix
    InstalledDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\bin


    vishal



    • Edited by _remo Friday, March 13, 2020 6:45 AM
    Friday, March 13, 2020 4:57 AM
  • Hi _remo,

    Thank you for reply.

    According this new error, could you provide a sample using OneDrive or github, to help us analysis it better?

    Looking forward to your reply.

    Best Regards,

    Dylan 


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, March 13, 2020 9:15 AM
  • Thanks for the reply Dylan

    All I can share is these error traces as its a huge workspace.

    1>------ Build started: Project: MediaServer, Configuration: Debug x64 ------
    1>stdafx.cpp
    1>AudioModule.cc
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>Controller.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>H264HWEncoder.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>MediaServerBasics.cpp
    1>MediaServer.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>AudioEncoder.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>AudioMixer.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>Mixer.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>Components.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>HWVideoMixer.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>MCURoom.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>MediaSource.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>RenderTest.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>RoomManager.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>Semaphore.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>SignallingChannel.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>VideoMixer.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>WebSocketServer.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>VideoAccelerator.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>VideoMixingUtils.cpp
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\yvals_core.h(417,1): fatal error C1189: #error:  STL1000: Unexpected compiler version, expected Clang 8.0.1 or newer.
    1>Generating Code...
    1>Done building project "MediaServer.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Looking Forward for a reply....

    Thank You


    vishal



    • Edited by _remo Friday, March 13, 2020 10:49 AM
    Friday, March 13, 2020 9:30 AM
  • @dylan

    #include <iostream>
    
    int main()
    {
        std::cout << "Hello!\n";
    }
    

    Even this code with __clang__ has these errors, if not given __clang__ then works fine.


    vishal

    Monday, March 16, 2020 12:48 PM
  • And Dylan is there anything I need to do after setting __clang__ . Like I just tried with another console application with this macro and it shows the same amount of errors for a hello world program.

    I'm actually struck at this for long time now please do give me some suggestion's to overcome this.....!


    vishal

    Tuesday, March 17, 2020 11:07 AM
  • Hi _remo,

    Sorry for delay in reply.

    I tried a new console application with clang toolset, then I add __clang__ in Preprocessor Definitions, and it could build without errors. It may be caused by your environment. 

    Since we just discuss about msbuild tool on local environment, please go to stackoverflow with chromium and webrtc tag, and then you will get better support there.

    Thank you for understanding.

    Best Regards,

    Dylan



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, March 20, 2020 9:47 AM