Bug 224089

Summary: [CMake][GStremer] Fails to build if OpenH264 is not present
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WPE WebKitAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, bugs-noreply, calvaris, eric.carlson, ews-watchlist, gyuyoung.kim, mcatanzaro, pnormand, ryuan.choi, sergio, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=202538
Attachments:
Description Flags
Patch none

Description Carlos Alberto Lopez Perez 2021-04-01 17:50:58 PDT
In r275275 optional support for using OpenH264 was added.

However, this seems to be failing to build when OpenH264 is not present because of CMake trying to link with a library that is not defined

See:

-- Enabled features:
--  ENABLE_ACCESSIBILITY .......................... ON
--  ENABLE_BUBBLEWRAP_SANDBOX                       OFF
--  ENABLE_ENCRYPTED_MEDIA ........................ ON
--  ENABLE_GTKDOC                                   OFF
--  ENABLE_MEDIA_SOURCE ........................... ON
--  ENABLE_MINIBROWSER                              ON
--  ENABLE_VIDEO .................................. ON
--  ENABLE_WEBDRIVER                                ON
--  ENABLE_WEB_AUDIO .............................. ON
--  ENABLE_WEB_CRYPTO                               ON
--  ENABLE_WPE_QT_API ............................. OFF
--  ENABLE_XSLT                                     ON
--  USE_LCMS ...................................... ON
--  USE_OPENJPEG                                    ON
--  USE_SOUP2 ..................................... ON
--  USE_SYSTEMD                                     ON
--  USE_WOFF2 ..................................... ON
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Openh264_LIBRARY (ADVANCED)
    linked by target "webrtc" in directory /home/buildbot/wpewebkit/nightly/wpe-linux-64-packaging-nigthly-ubuntu1804/build/Source/ThirdParty/libwebrtc
-- Configuring incomplete, errors occurred!
See also "/home/buildbot/wpewebkit/nightly/wpe-linux-64-packaging-nigthly-ubuntu1804/build/WebKitBuild/Release/CMakeFiles/CMakeOutput.log".
See also "/home/buildbot/wpewebkit/nightly/wpe-linux-64-packaging-nigthly-ubuntu1804/build/WebKitBuild/Release/CMakeFiles/CMakeError.log".
FAILED: build.ninja 

^^ https://build.webkit.org/#/builders/52/builds/56/steps/8/logs/stdio
Comment 1 Carlos Alberto Lopez Perez 2021-04-01 17:58:52 PDT
Created attachment 424970 [details]
Patch
Comment 2 EWS 2021-04-02 01:20:01 PDT
Committed r275409: <https://commits.webkit.org/r275409>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424970 [details].
Comment 3 Michael Catanzaro 2021-04-02 07:32:42 PDT
Will this still be needed in the gst-webrtc implementation?

I wonder what the goal is. It looks like it is not compatible with noopenh264, right? If it was, and if it would still be needed with gst-webrtc, then I could look into packaging noopenh264 for Fedora, to allow this to build, but that requires runtime checks in the application to make sure you're running against real OpenH264 and not noopenh264.

Why is it preferred over x264enc?
Comment 4 Carlos Alberto Lopez Perez 2021-04-02 10:11:43 PDT
(In reply to Michael Catanzaro from comment #3)
> Will this still be needed in the gst-webrtc implementation?
> 
> I wonder what the goal is. It looks like it is not compatible with
> noopenh264, right? If it was, and if it would still be needed with
> gst-webrtc, then I could look into packaging noopenh264 for Fedora, to allow
> this to build, but that requires runtime checks in the application to make
> sure you're running against real OpenH264 and not noopenh264.
> 
> Why is it preferred over x264enc?

This is for libwebrtc, which is not shipped on the tarballs, so I guess is not something a distributor should worry for the moment.

I don't know why is preferred. Maybe ask on bug 202538 for that..