notmuch-0.16: realpath() compatibility issue; clang visibility problem

David Bremner david at tethera.net
Thu Jun 26 05:02:33 PDT 2014


Thomas Klausner <tk at giga.or.at> writes:

> Hi David!
>
> On Tue, Apr 08, 2014 at 08:26:25AM -0300, David Bremner wrote:
>> > Debugging it I found that notmuch uses a glibc extension to realpath,
>> > allowing NULL as second argument.
>> >
>> 
>> This should be fixed in commit af5c3af ; I'd appreciate if you can test
>> it.
>
> Thanks. Not completely yet.
>
> clang++ command-line-arguments.o debugger.o gmime-filter-reply.o hooks.o notmuch.o notmuch-compact.o notmuch-config.o notmuch-count.o notmuch-dump.o notmuch-insert.o notmuch-new.o notmuch-reply.o notmuch-restore.o notmuch-search.o notmuch-setup.o notmuch-show.o notmuch-tag.o notmuch-time.o sprinter-json.o sprinter-sexp.o sprinter-text.o query-string.o mime-node.o crypto.o tag-util.o  -Lutil -lutil -Llib -lnotmuch -Wl,--as-needed -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lgmime-2.4 -Wl,-R/usr/pkg/lib -lgobject-2.0 -Wl,-R/usr/pkg/lib -lglib-2.0 -lintl  -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -Wl,-R/usr/pkg/lib -ltalloc  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lgmime-2.4 -Wl,-R/usr/pkg/lib -lgobject-2.0 -Wl,-R/usr/pkg/lib -lglib-2.0 -lintl  -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -Wl,-R/usr/pkg/lib -ltalloc  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lxapian -L/usr/pkg/lib -lz -luuid -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/lib -o notmuch-shared
> notmuch-config.o: In function `notmuch_config_save':
> notmuch-config.c:(.text+0xd03): undefined reference to `canonicalize_file_name'
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> Makefile.local:287: recipe for target 'notmuch-shared' failed
> gmake: *** [notmuch-shared] Error 1

Sorry this got dropped. That's what happens to mail sent to me
personally :(. I'm assuming it's ok forward this output to the list.

Is it correct that the statically linked version (notmuch) worked OK but
the dynamically linked version (notmuch-shared) failed? That's
consistent with what I observe on Debian, it's just that here the
dynamically linked version falls back on the canonicalize_file_name in
glibc, hiding the error.

For people on glibc platforms who want to play with this, 

set HAVE_CANONICALIZE_FILE_NAME=0 in Makefile.config, make clean, make

% nm  notmuch-shared | grep canonicalize

d



More information about the notmuch mailing list