howl-editor / howl

The Howl Editor
http://howl.io
Other
712 stars 68 forks source link

Unable to compile on OSX. #516

Open ghost opened 5 years ago

ghost commented 5 years ago

I am trying to compile howl on MacOS Mojave. However I get a persistent error whenever I try to compile from source.

I ran the below commands.

$ brew update
$ brew install glib

I received the below output.

==> Pouring glib-2.60.6.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/glib/2.60.6: 429 files, 15.2MB

I take it that this means that glib was installed on my machine. Here is my $PATH.

/Users/sanjayadhith/.opam/default/bin:/usr/local/opt/qt/bin:/usr/local/opt/ruby/bin:/Users/sanjayadhith/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands

However, when I tried to compile the howl text editor I persistently get this error message despite running brew doctor and brew reinstall glib.

Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-2.0', not found
cc -c main.c -Wall -O2 -g -I/Users/sanjayadhith/Downloads/howl-master/src/deps/LuaJIT-2.1.0-beta3/src  -DHOWL_PREFIX=/usr/local
In file included from main.c:4:
./main.h:9:10: fatal error: 'glib.h' file not found
#include <glib.h>
         ^~~~~~~~
1 error generated.
make: *** [main.o] Error 1

My installed packages are listed below.

apr             jemalloc            ocaml
apr-util            jpeg                opam
atk             leiningen           openexr
cairo               libcaca             openjpeg
cask                libde265            openssl
chicken             libepoxy            openssl@1.1
cmake               libevent            p11-kit
cmatrix             libffi              pandoc
coffeescript            libheif             pango
coreutils           libidn2             pcre
cowsay              libmpc              pcre2
crystal             libomp              perl
curl                libpng              pixman
cvs             libssh2             pkg-config
cython              libtasn1            python
elixir              libtermkey          python@2
emacs               libtiff             qt
erlang              libtool             readline
fontconfig          libunistring            ripgrep
fortune             libuv               ruby
freetype            libvterm            s-lang
fribidi             libyaml             screenresolution
gcc             little-cms2         shared-mime-info
gdbm                llvm@6              sqlite
gdk-pixbuf          lua             subversion
gettext             lua@5.1             thefuck
git             luajit              tmux
glib                luarocks            toilet
gmp             lz4             tree
gnutls              lzo             typescript
go              md5sha1sum          unbound
graphite2           mercurial           unibilium
groovy              midnight-commander      utf8proc
gsettings-desktop-schemas   mit-scheme          vim
gtk+3               mosml               webp
harfbuzz            mpfr                wget
hicolor-icon-theme      msgpack             wine
htop                nasm                wtf
icu4c               ncurses             wxmac
idris               neofetch            x265
ilmbase             neovim              xz
imagemagick         nettle              youtube-dl
isl             node                zsh
ghost commented 5 years ago

I also opened up an issue at homebrew-core to see if the problem was at the homebrew end.

refi64 commented 5 years ago

Link to homebrew issue: https://github.com/Homebrew/homebrew-core/issues/42930

then0rTh commented 4 years ago

I managed to compile on MacOS Catalina:


* `brew install gtk+3`
* `brew install pkg-config`
* `export MACOSX_DEPLOYMENT_TARGET=10.15` - 10.15 is the version found by clicking on the apple in upper left corner > "About This Mac"
* `make install`
  * if this fails, carefully read the console output, maybe you need to `brew install` something
* now you can run `./howl`

The only issue is the icons are broken, everything else seems to work!