Solvedhomebrew core mu --with-emacs compile fails on macOS Sierra 10.12.3
✔️Accepted Answer
Solution without Mono
Here is recipe to build it without Mono - https://gist.github.com/KryDos/d306d6453ad0f30b55468aecc8eb09a3
Nothing is changed except def install
=> resource("gmime")
section
Description
I didn't try solution by @neurolit since Mono is pretty big dependency as for me. But thanks anyway!
I never dived into how Homebrew works but here I noticed brew edit
command which is really great :)
So, I researched a bit and found that gmime
package (required by mu
) can be compiled with --disable-mono
option (and actually it was compiled with this option before 3.0.0 version). At this stage it compiles but mu isn't working because something wrong with linker.
But if I manually set GMIME_LIBS
and GMIME_CFLAGS
then it works.
Would you accept pull request for this? But I'm actually not sure what I fixed and I don't even know what is pkgconfig
which is probably something related
Other Answers:
I think I made the changes correctly. Thank you for the detailed
brew edit mu
command, I hadn't used that one before.
def install
resource("gmime").stage do
system "./configure", "--prefix=#{prefix}/gmime", "--disable-introspection"
system "make", "install"
ENV.append_path "PKG_CONFIG_PATH", "#{prefix}/gmime/lib/pkgconfig"
ENV.append_path "C_INCLUDE_PATH", "#{prefix}/gmime/include/gmime-2.6"
ENV.append_path "CMAKE_INCLUDE_PATH", "#{prefix}/gmime/include/gmime-2.6"
ENV.append_path "CMAKE_LIBRARY_PATH", "#{prefix}/gmime/lib"
end
system "autoreconf", "-ivf"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-lispdir=#{elisp}",
"--disable-guile",
"--disable-gtk",
"--disable-webkit"
system "make"
Still getting an error.
checking for mcs... /usr/local/bin/mcs
checking whether /usr/local/bin/mcs is GNU Mono... yes
checking for gacutil... /usr/local/bin/gacutil
checking for GLIB_SHARP... no
configure: error: Package requirements (glib-sharp-2.0 >= 2.4.0) were not met:
Bug report:
Default Troubleshooting
brew update
and retried your prior step?brew doctor
, fixed as many issues as possible and retried your prior step?Expected Behavior
I expected
brew install mu --with-emacs
to install without error.Actual Behavior
brew install mu --with-emacs
fails on macOS Sierra 10.12.3. In contrast,brew install mu
works just fine.Attempted Diagnosis
The build logs may be difficult to follow, so here's what I did.
Initially, the install failed with this error:
Installing guile did not fix the problem, so I edited the formula to disable guile. I also disabled gtk & webkit for good measure. In short, I changed this:
to this:
I've put my (failed) additions on my own branch.
The build log is here.
I tried this both with the standard
emacs
formula andemacs-plus
, but got the same result from both. I also set$EMACS
to/usr/local/bin/emacs
without success.Related Issues
I failed to compile
mu
manually and filed an issue withmu
itself.gist-logs
Here are the gist-logs.
My
brew config
outputMy
brew doctor
outputYour system is ready to brew.