web-dev-qa-db-ja.com

サーフをコンパイルできません、gcr-3.pcが見つかりません、glib.hが見つかりません

私はほとんど成功せずにソースからサーフブラウザーをコンパイルしようとしています。 gcr-3.pcが欠けているようです。

編集:私はUbuntu 19.04にいます

_c99 `pkg-config --cflags x11` `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` -DVERSION=\"2.0\" -DWEBEXTDIR=\"/usr/lib/surf\"  -D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE -fPIC -O -c common.c
Package gcr-3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gcr-3.pc' to the PKG_CONFIG_PATH environment variable
_

echo $ PKG_CONFIG_PATHは何も出力しません。 pkg-config(pkg-config is already the newest version (0.29.1-0ubuntu2))をインストールしたので、どこにフェッチすればよいですか?他のディストリビューションフォーラムでpkg-configについて読むと、それは/ usr/lib/pkgconfigにあるはずですが、ファイルはibus-table.pcだけです。

また、_surf.c:8:10: fatal error: glib.h: No such file or directory_しかし、私はglibを持っています!

_>> cd /usr/include/glib-2.0
>> ls -a
.   gio   glib.h         glib-unix.h  gobject
..  glib  glib-object.h  gmodule.h
_

私は本当にイライラしていて、サーフをコンパイルするための依存関係をリストするドキュメントを見つけることができませんでした。私はそれらを手に入れたと思います、なぜ何も機能しませんか?まだ何も変更していません!

完全なmake出力(タイプに関する多くの警告付き):

