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

Already on GitHub? Sign in to your account

mu oddness on mac 10.9 #332

Closed
sje30 opened this Issue Dec 26, 2013 · 16 comments

Comments

Projects
None yet
6 participants
Contributor

sje30 commented Dec 26, 2013

With today's git (installed using the mac 'brew' method), the Emacs interface works fine, but when I try something from the command line, I don't have much joy:

$ mu --version
mu (mail indexer/searcher) version 0.9.9.6pre2
$ mu find apple
database needs a rebuild; try 'mu index --rebuild'
mu: db version: wqP?, but we need 9.9; database rebuild is required (15)

After a rebuild, still doesn't work, although every time I call mu, the "db version" reported changes:

mu find apple
database needs a rebuild; try 'mu index --rebuild'
mu: db version: ??U?, but we need 9.9; database rebuild is required (15)
Owner

djcb commented Dec 26, 2013

This is the same issue some other MacOS-users have reported, but I haven't been able to reproduce. How do you get version 0.9.9.6pre2 using brew?

Contributor

sje30 commented Dec 26, 2013

This is the same issue some other MacOS-users have reported, but I
haven't been able to reproduce. How do you get version 0.9.9.6pre2
using brew?

Okay, I'd not followed the issue; would it help if I tried a git bisect
to isolate the commit which causes the version to be misreported?

To install mu, I did:

$ brew install mu --HEAD --with-emacs

Stephen

Contributor

sje30 commented Dec 26, 2013

Hmm... although I can build okay from brew (as above), I fail when trying to build after downloading mu directly from github. It complains about needing 'libintl':

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
  CXXLD    test-mu-util
ld: library not found for -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Contributor

uu1101 commented Dec 27, 2013

See #319 as well. Seems to be related to building via gcc (which might or might not be a symlink to LLVM) instead of directly via clang. Or maybe because of the flags Homebrew sets. For me, building it myself fixes the mu find problem, but the "related messages (W)" issue seems to be related.

Contributor

uu1101 commented Dec 27, 2013

The following is the difference of the generatedconfig.status from the Homebrew and manually from Git:

--- /tmp/config.status  2013-12-27 03:06:08.000000000 +0100
+++ config.status   2013-12-27 03:20:54.000000000 +0100
@@ -427,7 +427,7 @@

 Report bugs to <http://code.google.com/p/mu0/issues/list>."

-ac_cs_config="'--disable-dependency-tracking' '--prefix=/usr/local/Cellar/mu/HEAD' '--with-gui=none' 'CXX=/usr/bin/clang++' 'CXXFLAGS=-Os -w -pipe -march=native -mmacosx-version-min=10.9' 'LDFLAGS=-L/usr/local/opt/libffi/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names' 'CPPFLAGS=-I/usr/local/opt/gettext/include -F/usr/local/Frameworks' 'CC=/usr/bin/clang' 'CFLAGS=-Os -w -pipe -march=native -mmacosx-version-min=10.9' 'EMACS=/usr/local/opt/emacs/bin/emacs' 'PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9:/usr/lib/pkgconfig'"
+ac_cs_config="'--prefix' '/Users/uu1101/repos/mu/try0/'"
 ac_cs_version="\
 mu config.status 0.9.9.6pre2
 configured by ./configure, generated by GNU Autoconf 2.69,
@@ -437,7 +437,7 @@
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."

-ac_pwd='/private/tmp/mu-gJWz'
+ac_pwd='/Users/uu1101/repos/mu'
 srcdir='.'
 INSTALL='/usr/local/opt/coreutils/libexec/gnubin/install -c'
 MKDIR_P='/usr/local/opt/coreutils/libexec/gnubin/mkdir -p'
@@ -519,7 +519,7 @@
 fi

 if $ac_cs_recheck; then
-  set X /bin/sh './configure'  '--disable-dependency-tracking' '--prefix=/usr/local/Cellar/mu/HEAD' '--with-gui=none' 'CXX=/usr/bin/clang++' 'CXXFLAGS=-Os -w -pipe -march=native -mmacosx-version-min=10.9' 'LDFLAGS=-L/usr/local/opt/libffi/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names' 'CPPFLAGS=-I/usr/local/opt/gettext/include -F/usr/local/Frameworks' 'CC=/usr/bin/clang' 'CFLAGS=-Os -w -pipe -march=native -mmacosx-version-min=10.9' 'EMACS=/usr/local/opt/emacs/bin/emacs' 'PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9:/usr/lib/pkgconfig' $ac_configure_extra_args --no-create --no-recursion
+  set X /bin/sh './configure'  '--prefix' '/Users/uu1101/repos/mu/try0/' $ac_configure_extra_args --no-create --no-recursion
   shift
   $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
   CONFIG_SHELL='/bin/sh'
