I've seen this problem before after a search regarding different programs that someone can't compile because their
My problem is simple. I downloaded Surf Browser from surf.suckless.org, and then tried to compile it. I have used Surf before, and it used to compile fine, but now I run into the following error. Here is the entire stdout+stderr from using
Some of the threads tell me to do the shell command
Now I am stuck, because doing something like
I believe this would be a much easier problem to solve if I knew more about Makefiles,
Hopefully I am using the correct forum. There isn't really a forum for programming tips, or maybe this is the wrong website altogether and I should be posting this on Stack Exchange or something.
/usr/include/glib.h
is moved to /usr/include/glib-2.0/glib.h
. I am having this same problem, and even though I have found other threads discussing similar problems, I have not found one that was able to solve mine.My problem is simple. I downloaded Surf Browser from surf.suckless.org, and then tried to compile it. I have used Surf before, and it used to compile fine, but now I run into the following error. Here is the entire stdout+stderr from using
make
without any arguments while in the Surf build directory. Surf does not have any patches or modifications at all.
Code:
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
Package 'gcr-3', required by 'virtual:world', not found
CFLAGS = -fPIC -DVERSION="2.1" -DGCR_API_SUBJECT_TO_CHANGE -DLIBPREFIX="/usr/local/lib" -DWEBEXTDIR="/usr/local/lib/surf" -D_DEFAULT_SOURCE -O1
WEBEXTCFLAGS = -fPIC -I/usr/include/webkitgtk-4.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -pthread -O1
LDFLAGS =
c99 -fPIC `pkg-config --cflags x11` `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` -DVERSION=\"2.1\" -DGCR_API_SUBJECT_TO_CHANGE -DLIBPREFIX=\"/usr/local/lib\" -DWEBEXTDIR=\"/usr/local/lib/surf\" -D_DEFAULT_SOURCE -O1 -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
Package 'gcr-3', required by 'virtual:world', not found
surf.c:9:10: fatal error: glib.h: No such file or directory
9 | #include <glib.h>
| ^~~~~~~~
compilation terminated.
make: *** [Makefile:31: surf.o] Error 1
Some of the threads tell me to do the shell command
pkg-config --cflags --libs gtk+-2.0
and paste the output into the compiler's arguments. This is the output of running c99 -fPIC `pkg-config --cflags x11` `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` -DVERSION=\"2.1\" -DGCR_API_SUBJECT_TO_CHANGE -DLIBPREFIX=\"/usr/local/lib\" -DWEBEXTDIR=\"/usr/local/lib/surf\" -D_DEFAULT_SOURCE -O1 -c surf.c -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype
in Surf 2.1's build directory: (I did it this way because I don't have any experience editing Makefiles)
Code:
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
Package 'gcr-3', required by 'virtual:world', not found
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from surf.c:25:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: 'GTypeDebugFlags' is deprecated [-Wdeprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from surf.c:21:
/usr/include/glib-2.0/gobject/gtype.h:698:1: note: declared here
698 | {
| ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:126,
from surf.c:25:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from surf.c:9:
/usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
547 | struct _GTimeVal
| ^~~~~~~~~
surf.c:26:10: fatal error: gtk/gtkx.h: No such file or directory
26 | #include <gtk/gtkx.h>
| ^~~~~~~~~~~~
compilation terminated.
Now I am stuck, because doing something like
pkg-config --cflags --libs gtk+-2.0 gtkx.h
or pkg-config --cflags gtkx.h --libs gtk+-2.0
, but those commands output something like this:
Code:
Package gtkx.h was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtkx.h.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtkx.h', required by 'virtual:world', not found
I believe this would be a much easier problem to solve if I knew more about Makefiles,
pkg-config
, etc... But I don't, so I am asking for your help.Hopefully I am using the correct forum. There isn't really a forum for programming tips, or maybe this is the wrong website altogether and I should be posting this on Stack Exchange or something.