Mu-indexer Xapian compile error -- Mac OS

50 views
Skip to first unread message

ckelty ckelty

unread,
Jul 19, 2021, 7:58:44 PM7/19/21
to mu-di...@googlegroups.com
Trying to compile mu on a fancy new M1 Macbook, and getting this error:

mu-indexer.cc:34:10: fatal error: 'xapian.h' file not found

autogen recognizes the correct location for xapian's header files, and the Makefiles all have what appears to be the correct paths:

XAPIAN_CFLAGS = -I/opt/homebrew/Cellar/xapian/1.4.18/include
XAPIAN_CONFIG =
XAPIAN_CXXFLAGS = -I/opt/homebrew/Cellar/xapian/1.4.18/include
XAPIAN_LIBS = -L/opt/homebrew/Cellar/xapian/1.4.18/lib -lxapian

Wondering if anyone has seen this error or if it is something easy I am missing---like another environment variable or path issue?

ck

cke...@gmail.com

unread,
Jul 21, 2021, 1:43:38 PM7/21/21
to mu-discuss
Answering my own question here:

I had to compile Xapian from source, which seems to have worked just fine.  Homebrew has switched to installing in /opt/homebrew on macs with M1 Silicon, and for whatever reason the compiler cannot find the header files for xapian if it is installed there.  But source installs it in /usr/local and that works.  Not ideal for future upgrading, but whatever.

On the upside, mu is very fast on M1 :)
ck

Dirk-Jan C. Binnema

unread,
Jul 31, 2021, 5:39:04 AM7/31/21
to mu-di...@googlegroups.com
Best file a ticket which includes the complete compile error log.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
gpg: 6987 9CED 1745 9375 0F14 DA98 11DD FEA9 DCC4 A036

Charl Botha

unread,
Aug 20, 2021, 3:28:54 PM8/20/21
to mu-discuss
I ran into exactly this issue.

A more straight-forward solution is to ensure that mu builds with clang (and not g++, which is an optional extra here), and to point it to the homebrew installed xapian like this:

autoreconf -i && ./configure --disable-silent-rules CC=/usr/bin/clang CXX=/usr/bin/clang++ CPPFLAGS="-I/opt/homebrew/Cellar/xapian/1.4.18/include/"
make install

HTH,
Charl
Reply all
Reply to author
Forward
0 new messages