nihilowy / surfer

Simple keyboard based web browser
GNU General Public License v2.0
72 stars 9 forks source link

Compile error #29

Open yanwh0311 opened 2 years ago

yanwh0311 commented 2 years ago

platform: archlinux-amd64

==> Starting build()... cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wno-deprecated-declarations -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o surfer surfer.c \ pkg-config --cflags --libs libnotify gtk+-3.0 glib-2.0 webkit2gtk-4.0 \ -DEXTENSION_DIR=\"/usr/lib/surfer/\" \ -DDEBUG=0 -lm surfer.c: In function ‘permission_request_cb’: surfer.c:652:49: error: format not a string literal and no format arguments [-Werror=format-security] 652 msg); ^~~ In file included from /usr/include/glib-2.0/glib.h:62, from /usr/include/gtk-3.0/gdk/gdkconfig.h:8, from /usr/include/gtk-3.0/gdk/gdk.h:30, from surfer.c:25: surfer.c: In function ‘png_finished’: surfer.c:1611:18: warning: format ‘%s’ expects argument of type ‘char ’, but argument 4 has type ‘GError ’ {aka ‘struct _GError *’} [-Wformat=] 1611 g_error( "error creating snapshot: %s",error ); ^~~~~~~ ~~~
GError {aka struct _GError }
/usr/include/glib-2.0/glib/gmessages.h:337:32: note: in definition of macro ‘g_error’ 337 __VA_ARGS__); \ ^~~ surfer.c:1611:45: note: format string is defined here 1611 g_error( "error creating snapshot: %s",error ); ~^
char *

cc1: some warnings being treated as errors make: *** [Makefile:18: surfer] Error 1 ==> ERROR: A failure occurred in build(). Aborting... error: failed to build 'surfer-git-4-0': error: packages failed to build: surfer-git-4-0

nihilowy commented 2 years ago

now seems ok

nihilowy commented 2 years ago

but I recommend compilling from git clone ,and then make . it is more stable.