_>> Sudo make clean install
rm -f surf surf.o common.o
rm -f libsurf-webext.so libsurf-webext.o
surf build options:
CC            = c99
Package gcr-3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gcr-3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gcr-3' found
CFLAGS        =   -DVERSION="2.0" -DWEBEXTDIR="/usr/lib/surf"  -D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE -fPIC -O
WEBEXTCFLAGS  = -fPIC -pthread -I/usr/include/webkitgtk-4.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/webkitgtk-4.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -O
LDFLAGS       = 
c99 -fPIC `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0` -O -c libsurf-webext.c
libsurf-webext.c: In function ‘msgsurf’:
libsurf-webext.c:48:42: warning: format ‘%c’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  if ((ret = snprintf(msg, sizeof(msg), "%c%c%s",
                                         ~^
                                         %ld
                      2 + sln, p ? p->id : 0, s))
                      ~~~~~~~              
libsurf-webext.c:48:44: warning: format ‘%c’ expects argument of type ‘int’, but argument 5 has type ‘guint64’ {aka ‘long unsigned int’} [-Wformat=]
  if ((ret = snprintf(msg, sizeof(msg), "%c%c%s",
                                           ~^
                                           %ld
                      2 + sln, p ? p->id : 0, s))
                               ~~~~~~~~~~~~~ 
libsurf-webext.c: In function ‘readpipe’:
libsurf-webext.c:84:2: warning: ‘webkit_dom_document_get_default_view’ is deprecated [-Wdeprecated-declarations]
  if (!p || !(view = webkit_dom_document_get_default_view(
  ^~
In file included from /usr/include/webkitgtk-4.0/webkitdom/webkitdom.h:42,
                 from /usr/include/webkitgtk-4.0/webkit2/WebKitFrame.h:32,
                 from /usr/include/webkitgtk-4.0/webkit2/webkit-web-extension.h:33,
                 from libsurf-webext.c:7:
/usr/include/webkitgtk-4.0/webkitdom/WebKitDOMDocument.h:640:1: note: declared here
 webkit_dom_document_get_default_view(WebKitDOMDocument* self);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsurf-webext.c:92:3: warning: ‘webkit_dom_dom_window_get_inner_width’ is deprecated [-Wdeprecated-declarations]
   ww = webkit_dom_dom_window_get_inner_width(view);
   ^~
In file included from /usr/include/webkitgtk-4.0/webkitdom/webkitdom.h:40,
                 from /usr/include/webkitgtk-4.0/webkit2/WebKitFrame.h:32,
                 from /usr/include/webkitgtk-4.0/webkit2/webkit-web-extension.h:33,
                 from libsurf-webext.c:7:
/usr/include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindow.h:371:1: note: declared here
 webkit_dom_dom_window_get_inner_width(WebKitDOMDOMWindow* self);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsurf-webext.c:93:3: warning: ‘webkit_dom_dom_window_scroll_by’ is deprecated [-Wdeprecated-declarations]
   webkit_dom_dom_window_scroll_by(view,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/webkitgtk-4.0/webkitdom/webkitdom.h:40,
                 from /usr/include/webkitgtk-4.0/webkit2/WebKitFrame.h:32,
                 from /usr/include/webkitgtk-4.0/webkit2/webkit-web-extension.h:33,
                 from libsurf-webext.c:7:
/usr/include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindow.h:191:1: note: declared here
 webkit_dom_dom_window_scroll_by(WebKitDOMDOMWindow* self, gdouble x, gdouble y);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsurf-webext.c:99:3: warning: ‘webkit_dom_dom_window_get_inner_height’ is deprecated [-Wdeprecated-declarations]
   wh = webkit_dom_dom_window_get_inner_height(view);
   ^~
In file included from /usr/include/webkitgtk-4.0/webkitdom/webkitdom.h:40,
                 from /usr/include/webkitgtk-4.0/webkit2/WebKitFrame.h:32,
                 from /usr/include/webkitgtk-4.0/webkit2/webkit-web-extension.h:33,
                 from libsurf-webext.c:7:
/usr/include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindow.h:358:1: note: declared here
 webkit_dom_dom_window_get_inner_height(WebKitDOMDOMWindow* self);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libsurf-webext.c:100:3: warning: ‘webkit_dom_dom_window_scroll_by’ is deprecated [-Wdeprecated-declarations]
   webkit_dom_dom_window_scroll_by(view,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/webkitgtk-4.0/webkitdom/webkitdom.h:40,
                 from /usr/include/webkitgtk-4.0/webkit2/WebKitFrame.h:32,
                 from /usr/include/webkitgtk-4.0/webkit2/webkit-web-extension.h:33,
                 from libsurf-webext.c:7:
/usr/include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindow.h:191:1: note: declared here
 webkit_dom_dom_window_scroll_by(WebKitDOMDOMWindow* self, gdouble x, gdouble y);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c99 `pkg-config --cflags x11` `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` -DVERSION=\"2.0\" -DWEBEXTDIR=\"/usr/lib/surf\"  -D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE -fPIC -O -c common.c
Package gcr-3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gcr-3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gcr-3' found
c99 -shared -Wl,-soname,libsurf-webext.so  -o libsurf-webext.so \
    libsurf-webext.o common.o `pkg-config --libs webkit2gtk-4.0 webkit2gtk-web-extension-4.0`
c99 `pkg-config --cflags x11` `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` -DVERSION=\"2.0\" -DWEBEXTDIR=\"/usr/lib/surf\"  -D_DEFAULT_SOURCE -DGCR_API_SUBJECT_TO_CHANGE -fPIC -O -c surf.c
Package gcr-3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gcr-3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gcr-3' found
surf.c:8:10: fatal error: glib.h: No such file or directory
 #include <glib.h>
          ^~~~~~~~
compilation terminated.
make: *** [Makefile:24: surf.o] Error 1

_

私は作る前にこれらすべての依存関係を手動でインストールしました:

_build-essential
pkg-config
libglib2.0-dev
libgcc-4.8-dev
libseed-gtk4-dev
libgtk-3-dev
webkit2gtk-4.0
gdb
gdb-debug
dmenu
_

この投稿全体をお読みいただきありがとうございます。

1
Alunduyn

ターミナルでSudo apt update && Sudo apt install libgcr-3-dev <-を実行します buntu 18.04 LTSの場合 。あなたはあなたが使っているUbuntuのバージョンを言っていませんでした。

3
marko