Skip to content

Cannot compile on Ubuntu 20.04 (Focal) #6

@jbmestelan

Description

@jbmestelan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions