You are not logged in.
Pages: 1
Hi everyone!
I am trying to compile the surf browser, which I downloaded directly from the suckless website. However, trying to install it via "sudo make clean install" gives me:
fatal error: glib.h: no such file or directory
How do I overcome this? I installed glib2 but it didn't help. I also have the glib.h file in /usr/include/glib-2.0/, maybe it is not found by the surf Makefile since it is not in its "standard" location?
Thanks in advance
Last edited by shako (2021-11-22 13:12:14)
Offline
You'd normally run a make without install at first to actually do the build, and this is unlikely to be the entire output. Post the entire output. In any case, any particular reason you are trying to do this that way instead of using the AUR package: https://aur.archlinux.org/packages/surf ?
Last edited by V1del (2021-11-22 13:16:27)
Offline
Here is the output of make:
surf build options:
CC = c99
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', 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
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
Package 'webkit2gtk-web-extension-4.0', required by 'virtual:world', not found
WEBEXTCFLAGS = -fPIC -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 webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', 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
Also, here is the output of "pkg-config --cflags --libs glib2.0":
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0
any particular reason you are trying to do this that way instead of using the AUR package: https://aur.archlinux.org/packages/surf ?
I generally keep dwm, surf, slock and dmenu in a folder in my home directory just because I find it easier to patch them and sync them with my forks on GitHub. I find it convenient and "clean", but I am still a newbie so I might be wrong!
Last edited by shako (2021-11-22 13:44:41)
Offline
Sanity check:
pacman -Qikk glib2
stat /usr/include/glib-2.0/glib.h
Also
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
Offline
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
That's the actual issue, it makes the whole
pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0
command fail. The output of
pkg-config --cflags --libs glib2.0
is irrelevant, that is nowhere used in the compiler command.
Offline
That's the actual issue, it makes the whole
pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0
command fail.
That was it! It was sufficient to install the webkit2gtk package to fix everything. Thanks a lot @arojas
Offline
Pages: 1