Make fails with xapian custom installation

Subject: Make fails with xapian custom installation

Date: Thu, 09 Dec 2021 14:23:32 +0000

To: notmuch@notmuchmail.org

Cc:

From: Al Haji-Ali


Hello,

I have an old version of Xapian installed in root and a new one installed in my home folder which I want to use. My pkgconfig is configured correctly

,----
| ~ pkg-config --libs xapian-core
| -L/home/al/.local/stow/xapian/lib -lxapian
`----

So compiling notmuch works until linking when the following command fails

,----
| ~ c++ lib/filenames.o lib/string-list.o lib/message-file.o lib/message-id.o lib/messages.o lib/sha1.o lib/built-with.o lib/string-map.o lib/indexopts.o lib/tags.o lib/database.o lib/parse-time-vrp.o lib/directory.o lib/index.o lib/message.o lib/add-message.o lib/message-property.o lib/query.o lib/query-fp.o lib/config.o lib/regexp-fields.o lib/thread.o lib/thread-fp.o lib/features.o lib/prefix.o lib/open.o lib/init.o lib/parse-sexp.o  -Wl,--as-needed -L/home/al/.local/stow/gmime/lib -L/usr/lib64 -lgmime-3.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -L/usr/lib64 -ltalloc -L/usr/lib64 -lz -L/home/al/.local/stow/xapian/lib -lxapian  -shared -Wl,--version-script=./lib/notmuch.sym,-soname=libnotmuch.so.5 -Wl,--no-undefined -o lib/libnotmuch.so.5.5.0 util/libnotmuch_util.a parse-time-string/libparse-time-string.a
`----

The problem is that GCC orders the library folders left-to-right and the directory `/usr/lib64` is added (multiple times) before the my local directory `/home/al/.local/stow/xapian/lib`. So that the Xapian library file in the /usr/lib64 has a higher priority and is used. Removing all `-L/usr/lib64` manually and running the linking commands, I am able to compile notmuch correctly.

Is there a better way to do this via configure?

Thanks,
-- Al
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: