alexandervdm / gummi

Simple LaTeX editor
https://gummi.app
MIT License
750 stars 95 forks source link

[Bug] autogen script not macOS-aware, compile-time errors #161

Open kwvg opened 2 years ago

kwvg commented 2 years ago

Description

Attempting to build Gummi (https://github.com/alexandervdm/gummi/commit/8c82e69bc0fe3a8f14b906871654c3f22374c60f) on macOS results in compile-time errors.

Steps Followed

Setting up dependencies

brew tap zegervdv/zathura
brew install synctex gtkspell3 poppler gtksourceview3 gtk+3 intltool

autogen.sh patch

diff --git a/autogen.sh b/autogen.sh
index 19951e6..e73e64c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,7 +23,7 @@ fi

 ${ACLOCAL:-aclocal-$AM_VERSION} ${ACLOCAL_ARG}
 ${AUTOHEADER:-autoheader$AC_VERSION}
-AUTOMAKE=${AUTOMAKE:-automake-$AM_VERSION} libtoolize -c --automake
+AUTOMAKE=${AUTOMAKE:-automake-$AM_VERSION} glibtoolize -c --automake
 ${AUTOMAKE:-automake-$AM_VERSION} --add-missing --copy --include-deps
 ${AUTOCONF:-autoconf$AC_VERSION}

Platform Information

> $ uname -ar
Darwin Mac.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64
> $ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
> $ gmake -v 
GNU Make 4.3
Built for x86_64-apple-darwin20.1.0
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
> $ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Additional Information

Build Log

``` > $ cd src > $ make depbase=`echo gui/gui-preview.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/glib/2.70.2/include -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/libffi/3.4.2/include -I/usr/local/Cellar/gtk+3/3.24.30_1/include/gtk-3.0 -I/usr/local/Cellar/glib/2.70.2/include/gio-unix-2.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/libepoxy/1.5.9/include -I/usr/local/Cellar/pango/1.50.3/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/3.2.0/include/harfbuzz -I/usr/local/Cellar/pango/1.50.3/include/pango-1.0 -I/usr/local/Cellar/fribidi/1.0.11/include/fribidi -I/usr/local/Cellar/harfbuzz/3.2.0/include/harfbuzz -I/usr/local/Cellar/graphite2/1.3.14/include -I/usr/local/Cellar/atk/2.36.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.13.1/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/libxext/1.3.4/include -I/usr/local/Cellar/libx11/1.7.3.1/include -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/local/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/gdk-pixbuf/2.42.6/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libtiff/4.3.0/include -I/usr/local/Cellar/glib/2.70.2/include -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/xorgproto/2021.5/include -I/usr/local/Cellar/libffi/3.4.2/include -I/usr/local/Cellar/gtksourceview3/3.24.11_3/include/gtksourceview-3.0 -I/usr/local/Cellar/gtk+3/3.24.30_1/include/gtk-3.0 -I/usr/local/Cellar/glib/2.70.2/include/gio-unix-2.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/libepoxy/1.5.9/include -I/usr/local/Cellar/pango/1.50.3/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/3.2.0/include/harfbuzz -I/usr/local/Cellar/pango/1.50.3/include/pango-1.0 -I/usr/local/Cellar/fribidi/1.0.11/include/fribidi -I/usr/local/Cellar/harfbuzz/3.2.0/include/harfbuzz -I/usr/local/Cellar/graphite2/1.3.14/include -I/usr/local/Cellar/atk/2.36.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.13.1/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/libxext/1.3.4/include -I/usr/local/Cellar/libx11/1.7.3.1/include -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/local/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/gdk-pixbuf/2.42.6/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libtiff/4.3.0/include -I/usr/local/Cellar/glib/2.70.2/include -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/xorgproto/2021.5/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -I/usr/local/Cellar/libffi/3.4.2/include -I/usr/local/Cellar/poppler/21.12.0/include/poppler/glib -I/usr/local/Cellar/poppler/21.12.0/include/poppler -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/glib/2.70.2/include -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.13.1/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/libxext/1.3.4/include -I/usr/local/Cellar/libx11/1.7.3.1/include -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/local/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/xorgproto/2021.5/include -I/usr/local/Cellar/libffi/3.4.2/include -I/usr/local/Cellar/gtkspell3/3.0.10_3/include/gtkspell-3.0 -I/usr/local/Cellar/gtk+3/3.24.30_1/include/gtk-3.0 -I/usr/local/Cellar/glib/2.70.2/include/gio-unix-2.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/libepoxy/1.5.9/include -I/usr/local/Cellar/pango/1.50.3/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/3.2.0/include/harfbuzz -I/usr/local/Cellar/pango/1.50.3/include/pango-1.0 -I/usr/local/Cellar/fribidi/1.0.11/include/fribidi -I/usr/local/Cellar/harfbuzz/3.2.0/include/harfbuzz -I/usr/local/Cellar/graphite2/1.3.14/include -I/usr/local/Cellar/atk/2.36.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.13.1/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/libxext/1.3.4/include -I/usr/local/Cellar/libx11/1.7.3.1/include -I/usr/local/Cellar/libxcb/1.14_1/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/local/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/gdk-pixbuf/2.42.6/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libtiff/4.3.0/include -I/usr/local/Cellar/glib/2.70.2/include -I/usr/local/Cellar/enchant/2.3.2/include/enchant-2 -I/usr/local/Cellar/glib/2.70.2/include -I/usr/local/Cellar/glib/2.70.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/xorgproto/2021.5/include -I/usr/local/Cellar/synctex/1.22.0_1/include/synctex -Wl,-export-dynamic -Wall -O2 -DGUMMI_LIBS=\"/usr/local/lib/gummi\" -DGUMMI_DATA=\"/usr/local/share/gummi\" -DGUMMI_LOCALES=\"/usr/local/share/locale\" -g -O2 -MT gui/gui-preview.o -MD -MP -MF $depbase.Tpo -c -o gui/gui-preview.o gui/gui-preview.c &&\ mv -f $depbase.Tpo $depbase.Po clang: warning: -Wl,-export-dynamic: 'linker' input unused [-Wunused-command-line-argument] In file included from gui/gui-preview.c:51: In file included from ./environment.h:36: In file included from ./biblio.h:35: In file included from ./editor.h:38: In file included from /usr/local/Cellar/gtksourceview3/3.24.11_3/include/gtksourceview-3.0/gtksourceview/gtksource.h:35: /usr/local/Cellar/gtksourceview3/3.24.11_3/include/gtksourceview-3.0/gtksourceview/gtksourcefile.h:180:10: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations] GTimeVal *modification_time); ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gtypes.h:545:35: note: 'GTimeVal' has been explicitly marked deprecated here typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gversionmacros.h:961:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_62_FOR' # define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gmacros.h:1180:37: note: expanded from macro 'GLIB_DEPRECATED_TYPE_FOR' #define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f) ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gmacros.h:1112:44: note: expanded from macro 'G_DEPRECATED_FOR' #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) ^ In file included from gui/gui-preview.c:51: In file included from ./environment.h:36: In file included from ./biblio.h:35: In file included from ./editor.h:38: In file included from /usr/local/Cellar/gtksourceview3/3.24.11_3/include/gtksourceview-3.0/gtksourceview/gtksource.h:35: /usr/local/Cellar/gtksourceview3/3.24.11_3/include/gtksourceview-3.0/gtksourceview/gtksourcefile.h:184:10: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations] GTimeVal modification_time); ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gtypes.h:545:35: note: 'GTimeVal' has been explicitly marked deprecated here typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gversionmacros.h:961:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_62_FOR' # define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gmacros.h:1180:37: note: expanded from macro 'GLIB_DEPRECATED_TYPE_FOR' #define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f) ^ /usr/local/Cellar/glib/2.70.2/include/glib-2.0/glib/gmacros.h:1112:44: note: expanded from macro 'G_DEPRECATED_FOR' #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) ^ gui/gui-preview.c:61:11: error: must use 'struct' tag to refer to type 'synctex_scanner_t' typedef synctex_scanner_t synctex_scanner_p; ^ struct gui/gui-preview.c:61:29: error: typedef redefinition with different types ('struct synctex_scanner_t' vs 'synctex_scanner_s *' (aka 'struct synctex_scanner_t *')) typedef synctex_scanner_t synctex_scanner_p; ^ /usr/local/Cellar/synctex/1.22.0_1/include/synctex/synctex_parser.h:69:33: note: previous definition is here typedef synctex_scanner_s * synctex_scanner_p; ^ gui/gui-preview.c:62:11: error: must use 'struct' tag to refer to type 'synctex_node_t' typedef synctex_node_t synctex_node_p; ^ struct gui/gui-preview.c:62:26: error: typedef redefinition with different types ('struct synctex_node_t' vs 'synctex_node_s *' (aka 'struct synctex_node_t *')) typedef synctex_node_t synctex_node_p; ^ /usr/local/Cellar/synctex/1.22.0_1/include/synctex/synctex_parser.h:145:30: note: previous definition is here typedef synctex_node_s * synctex_node_p; ^ gui/gui-preview.c:1106:9: error: too few arguments to function call, expected 5, have 4 if (synctex_display_query (sync_scanner, tex_file, line, column, -1) > 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gui/gui-preview.c:63:117: note: expanded from macro 'synctex_display_query' #define synctex_display_query(scanner, file, line, column, page) synctex_display_query(scanner, file, line, column) ~~~~~~~~~~~~~~~~~~~~~ ^ /usr/local/Cellar/synctex/1.22.0_1/include/synctex/synctex_parser.h:202:22: note: 'synctex_display_query' declared here synctex_status_t synctex_display_query(synctex_scanner_p scanner,const char * name,int line,int column, int page_hint); ^ gui/gui-preview.c:1111:24: error: implicit declaration of function 'synctex_next_result' is invalid in C99 [-Werror,-Wimplicit-function-declaration] while ((node = synctex_scanner_next_result(sync_scanner))) { ^ gui/gui-preview.c:64:48: note: expanded from macro 'synctex_scanner_next_result' #define synctex_scanner_next_result(scanner) synctex_next_result(scanner) ^ gui/gui-preview.c:1111:24: note: did you mean 'synctex_filter_results'? gui/gui-preview.c:64:48: note: expanded from macro 'synctex_scanner_next_result' #define synctex_scanner_next_result(scanner) synctex_next_result(scanner) ^ gui/gui-preview.c:144:13: note: 'synctex_filter_results' declared here static void synctex_filter_results (GuPreviewGui* pc, GtkTextIter *sync_to); ^ gui/gui-preview.c:1111:22: warning: incompatible integer to pointer conversion assigning to 'synctex_node_p' (aka 'struct synctex_node_t *') from 'int' [-Wint-conversion] while ((node = synctex_scanner_next_result(sync_scanner))) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gui/gui-preview.c:1980:25: error: implicit declaration of function 'synctex_next_result' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if ((node = synctex_scanner_next_result(sync_scanner))) { ^ gui/gui-preview.c:64:48: note: expanded from macro 'synctex_scanner_next_result' #define synctex_scanner_next_result(scanner) synctex_next_result(scanner) ^ gui/gui-preview.c:1980:23: warning: incompatible integer to pointer conversion assigning to 'synctex_node_p' (aka 'struct synctex_node_t *') from 'int' [-Wint-conversion] if ((node = synctex_scanner_next_result(sync_scanner))) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 warnings and 7 errors generated. make: *** [gui/gui-preview.o] Error 1 ```