@@ -539,7 +539,7 @@
 #
 # INIT-COMMANDS
 #
-AMDEP_TRUE="#" ac_aux_dir="."
+AMDEP_TRUE="" ac_aux_dir="."


 # The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -598,9 +598,9 @@
 old_postuninstall_cmds=''
 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib'
 lock_old_archive_extraction='yes'
-CC='/usr/bin/clang'
-CFLAGS='-Os -w -pipe -march=native -mmacosx-version-min=10.9'
-compiler='/usr/bin/clang++'
+CC='gcc'
+CFLAGS='-g -O2'
+compiler='g++'
 GCC='yes'
 lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[  ]\([BCDEGRST][BCDEGRST]*\)[     ][  ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
 lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[BCDEGRST]* .* \(.*\)$/extern char \1;/p'\'''
@@ -689,7 +689,7 @@
 reload_flag_CXX=' -r'
 reload_cmds_CXX='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 old_archive_cmds_CXX='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib'
-compiler_CXX='/usr/bin/clang++'
+compiler_CXX='g++'
 GCC_CXX='yes'
 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
 lt_prog_compiler_pic_CXX=' -fno-common -DPIC'
@@ -734,9 +734,9 @@
 postdeps_CXX=''
 compiler_lib_search_path_CXX=''

-LTCC='/usr/bin/clang'
-LTCFLAGS='-Os -w -pipe -march=native -mmacosx-version-min=10.9'
-compiler='/usr/bin/clang'
+LTCC='gcc'
+LTCFLAGS='-g -O2'
+compiler='gcc'

 # A function that is used when there is no print builtin or printf.
 func_fallback_echo ()
@@ -919,19 +919,19 @@
 "/glib-2.0/include -I/usr/local/opt/gettext/include "
 S["GLIB_LIBS"]="-L/usr/local/Cellar/glib/2.38.2/lib -L/usr/local/opt/gettext/lib -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl "
 S["GLIB_CFLAGS"]="-D_REENTRANT -I/usr/local/Cellar/glib/2.38.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.38.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include "
-S["PKG_CONFIG_LIBDIR"]="/usr/local/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9:/usr/lib/pkgconfig"
-S["PKG_CONFIG_PATH"]="/usr/local/opt/libffi/lib/pkgconfig"
+S["PKG_CONFIG_LIBDIR"]=""
+S["PKG_CONFIG_PATH"]=""
 S["PKG_CONFIG"]="/usr/local/bin/pkg-config"
 S["BUILD_MU4E_FALSE"]="#"
 S["BUILD_MU4E_TRUE"]=""
 S["lispdir"]="${datarootdir}/emacs/site-lisp/mu4e/"
 S["EMACSLOADPATH"]=""
-S["EMACS"]="/usr/local/opt/emacs/bin/emacs"
+S["EMACS"]="emacs"
 S["HAVE_MAKEINFO_FALSE"]="#"
 S["HAVE_MAKEINFO_TRUE"]=""
 S["have_makeinfo"]="yes"
 S["SORT"]="sort"
-S["CXXCPP"]="/usr/bin/clang++ -E"
+S["CXXCPP"]="g++ -E"
 S["OTOOL64"]=":"
 S["OTOOL"]="otool"
 S["LIPO"]="lipo"
@@ -961,30 +961,30 @@
 S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool"
 S["EGREP"]="/usr/bin/grep -E"
 S["GREP"]="/usr/bin/grep"
-S["CPP"]="/usr/bin/clang -E"
-S["am__fastdepCC_FALSE"]=""
-S["am__fastdepCC_TRUE"]="#"
-S["CCDEPMODE"]="depmode=none"
-S["ac_ct_CC"]="/usr/bin/clang"
-S["CFLAGS"]="-Os -w -pipe -march=native -mmacosx-version-min=10.9"
-S["CC"]="/usr/bin/clang"
-S["am__fastdepCXX_FALSE"]=""
-S["am__fastdepCXX_TRUE"]="#"
-S["CXXDEPMODE"]="depmode=none"
-S["am__nodep"]=""
-S["AMDEPBACKSLASH"]=""
-S["AMDEP_FALSE"]=""
-S["AMDEP_TRUE"]="#"
+S["CPP"]="gcc -E"
+S["am__fastdepCC_FALSE"]="#"
+S["am__fastdepCC_TRUE"]=""
+S["CCDEPMODE"]="depmode=gcc3"
+S["ac_ct_CC"]="gcc"
+S["CFLAGS"]="-g -O2"
+S["CC"]="gcc"
+S["am__fastdepCXX_FALSE"]="#"
+S["am__fastdepCXX_TRUE"]=""
+S["CXXDEPMODE"]="depmode=gcc3"
+S["am__nodep"]="_no"
+S["AMDEPBACKSLASH"]="\\"
+S["AMDEP_FALSE"]="#"
+S["AMDEP_TRUE"]=""
 S["am__quote"]=""
 S["am__include"]="include"
 S["DEPDIR"]=".deps"
 S["OBJEXT"]="o"
 S["EXEEXT"]=""
-S["ac_ct_CXX"]=""
-S["CPPFLAGS"]="-I/usr/local/opt/gettext/include -F/usr/local/Frameworks"
-S["LDFLAGS"]="-L/usr/local/opt/libffi/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names"
-S["CXXFLAGS"]="-Os -w -pipe -march=native -mmacosx-version-min=10.9"
-S["CXX"]="/usr/bin/clang++"
+S["ac_ct_CXX"]="g++"
+S["CPPFLAGS"]=""
+S["LDFLAGS"]=""
+S["CXXFLAGS"]="-g -O2"
+S["CXX"]="g++"
 S["AM_BACKSLASH"]="\\"
 S["AM_DEFAULT_VERBOSITY"]="0"
 S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)"
