Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] SyncTeX version confusion causes build to fail #175

Open
Vectornaut opened this issue Sep 15, 2022 · 0 comments
Open

[macOS] SyncTeX version confusion causes build to fail #175

Vectornaut opened this issue Sep 15, 2022 · 0 comments

Comments

@Vectornaut
Copy link

Vectornaut commented Sep 15, 2022

Description

I'm trying to install Gummi 0.8.3 using Homebrew on macOS Monterey (12.5.1), following the guidance in #161. I think the build is failing because my SyncTeX dependency says it's at version 1, but acts like it's at version 2. A build flag that undefines USE_SYNCTEX1, regardless of the reported SyncTeX version, might fix the issue. (I'd also try a build flag that gets drops SyncTeX entirely; my first priority is to get a working build, no matter how minimal.)

Reproduction steps

Create a formula for Gummi 0.8.3.

brew create https://github.com/alexandervdm/gummi/archive/refs/tags/0.8.3.tar.gz

Replace the default formula, which will be saved as gummi.rb, with the following. As suggested in #161, we're using the SyncTeX formula from the zathura-homebrew tap, which is currently supposed to be at version 1.22.

# Documentation: https://docs.brew.sh/Formula-Cookbook
#                https://rubydoc.brew.sh/Formula
class Gummi < Formula
  desc "Simple LaTeX editor"
  homepage "https://gummi.app"
  url "https://github.com/alexandervdm/gummi/archive/refs/tags/0.8.3.tar.gz"
  sha256 "8a8671a0966ea5211cb403ac7b2bae6a39f71703046a78d17b1293811476b14d"
  license "MIT"

  depends_on "intltool"
  depends_on "gtk+3"
  depends_on "gtksourceview3"
  depends_on "poppler"
  depends_on "zegervdv/zathura/synctex" # see https://github.com/alexandervdm/gummi/issues/161
  depends_on "gtkspell3"
  depends_on "autoconf" => :build
  depends_on "automake" => :build

  def install
    system "./autogen.sh", "--prefix=/usr"
    system "./configure", "--prefix=/usr"
    system "make"
  end

  test do
    # this placeholder test automatically fails
    system "false"
  end
end

Try to build Gummi.

brew install --build-from-source gummi

Output from failed build

==> ./autogen.sh --prefix=/usr
==> ./configure --prefix=/usr
==> make
Last 15 lines from /Users/Vectornaut/Library/Logs/Homebrew/gummi/03.make:
                             ^
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)
                                                                   ~~~~~~~~~~~~~~~~~~~~~                            ^
/opt/homebrew/Cellar/synctex/1.22.0_2/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);
                     ^
5 errors generated.
make[2]: *** [gui/gui-preview.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@Vectornaut Vectornaut changed the title [macOS] SyncTeX version issue? [macOS] SyncTeX version not detected Sep 15, 2022
@Vectornaut Vectornaut changed the title [macOS] SyncTeX version not detected [macOS] SyncTeX version confusion causes build to fail Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant