Bug 142577

Summary: [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebKitGTKAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cgarcia, commit-queue, jonathon, mrobinson, ossy, pnormand, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Carlos Alberto Lopez Perez 2015-03-11 06:07:10 PDT
Building EFL or GTK with -DENABLE_WEB_AUDIO=OFF is broken (ENABLE_VIDEO is by default on) because the linker needs the flag -lgstaudio-1.0 due to the included functions of gst_stream_volume_get_volume/gst_stream_volume_set_volume/gst_stream_volume_get_type on MediaPlayerPrivateGStreamerBase.cpp when ENABLE_VIDEO is active, and this flag is only used when WEB_AUDIO is also enabled (the default).

This is the error:

$ Tools/Scripts/build-webkit --gtk --release --cmakeargs='-DENABLE_WEB_AUDIO=OFF'
FAILED: : && /usr/lib/ccache/clang++  -fPIC  -std=c++11 -Qunused-arguments -O3 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti  -Wl,--no-undefined  -L/home/clopez/webkit/webkit/WebKitBuild/DependenciesGTK/Root/lib64  -fuse-ld=gold -Wl,--disable-new-dtags -fuse-ld=gold -Wl,--disable-new-dtags -shared -Wl,-soname,libwebkit2gtk-4.0.so.37 -o lib/libwebkit2gtk-4.0.so.37.5.0 @CMakeFiles/WebKit2.rsp  && :
lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.o):-:function WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin(): error: undefined reference to 'gst_stream_volume_get_type'
lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.o):-:function WebCore::MediaPlayerPrivateGStreamerBase::setVolume(float): error: undefined reference to 'gst_stream_volume_set_volume'
lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.o):-:function WebCore::MediaPlayerPrivateGStreamerBase::volume() const: error: undefined reference to 'gst_stream_volume_get_volume'
lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.o):-:function WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange(): error: undefined reference to 'gst_stream_volume_get_volume'
lib/libWebCoreGTK.a(lib/../Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.o):-:function WebCore::mediaPlayerPrivateVolumeChangedCallback(_GObject*, _GParamSpec*, WebCore::MediaPlayerPrivateGStreamerBase*): error: undefined reference to 'gst_stream_volume_get_volume'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

The commit that added that functions to MediaPlayerPrivateGStreamerBase.cpp is r142005 <http://trac.webkit.org/r142005>.
Comment 1 Carlos Alberto Lopez Perez 2015-03-11 06:10:11 PDT
Created attachment 248415 [details]
Patch
Comment 2 Carlos Garcia Campos 2015-03-11 06:16:58 PDT
Comment on attachment 248415 [details]
Patch

It makes sense. Thanks!
Comment 3 WebKit Commit Bot 2015-03-11 07:00:45 PDT
Comment on attachment 248415 [details]
Patch

Clearing flags on attachment: 248415

Committed r181385: <http://trac.webkit.org/changeset/181385>
Comment 4 WebKit Commit Bot 2015-03-11 07:00:51 PDT
All reviewed patches have been landed.  Closing bug.