Hi guys, I have a problem with compilation of the WebkitGTK. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 19.10 Release: 19.10 Codename: eoan wget https://webkitgtk.org/releases/webkitgtk-2.30.1.tar.xz because ThirdParty folder is missing libwebrtc lib I downloaded current git version : https://github.com/WebKit/webkit and copy from there libwebrtc to ThirdParty folder. next cmake .. -DPORT="GTK" -DCMAKE_CXX_COMPILER=clang++-9 -DCMAKE_C_COMPILER=clang-9 -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release -DUSE_WPE_RENDERER=OFF -DENABLE_MINIBROWSER=ON -DENABLE_BUBBLEWRAP_SANDBOX=OFF -DENABLE_MEDIA_SOURCE=OFF -DCMAKE_SKIP_RPATH=ON -DUSE_OPENJPEG=OFF -DENABLE_GTKDOC=OFF -DCMAKE_INSTALL_PREFIX=. -DLIB_INSTALL_DIR=./lib -DENABLE_MEDIA_STREAM=ON -DENABLE_WEB_AUDIO=ON make -j 1 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ 52%] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp.o In file included from /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:26: /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:50:50: error: expected class name class LibWebRTCDataChannelHandler final : public RTCDataChannelHandler, private webrtc::DataChannelObserver { ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:57:12: error: no template named 'Ref' static Ref<RTCDataChannelEvent> channelEvent(Document&, rtc::scoped_refptr<webrtc::DataChannelInterface>&&); ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:61:50: error: only virtual member functions can be marked 'final' void setClient(RTCDataChannelHandlerClient&) final; ^~~~~ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:63:31: error: unknown type name 'CString' bool sendStringData(const CString&) final; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:64:43: error: only virtual member functions can be marked 'final' bool sendRawData(const char*, size_t) final; ^~~~~ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:65:18: error: only virtual member functions can be marked 'final' void close() final; ^~~~~ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:40:16: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' if (options.ordered) ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:41:32: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' init.ordered = *options.ordered; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:42:16: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' if (options.maxPacketLifeTime) ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:43:42: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' init.maxRetransmitTime = *options.maxPacketLifeTime; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:44:16: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' if (options.maxRetransmits) ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:45:39: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' init.maxRetransmits = *options.maxRetransmits; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:46:28: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' init.protocol = options.protocol.utf8().data(); ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:47:16: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' if (options.negotiated) ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:48:35: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' init.negotiated = *options.negotiated; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:49:16: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' if (options.id) ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:50:27: error: member access into incomplete type 'const WebCore::RTCDataChannelInit' init.id = *options.id; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:64:24: error: variable has incomplete type 'WebCore::RTCDataChannelInit' RTCDataChannelInit init; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: forward declaration of 'WebCore::RTCDataChannelInit' struct RTCDataChannelInit; ^ /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:73:20: error: use of undeclared identifier 'RTCDataChannel'; did you mean 'RTCDataChannelInit'? auto channel = RTCDataChannel::create(document, WTFMove(handler), fromStdString(label), WTFMove(init)); ^~~~~~~~~~~~~~ RTCDataChannelInit /home/joe/tools/fuzzing/browsers/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:47:8: note: 'RTCDataChannelInit' declared here struct RTCDataChannelInit; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [Source/WebCore/CMakeFiles/WebCore.dir/build.make:877: Source/WebCore/CMakeFiles/WebCore.dir/Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1360: Source/WebCore/CMakeFiles/WebCore.dir/all] Error 2 make: *** [Makefile:152: all] Error 2 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ any ideas ? Thanks
Hello Joe! We do not support building WebKitGTK with WebRTC support enabled using tarballs—it's more complicated than copying the libwebrtc/ subdirectory. If you want to do such a build, I recommend you to make a checkout of the 2.30.1 tag from the Subversion repository and use that for the build: svn checkout \ https://trac.webkit.org/browser/webkit/releases/WebKitGTK/webkit-2.30.1 \ webkitgtk-2.30.1 (Be patient, this can take quite some time.) *VERY* important: be aware that if you build WebKitGTK with WebRTC enabled you must not link any program licensed under the GPL with that build, because the libwebrtc license is incompatible with the GPL. This is one of the reasons why we don't support building the WebRTC support from tarballs, to avoid letting people accidentally end up with licensing trouble.
Closed, as this is not a bug by itself. Joe: I hope my previous comment helps you out, feel free to ask more questions, and remember that you can also ask in the Freenode #webkitgtk channel :)
Thanks mate ;) Do you guys have something less old school to contact with you ? Like Discord channel ?
BTW: svn checkout https://trac.webkit.org/browser/webkit/releases/WebKitGTK/webkit-2.30.1 svn: E170013: Unable to connect to a repository at URL 'https://trac.webkit.org/browser/webkit/releases/WebKitGTK/webkit-2.30.1' svn: E130005: XML Parsing failed: Unexpected root element 'html'
(In reply to Joe from comment #4) > BTW: > > svn checkout > https://trac.webkit.org/browser/webkit/releases/WebKitGTK/webkit-2.30.1 > > svn: E170013: Unable to connect to a repository at URL > 'https://trac.webkit.org/browser/webkit/releases/WebKitGTK/webkit-2.30.1' > svn: E130005: XML Parsing failed: Unexpected root element 'html' Ouch, sorry about that. I shared the Trac URL instead of the one for the Subversion repository, it should be: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.30.1
(In reply to Joe from comment #3) > Thanks mate ;) > Do you guys have something less old school to contact with you ? Like > Discord channel ? We have a... mailing list: https://lists.webkit.org/mailman/listinfo/webkit-gtk There is also a Slack instance, you can find it linked from the “Getting Started” page of the website: https://webkit.org/getting-started/#staying-in-touch For questions related to WebKitGTK there is a #gtk channel there as well.
Great, thank you.
Chatting on Slack it is clearer that there is an issue here: we want a build with “-DENABLE_MEDIA_STREAM=ON -DENABLE_WEB_RTC=OFF” but then the build fails because enabling MEDIA_STREAM will try to use some libwebrtc types.
Edited the bug title to make it clearer, and added the [GTK] tag. Probably the issue affects the WPE port as well, I'll check and add the tag later on if that is the case.
For the record, I can reproduce this in trunk, so I will make a patch for that first and then we can backport it to the 2.30.x branch to be included in the next stable release :)
Created attachment 410319 [details] Patch
Comment on attachment 410319 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410319&action=review > ChangeLog:10 > + build code that ises libwebrtc types when ENABLE_WEB_RTC is disabled but typo: ises
Created attachment 410323 [details] Patch for landing
Committed r267882: <https://trac.webkit.org/changeset/267882> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410323 [details].
It's still possible to get the following: In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-44.cpp:5: ../Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp: In static member function ‘static WebCore::CaptureSourceOrError WebCore::MockRealtimeAudioSource::create(WTF::String&&, WTF::String&&, WTF::String&&, const WebCore::MediaConstraints*)’: ../Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp:57:108: error: invalid new-expression of abstract class type ‘WebCore::MockRealtimeAudioSource’ 57 | auto source = adoptRef(*new MockRealtimeAudioSource(WTFMove(deviceID), WTFMove(name), WTFMove(hashSalt))); | ^ In file included from ../Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp:32, from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-44.cpp:5: ../Source/WebCore/platform/mock/MockRealtimeAudioSource.h:43:7: note: because the following virtual functions are pure within ‘WebCore::MockRealtimeAudioSource’: 43 | class MockRealtimeAudioSource : public RealtimeMediaSource { | ^~~~~~~~~~~~~~~~~~~~~~~ ../Source/WebCore/platform/mock/MockRealtimeAudioSource.h:53:18: note: ‘virtual void WebCore::MockRealtimeAudioSource::render(WTF::Seconds)’ 53 | virtual void render(Seconds) = 0; | ^~~~~~ In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-44.cpp:7: ../Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp: In static member function ‘static WebCore::CaptureSourceOrError WebCore::MockRealtimeVideoSource::create(WTF::String&&, WTF::String&&, WTF::String&&, const WebCore::MediaConstraints*)’: ../Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp:62:108: error: invalid new-expression of abstract class type ‘WebCore::MockRealtimeVideoSource’ 62 | auto source = adoptRef(*new MockRealtimeVideoSource(WTFMove(deviceID), WTFMove(name), WTFMove(hashSalt))); | ^ In file included from ../Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h:34, from ../Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp:39, from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-44.cpp:5: ../Source/WebCore/platform/mock/MockRealtimeVideoSource.h:49:7: note: because the following virtual functions are pure within ‘WebCore::MockRealtimeVideoSource’: 49 | class MockRealtimeVideoSource : public RealtimeVideoCaptureSource, private OrientationNotifier::Observer { | ^~~~~~~~~~~~~~~~~~~~~~~ ../Source/WebCore/platform/mock/MockRealtimeVideoSource.h:58:18: note: ‘virtual void WebCore::MockRealtimeVideoSource::updateSampleBuffer()’ 58 | virtual void updateSampleBuffer() = 0; | ^~~~~~~~~~~~~~~~~~
Created attachment 410380 [details] Patch
Comment on attachment 410380 [details] Patch ../../Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:30:50: error: ‘LibWebRTCAudioFormat’ has not been declared
Created attachment 410436 [details] Patch for landing
Committed r267934: <https://trac.webkit.org/changeset/267934> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410436 [details].