@@ -999,12 +999,12 @@
 S["MKDIR_P"]="/usr/local/opt/coreutils/libexec/gnubin/mkdir -p"
 S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
 S["STRIP"]="strip"
-S["install_sh"]="${SHELL} /private/tmp/mu-gJWz/install-sh"
-S["MAKEINFO"]="${SHELL} /private/tmp/mu-gJWz/missing makeinfo"
-S["AUTOHEADER"]="${SHELL} /private/tmp/mu-gJWz/missing autoheader"
-S["AUTOMAKE"]="${SHELL} /private/tmp/mu-gJWz/missing automake-1.14"
-S["AUTOCONF"]="${SHELL} /private/tmp/mu-gJWz/missing autoconf"
-S["ACLOCAL"]="${SHELL} /private/tmp/mu-gJWz/missing aclocal-1.14"
+S["install_sh"]="${SHELL} /Users/uu1101/repos/mu/install-sh"
+S["MAKEINFO"]="${SHELL} /Users/uu1101/repos/mu/missing makeinfo"
+S["AUTOHEADER"]="${SHELL} /Users/uu1101/repos/mu/missing autoheader"
+S["AUTOMAKE"]="${SHELL} /Users/uu1101/repos/mu/missing automake-1.14"
+S["AUTOCONF"]="${SHELL} /Users/uu1101/repos/mu/missing autoconf"
+S["ACLOCAL"]="${SHELL} /Users/uu1101/repos/mu/missing aclocal-1.14"
 S["VERSION"]="0.9.9.6pre2"
 S["PACKAGE"]="mu"
 S["CYGPATH_W"]="echo"
@@ -1040,7 +1040,7 @@
 S["sbindir"]="${exec_prefix}/sbin"
 S["bindir"]="${exec_prefix}/bin"
 S["program_transform_name"]="s,x,x,"
-S["prefix"]="/usr/local/Cellar/mu/HEAD"
+S["prefix"]="/Users/uu1101/repos/mu/try0"
 S["exec_prefix"]="${prefix}"
 S["PACKAGE_URL"]=""
 S["PACKAGE_BUGREPORT"]="http://code.google.com/p/mu0/issues/list"

The differences are the compiler and flags. But then the reported gcc version is:

$ gcc --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

So it seems to be clang as well. At this point I am guessing it has something to do with Homebrew's flags, but am no OSX expert.

@djcb, @sje30, I am able to provide more info, if this data lights some bulb over there.

Best regards,
uu1101.

Contributor

sje30 commented Dec 27, 2013

Thanks for the diff output; this shows quite a few differences between homebrew and the direct invocation. It helped me find libintl.dylib (which has gone into /usr/local/opt/gettext) but the Makefile's seem quite complicated to fix. I think for now I'll return to using homebrew's emacs.

What I did find in some of my searches is that 10.9 has broken other related systems:

http://notmuch.198994.n3.nabble.com/Build-failure-on-OSX-td4029610.html

Homebrew/homebrew#23555

https://github.com/Homebrew/homebrew/wiki/C++-Standard-Libraries

@sje30 sje30 referenced this issue in Homebrew/legacy-homebrew Dec 28, 2013

Closed

Problem with mu (HEAD and stable) on 10.9 #25524

Owner

djcb commented Dec 29, 2013

@djcb, @sje30 thanks!

what might help is if you could run valgrind while reproducing this problem.

