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

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

Date: Thu, 26 Jun 2014 09:02:33 -0300

To: Thomas Klausner

Cc: Notmuch list

From: David Bremner


Thomas Klausner <tk@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


Thread: