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

mu --with-emacs compile fails on macOS Sierra 10.12.3 #11476

Closed
3 tasks done
jfmercer opened this issue Mar 22, 2017 · 16 comments
Closed
3 tasks done

mu --with-emacs compile fails on macOS Sierra 10.12.3 #11476

jfmercer opened this issue Mar 22, 2017 · 16 comments
Labels
user configuration User configuration rather than a Homebrew issue

Comments

@jfmercer
Copy link

jfmercer commented Mar 22, 2017

Bug report:

Default Troubleshooting

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • Confirmed this is a problem with specific formulae and not Homebrew/brew? If it's a general Homebrew/brew problem please file this issue at https://github.com/Homebrew/brew/issues/new

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:

Package guile-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `guile-2.0.pc'
to the PKG_CONFIG_PATH environment variable

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:

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-lispdir=#{elisp}"

to this:

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-lispdir=#{elisp}",
                          "--disable-gtk",
                          "--disable-guile",
                          "--disable-webkit"

I've put my (failed) additions on my own branch.

The build log is here.

I tried this both with the standard emacs formula and emacs-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 with mu itself.

gist-logs

Here are the gist-logs.

My brew config output

HOMEBREW_VERSION: 1.1.11-132-g17cc40f1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 17cc40f112cbb7e5da5ef6d8eb3e3d5afbbd43e5
Last commit: 18 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 51d046569a1fc72d835449e705f60a7528081280
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.12.1 => /usr/local/bin/git
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.24.1/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.0/bin/ruby
Java: 1.8.0_102, 1.8.0_66
macOS: 10.12.3-x86_64
Xcode: 8.2.1
CLT: 8.2.0.0.1.1480973914
X11: 2.7.9 => /opt/X11

My brew doctor output

Your system is ready to brew.

@jfmercer
Copy link
Author

FWIW, the maintainer of mu responded to my issue about mu not compiling (this is without homebrew). Apparently, gawk, not awk, needed to be installed and linked to fix the compile issue.

I had to use gmake rather than make. The current homebrew formula uses make.

@ilovezfs
Copy link
Contributor

I cannot reproduce this issue, I'm afraid, but it sounds like you've got it sorted out.

@ilovezfs ilovezfs added the user configuration User configuration rather than a Homebrew issue label Mar 26, 2017
@academikuser
Copy link

Same issue today. mu4e worked yesterday, today gave an error 6, tried reinstall. came here.

@benyomin
Copy link

benyomin commented May 3, 2017

really want to revert to HEAD-9798d1f can't

brew install mu --with-emacs

or install from source. totally stuck

@danielsmw
Copy link

danielsmw commented May 3, 2017

Using brew edit mu, I added the following lines:

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"

to the formula starting on line 44 (in the install section for gmime), and got a successful compilation. The formula is manually installing the needed version of gmime, but isn't pointing clang to it properly during compilation.

(I'm not sure if the first line I added is strictly necessary, but unfortunately I don't have time to keep playing around this morning now that I've gotten it to work.)

@academikuser
Copy link

academikuser commented May 3, 2017

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:

@dunn
Copy link
Contributor

dunn commented May 3, 2017

I can't replicate this either; could you post brew config and brew doctor, please?

@academikuser
Copy link

HOMEBREW_VERSION: 1.2.0-43-g29429df9d
ORIGIN: https://github.com/Homebrew/brew
HEAD: 29429df
Last commit: 19 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 7b946ae
Core tap last commit: 9 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit ivybridge
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.12.2 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/id/.rvm/rubies/ruby-2.3.1/bin/ruby
Java: 1.8.0_65
macOS: 10.12.5-x86_64
Xcode: N/A
CLT: 8.3.2.0.1.1492020469
X11: 2.7.112 => /opt/X11

@academikuser
Copy link

academikuser commented May 4, 2017

Warning: "config" scripts exist outside your system or Homebrew directories.
./configure scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/GDAL.framework/Programs/gdal-config

Warning: Python is installed at /Library/Frameworks/Python.framework

Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libcrypto.1.1.dylib
/usr/local/lib/libjasper.4.dylib
/usr/local/lib/libssl.1.1.dylib
/usr/local/lib/libtcl8.6.dylib
/usr/local/lib/libtk8.6.dylib
/usr/local/lib/libusb-1.0.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/fakemysql.h
/usr/local/include/fakepq.h
/usr/local/include/fakesql.h
/usr/local/include/itcl.h
/usr/local/include/itcl2TclOO.h
/usr/local/include/itclDecls.h
/usr/local/include/itclInt.h
/usr/local/include/itclIntDecls.h
/usr/local/include/itclMigrate2TclCore.h
/usr/local/include/itclTclIntStubsFcn.h
/usr/local/include/mysqlStubs.h
/usr/local/include/odbcStubs.h
/usr/local/include/openssl/aes.h
/usr/local/include/openssl/asn1.h
/usr/local/include/openssl/asn1_mac.h
/usr/local/include/openssl/asn1t.h
/usr/local/include/openssl/async.h
/usr/local/include/openssl/bio.h
/usr/local/include/openssl/blowfish.h
/usr/local/include/openssl/bn.h
/usr/local/include/openssl/buffer.h
/usr/local/include/openssl/camellia.h
/usr/local/include/openssl/cast.h
/usr/local/include/openssl/cmac.h
/usr/local/include/openssl/cms.h
/usr/local/include/openssl/comp.h
/usr/local/include/openssl/conf.h
/usr/local/include/openssl/conf_api.h
/usr/local/include/openssl/crypto.h
/usr/local/include/openssl/ct.h
/usr/local/include/openssl/des.h
/usr/local/include/openssl/dh.h
/usr/local/include/openssl/dsa.h
/usr/local/include/openssl/dtls1.h
/usr/local/include/openssl/e_os2.h
/usr/local/include/openssl/ebcdic.h
/usr/local/include/openssl/ec.h
/usr/local/include/openssl/ecdh.h
/usr/local/include/openssl/ecdsa.h
/usr/local/include/openssl/engine.h
/usr/local/include/openssl/err.h
/usr/local/include/openssl/evp.h
/usr/local/include/openssl/hmac.h
/usr/local/include/openssl/idea.h
/usr/local/include/openssl/kdf.h
/usr/local/include/openssl/lhash.h
/usr/local/include/openssl/md2.h
/usr/local/include/openssl/md4.h
/usr/local/include/openssl/md5.h
/usr/local/include/openssl/mdc2.h
/usr/local/include/openssl/modes.h
/usr/local/include/openssl/obj_mac.h
/usr/local/include/openssl/objects.h
/usr/local/include/openssl/ocsp.h
/usr/local/include/openssl/opensslconf.h
/usr/local/include/openssl/opensslv.h
/usr/local/include/openssl/ossl_typ.h
/usr/local/include/openssl/pem.h
/usr/local/include/openssl/pem2.h
/usr/local/include/openssl/pkcs12.h
/usr/local/include/openssl/pkcs7.h
/usr/local/include/openssl/rand.h
/usr/local/include/openssl/rc2.h
/usr/local/include/openssl/rc4.h
/usr/local/include/openssl/rc5.h
/usr/local/include/openssl/ripemd.h
/usr/local/include/openssl/rsa.h
/usr/local/include/openssl/safestack.h
/usr/local/include/openssl/seed.h
/usr/local/include/openssl/sha.h
/usr/local/include/openssl/srp.h
/usr/local/include/openssl/srtp.h
/usr/local/include/openssl/ssl.h
/usr/local/include/openssl/ssl2.h
/usr/local/include/openssl/ssl3.h
/usr/local/include/openssl/stack.h
/usr/local/include/openssl/symhacks.h
/usr/local/include/openssl/tls1.h
/usr/local/include/openssl/ts.h
/usr/local/include/openssl/txt_db.h
/usr/local/include/openssl/ui.h
/usr/local/include/openssl/whrlpool.h
/usr/local/include/openssl/x509.h
/usr/local/include/openssl/x509_vfy.h
/usr/local/include/openssl/x509v3.h
/usr/local/include/pqStubs.h
/usr/local/include/tcl.h
/usr/local/include/tclDecls.h
/usr/local/include/tclOO.h
/usr/local/include/tclOODecls.h
/usr/local/include/tclPlatDecls.h
/usr/local/include/tclThread.h
/usr/local/include/tclTomMath.h
/usr/local/include/tclTomMathDecls.h
/usr/local/include/tdbc.h
/usr/local/include/tdbcDecls.h
/usr/local/include/tdbcInt.h
/usr/local/include/tk.h
/usr/local/include/tkDecls.h
/usr/local/include/tkPlatDecls.h

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
/usr/local/lib/pkgconfig/jasper.pc
/usr/local/lib/pkgconfig/libcrypto.pc
/usr/local/lib/pkgconfig/libssl.pc
/usr/local/lib/pkgconfig/openssl.pc
/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libcrypto.a
/usr/local/lib/libjasper.a
/usr/local/lib/libssl.a
/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a

@academikuser
Copy link

Warning: Some keg-only formula are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
brew link <formula> will cause other formulae to detect them during
the ./configure step. This may cause problems when compiling those
other formulae.

Binaries provided by keg-only formulae may override system binaries
with other strange results.

You may wish to brew unlink these brews:
gettext
libffi
➜ ~ brew unlink gettext libffi
Unlinking /usr/local/Cellar/gettext/0.19.8.1... 194 symlinks removed
Unlinking /usr/local/Cellar/libffi/3.2.1... 10 symlinks removed

~ brew install mu --with-emacs
configure: error: Package requirements (glib-sharp-2.0 >= 2.4.0) were not met:
No package 'glib-sharp-2.0' found
#13213

@yatesco
Copy link

yatesco commented May 4, 2017

Brew upgrade also failed to upgrade mu --with-emacs for me with the original error as well.

@dunn
Copy link
Contributor

dunn commented May 5, 2017

@academikuser if you could take care of those warnings it would help to debug.

@neurolit
Copy link

neurolit commented May 5, 2017

Hi! As I said in another issue, installing Mono should solve @academikuser problem.

@krydos
Copy link

krydos commented May 6, 2017

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

@krydos
Copy link

krydos commented Jul 24, 2017

Just tried to install it again on another computer and noticed it doesn't work with --HEAD option 😞
But without the option everything is fine...

@drielsma
Copy link

Thank you so much for documenting this @krydos I've been going crazy trying to figure this out.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
user configuration User configuration rather than a Homebrew issue
Projects
None yet
Development

No branches or pull requests

10 participants