Contributor

sje30 commented Dec 29, 2013

On Sun, Dec 29 2013, notifications@github.com wrote:

@djcb, @sje30 thanks!

what might help is if you could run valgrind while reproducing this
problem.

Sorry, valgrind is not working on OS 10.9:

http://stackoverflow.com/questions/19719762/are-there-any-alternatives-to-valgrind-on-mac-os-x-mountain-lion-and-mavericks-t

as confirmed when I tried "brew install valgrind"

Contributor

sje30 commented Dec 30, 2013

I tried a reinstall of mu from git (not using homebrew) and now libintl is found okay. I'm not sure what I did any differently (although one time I tried ./configure 'CC=gcc'), but now it compiles. I see the problem with 'W' not returning related matches.

There is a related test failure under Homebrew:

TEST: test-mu-store... (pid=43208)
  /mu-store/mu-store-new-destroy:                                      OK
  /mu-store/mu-store-version:                                          **
ERROR:test-mu-store.c:75:test_mu_store_version: assertion failed: (store)
FAIL
GTester: last random seed: R02S9292739f18b2ff697a79bc445183bb06
/bin/sh: line 1: 43190 Terminated: 15          gtester --verbose test-mu-util test-mu-str test-mu-maildir test-mu-msg-fields test-mu-msg test-mu-store test-mu-date test-mu-flags

I tracked this down to setting MACOSX_DEPLOYMENT_TARGET. It happens no matter what version I set it to, but I am unable to reproduce the failure using -mmacosx-version-min=, even though the effect is supposed to be equivalent.

We'll probably just unset that var in the Homebrew formula and move on, but hopefully that's enough of a start for someone who wants to find and fix the real issue.

Oh yeah: I was able to reproduce this outside of Homebrew once I figured out it was MACOSX_DEPLOYMENT_TARGET.

Owner

djcb commented Jan 1, 2014

@jacknagel: oh, that's interesting... I'm on 10.7.5, where this problem simply doesn't happen :/

the problem seems to be that Xapian::Database::get_metadata returns some garbage data when I ask it for the version.

Contributor

sje30 commented Jan 1, 2014

Oh yeah: I was able to reproduce this outside of Homebrew once I figured out it was MACOSX_DEPLOYMENT_TARGET.

Thanks for your testing Jack, this is great. mu no longer generates the
errors I reported earlier.

(Dirk: "W" for finding related mails is still a problem)

Stephen

mankoff commented May 7, 2014

For those on this issue wanting "W" and related threads working, see #380. Solved! :).

@danieroux danieroux added a commit to danieroux/homebrew that referenced this issue Feb 26, 2015

@danieroux danieroux Remove MACOSX_DEPLOYMENT_TARGET hack
djcb/mu#332 is the same root cause as
djcb/mu#380 which is fixed by
Homebrew#37020
71fd95f

@danieroux danieroux added a commit to danieroux/homebrew that referenced this issue Feb 28, 2015

@danieroux danieroux Remove MACOSX_DEPLOYMENT_TARGET hack
djcb/mu#332 is the same root cause as
djcb/mu#380 which is fixed by
Homebrew#37020
5e85510

@danieroux danieroux added a commit to danieroux/homebrew that referenced this issue Mar 2, 2015

@danieroux danieroux Remove MACOSX_DEPLOYMENT_TARGET hack
djcb/mu#332 is the same root cause as
djcb/mu#380 which is fixed by
Homebrew#37020
89bb57e

@BrewTestBot BrewTestBot pushed a commit to BrewTestBot/homebrew that referenced this issue Mar 2, 2015

@danieroux danieroux + BrewTestBot Remove MACOSX_DEPLOYMENT_TARGET hack
djcb/mu#332 is the same root cause as
djcb/mu#380 which is fixed by
Homebrew#37020
f9f14d9

@MikeMcQuaid MikeMcQuaid added a commit to Homebrew/legacy-homebrew that referenced this issue Mar 2, 2015

@danieroux @MikeMcQuaid danieroux + MikeMcQuaid mu: fix --include-related option for 10.9
- Compile with -O0 on >= mavericks
- Add a test for mu
- djcb/mu#380
- Remove MACOSX_DEPLOYMENT_TARGET hack

djcb/mu#332 is the same root cause as
djcb/mu#380 which is fixed by
#37020

Closes #37020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
3f91fb1
Contributor

danieroux commented Mar 3, 2015

@sje30 @djcb I believe this bug can be closed because of Homebrew/legacy-homebrew@3f91fb1

Owner

djcb commented Nov 5, 2015

@danieroux: thanks!

@djcb djcb closed this Nov 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment