Tracktion / choc

A collection of header only classes, permissively licensed, to provide basic useful tasks with the bare-minimum of dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linux build failing...

rorywalsh opened this issue · comments

Hi Jules, I just tried the last master and develop branch on Linux without any success. Looks like I have all the dependencies I need: 

rory@rory-MS-7B17:~/sourcecode/choc/tests/build$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")  
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.24.20
-- Checking for module 'webkit2gtk-4.0'
--   Found webkit2gtk-4.0, version 2.32.4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rory/sourcecode/choc/tests/build

But when I build I get hit with lots of these errors:

 33%] Building CXX object CMakeFiles/choc_tests.dir/main.cpp.o
In file included from /home/rory/sourcecode/choc/tests/choc_tests.h:26,
                 from /home/rory/sourcecode/choc/tests/main.cpp:19:
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h: In lambda function:
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:253:42: error: there are no arguments to ‘webkit_uri_scheme_response_new’ that depend on a template parameter, so a declaration of ‘webkit_uri_scheme_response_new’ must be available [-fpermi
ssive]
  253 |                         auto* response = webkit_uri_scheme_response_new (stream, -1);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:253:42: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h: In instantiation of ‘choc::ui::WebView::Pimpl::Pimpl(choc::ui::WebView&, const choc::ui::WebView::Options&)::<lambda(auto:5*, auto:6*)> [with auto:5 = _WebKitURISchemeRequest; auto:6 = void
]’:
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:222:46:   required by substitution of ‘template<class auto:5, class auto:6> constexpr choc::ui::WebView::Pimpl::Pimpl(choc::ui::WebView&, const choc::ui::WebView::Options&)::<lambda(auto:5*,
 auto:6*)>::operator decltype (((const choc::ui::WebView::Pimpl::Pimpl(choc::ui::WebView&, const choc::ui::WebView::Options&)::<lambda(auto:5*, auto:6*)>*)0)->operator()<auto:5, auto:6>(static_cast<auto:5*&&>(<anonymous>), static_cast<auto:6*&&>
(<anonymous>))) (*)(auto:5*, auto:6*)() const [with auto:5 = _WebKitURISchemeRequest; auto:6 = void]’
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:270:111:   required from here
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:236:73: error: ‘webkit_uri_scheme_response_new’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_finish’?
  236 |                         auto* response = webkit_uri_scheme_response_new (stream, static_cast<gint64> (bytes.size()));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          webkit_uri_scheme_request_finish
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:237:63: error: ‘webkit_uri_scheme_response_set_status’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_get_path’?
  237 |                         webkit_uri_scheme_response_set_status (response, 200, nullptr);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      |                         webkit_uri_scheme_request_get_path
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:238:69: error: ‘webkit_uri_scheme_response_set_content_type’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_get_type’?
  238 |                         webkit_uri_scheme_response_set_content_type (response, mimeType.c_str());
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         webkit_uri_scheme_request_get_type
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:243:69: error: ‘webkit_uri_scheme_response_set_http_headers’ was not declared in this scope; did you mean ‘webkit_uri_response_get_http_headers’?
  243 |                         webkit_uri_scheme_response_set_http_headers (response, headers); // response takes ownership of the headers
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                         webkit_uri_response_get_http_headers
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:245:72: error: ‘webkit_uri_scheme_request_finish_with_response’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_finish_error’?
  245 |                         webkit_uri_scheme_request_finish_with_response (request, response);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                         webkit_uri_scheme_request_finish_error
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:253:73: error: ‘webkit_uri_scheme_response_new’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_finish’?
  253 |                         auto* response = webkit_uri_scheme_response_new (stream, -1);
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
      |                                          webkit_uri_scheme_request_finish
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:254:63: error: ‘webkit_uri_scheme_response_set_status’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_get_path’?
  254 |                         webkit_uri_scheme_response_set_status (response, 404, nullptr);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      |                         webkit_uri_scheme_request_get_path
/home/rory/sourcecode/choc/tests/../gui/choc_WebView.h:256:72: error: ‘webkit_uri_scheme_request_finish_with_response’ was not declared in this scope; did you mean ‘webkit_uri_scheme_request_finish_error’?
  256 |                         webkit_uri_scheme_request_finish_with_response (request, response);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                         webkit_uri_scheme_request_finish_error
make[2]: *** [CMakeFiles/choc_tests.dir/build.make:83: CMakeFiles/choc_tests.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/choc_tests.dir/all] Error 2
make: *** [Makefile:161: all] Error 2

Perhaps there is a quick fix for this?

I've no idea - probably you've just got an old version of webkit, and need to update it? GCC 9 is pretty old.

Ok, thanks Jules, I had assumed the Cmake script was checking that my dependencies were up to the task. I'll post back if I find the solution.

So my version of webkit was Ok, but I needed to update libjavascriptcoregtk. I'm up and running now. Sorry for the noise. 👍

Glad you figured it out.
For "how to" stuff like this, maybe our discord channel would be a better place to ask

👍