Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build of obs-linuxbrowser #72190

Merged
merged 2 commits into from Oct 28, 2019
Merged

Fix build of obs-linuxbrowser #72190

merged 2 commits into from Oct 28, 2019

Conversation

peti
Copy link
Member

@peti peti commented Oct 28, 2019

I would like to fix the build of obs-linuxbrowser, but it seems like I'll need some help along the way. Hopefully, there's someone who knows a bit about cmake and/or CEF to help me figure out why these builds are failing right now.

Anyhow, I updated CEF to cef_binary_75.0.11+gf50b3c2+chromium-75.0.3770.100, which seems to build fine. Then I updated obs-linuxbrowser to the latest version from https://github.com/bazukas/obs-linuxbrowser, but unfortunately that build fails as follows:

[ 63%] Linking C shared module build/obs-linuxbrowser/bin/64bit/libobs-linuxbrowser.so
[ 63%] Built target obs-linuxbrowser
In file included from /build/source/src/browser/browser-app.cpp:29:
/build/source/src/browser/browser-app.hpp:76:15: error: 'virtual bool BrowserApp::OnProcessMessageReceived(CefRefPtr<CefBrowser>, CefProcessId, CefRefPtr<CefProcessMessage>)' marked 'override', but does not override
  virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
               ^~~~~~~~~~~~~~~~~~~~~~~~
/build/source/src/browser/browser-app.cpp: In member function 'virtual void BrowserApp::OnContextInitialized()':
/build/source/src/browser/browser-app.cpp:316:91: error: no matching function for call to 'CefBrowserHost::CreateBrowserSync(CefWindowInfo&, BrowserClient*, const char [45], CefBrowserSettings&, std::nullptr_t)'
      info, client.get(), "https://github.com/bazukas/obs-linuxbrowser/", settings, nullptr);
                                                                                           ^
In file included from /build/cef/include/../include/cef_print_handler.h:42,
                 from /build/cef/include/../include/cef_browser_process_handler.h:43,
                 from /build/cef/include/cef_app.h:42,
                 from /build/source/src/browser/browser-app.hpp:23,
                 from /build/source/src/browser/browser-app.cpp:29:
/build/cef/include/../include/cef_browser.h:305:32: note: candidate: 'static CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(const CefWindowInfo&, CefRefPtr<CefClient>, const CefString&, const CefBrowserSettings&, CefRefPtr<CefDictionaryValue>, CefRefPtr<CefRequestContext>)'
   static CefRefPtr<CefBrowser> CreateBrowserSync(
                                ^~~~~~~~~~~~~~~~~
/build/cef/include/../include/cef_browser.h:305:32: note:   candidate expects 6 arguments, 5 provided
/build/source/src/browser/browser-app.cpp: In member function 'void BrowserApp::UpdateActiveStateJS(bool)':
/build/source/src/browser/browser-app.cpp:387:17: error: 'class CefBrowser' has no member named 'SendProcessMessage'
  this->browser->SendProcessMessage(PID_BROWSER, msg);
                 ^~~~~~~~~~~~~~~~~~
/build/source/src/browser/browser-app.cpp: In member function 'void BrowserApp::UpdateVisibilityStateJS(bool)':
/build/source/src/browser/browser-app.cpp:395:17: error: 'class CefBrowser' has no member named 'SendProcessMessage'
  this->browser->SendProcessMessage(PID_BROWSER, msg);
                 ^~~~~~~~~~~~~~~~~~
/build/source/src/browser/browser-app.cpp: In function 'void {anonymous}::file_changed(int)':
/build/source/src/browser/browser-app.cpp:42:7: warning: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   read(static_in_fd, (void*) &event, sizeof(inotify_event));
   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/browser_shared.dir/build.make:76: CMakeFiles/browser_shared.dir/src/browser/browser-app.cpp.o] Error 1

Does anyone have an idea what to do about this compiler error?

Cc: @puffnfresh

@peti
Copy link
Member Author

peti commented Oct 28, 2019

I chose that version because [1] suggested that CEF versions before 75.x
worked, whereas newer versions don't compile due to API changes.

[1] https://github.com/bazukas/obs-linuxbrowser/issues/108#issuecomment-513544091
The version number corresponds to "git describe --tags".
@peti
Copy link
Member Author

peti commented Oct 28, 2019

Duh, nothing helps fix problem quite like explaining to problem to someone else in the hope that they can fix it. :-) It turns our that using the 74.x version of CEF is all it took. 🍾

@GrahamcOfBorg build obs-linuxbrowser

@peti peti self-assigned this Oct 28, 2019
@peti peti merged commit 3e13d5e into NixOS:master Oct 28, 2019
@peti peti deleted the t/obs-linuxbrowser branch October 28, 2019 20:58
@c0bw3b c0bw3b mentioned this pull request Nov 29, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant