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

Cannot compile on Ubuntu 20.04 (Focal) #6

Open
jbmestelan opened this issue Oct 18, 2021 · 1 comment
Open

Cannot compile on Ubuntu 20.04 (Focal) #6

jbmestelan opened this issue Oct 18, 2021 · 1 comment

Comments

@jbmestelan
Copy link

jbmestelan commented Oct 18, 2021

Hello,

I get this error when compiling the current master (be185b4) on Ubuntu 20.04:

%sudo make install
cc blockit.c resources/gschema.c -o blockit.so -fPIC -shared `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0 glib-2.0 gio-2.0` 
blockit.c: In function ‘web_page_send_request’:
blockit.c:34:2: warning: implicit declaration of function ‘g_uri_split’ [-Wimplicit-function-declaration]
   34 |  g_uri_split(request_uri, G_URI_FLAGS_NONE, NULL, NULL, NULL, NULL, &path, NULL, NULL, NULL);
      |  ^~~~~~~~~~~
blockit.c:34:27: error: ‘G_URI_FLAGS_NONE’ undeclared (first use in this function); did you mean ‘G_RESOURCE_FLAGS_NONE’?
   34 |  g_uri_split(request_uri, G_URI_FLAGS_NONE, NULL, NULL, NULL, NULL, &path, NULL, NULL, NULL);
      |                           ^~~~~~~~~~~~~~~~
      |                           G_RESOURCE_FLAGS_NONE
blockit.c:34:27: note: each undeclared identifier is reported only once for each function it appears in
blockit.c: In function ‘console_message_sent_callback’:
blockit.c:118:25: error: ‘G_URI_FLAGS_NONE’ undeclared (first use in this function); did you mean ‘G_RESOURCE_FLAGS_NONE’?
  118 |   g_uri_split(page_uri, G_URI_FLAGS_NONE, NULL, NULL, &path, NULL, NULL, NULL, NULL, NULL);
      |                         ^~~~~~~~~~~~~~~~
      |                         G_RESOURCE_FLAGS_NONE
blockit.c: In function ‘document_loaded_callback’:
blockit.c:102:3: warning: ignoring return value of ‘jsc_context_evaluate’, declared with attribute warn_unused_result [-Wunused-result]
  102 |   jsc_context_evaluate(js_context, res->str, -1);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blockit.c: In function ‘pick_elem’:
blockit.c:160:2: warning: ignoring return value of ‘jsc_context_evaluate’, declared with attribute warn_unused_result [-Wunused-result]
  160 |  jsc_context_evaluate(js_context, zap_js, -1);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blockit.c: In function ‘block_elem’:
blockit.c:170:2: warning: ignoring return value of ‘jsc_context_evaluate’, declared with attribute warn_unused_result [-Wunused-result]
  170 |  jsc_context_evaluate(js_context, block_js, -1);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:12: blockit.so] Error 1

Am I missing something?

@dudik
Copy link
Owner

dudik commented Oct 19, 2021

Because of the g_uri_split function, blockit requires at least glib 2.66 to be installed. Sadly, Ubuntu 20.04 repositories contain the 2.64.6 version. Ubuntu 20.10 and up seem to support the required version. I should probably replace the function with something more "older glib friedly", but I don't have much time right now, sorry. I don't use Ubuntu, but this question might be helpful: https://askubuntu.com/questions/265111/install-a-single-specific-package-from-future-distribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants