Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem
authorDavid Bremner <david@tethera.net>
Thu, 26 Jun 2014 12:02:33 +0000 (09:02 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:19 +0000 (10:03 -0800)
1a/93b1f92955451c4d885507fd5d25d987ba092f [new file with mode: 0644]

diff --git a/1a/93b1f92955451c4d885507fd5d25d987ba092f b/1a/93b1f92955451c4d885507fd5d25d987ba092f
new file mode 100644 (file)
index 0000000..a883801
--- /dev/null
@@ -0,0 +1,94 @@
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0B835431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 26 Jun 2014 05:02:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id zkTW1Sn+jhz9 for <notmuch@notmuchmail.org>;\r
+       Thu, 26 Jun 2014 05:02:39 -0700 (PDT)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6EF0E431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 26 Jun 2014 05:02:39 -0700 (PDT)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+       (envelope-from <david@tethera.net>)\r
+       id 1X08Nw-00047o-Ms; Thu, 26 Jun 2014 09:02:36 -0300\r
+Received: (nullmailer pid 29245 invoked by uid 1000); Thu, 26 Jun 2014\r
+       12:02:33 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Thomas Klausner <tk@giga.or.at>\r
+Subject: Re: notmuch-0.16: realpath() compatibility issue; clang visibility\r
+       problem\r
+In-Reply-To: <20140408123312.GZ5053@danbala.tuwien.ac.at>\r
+References: <20140103214735.GG27614@danbala.tuwien.ac.at>\r
+       <sfid--20140408-140907--004.35-1@spamfilter.osbf.lua>\r
+       <87ob0c6p0e.fsf@zancas.localnet>\r
+       <20140408123312.GZ5053@danbala.tuwien.ac.at>\r
+User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 26 Jun 2014 09:02:33 -0300\r
+Message-ID: <87a98zho9y.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: Notmuch list <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 26 Jun 2014 12:02:45 -0000\r
+\r
+Thomas Klausner <tk@giga.or.at> writes:\r
+\r
+> Hi David!\r
+>\r
+> On Tue, Apr 08, 2014 at 08:26:25AM -0300, David Bremner wrote:\r
+>> > Debugging it I found that notmuch uses a glibc extension to realpath,\r
+>> > allowing NULL as second argument.\r
+>> >\r
+>> \r
+>> This should be fixed in commit af5c3af ; I'd appreciate if you can test\r
+>> it.\r
+>\r
+> Thanks. Not completely yet.\r
+>\r
+> 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\r
+> notmuch-config.o: In function `notmuch_config_save':\r
+> notmuch-config.c:(.text+0xd03): undefined reference to `canonicalize_file_name'\r
+> clang: error: linker command failed with exit code 1 (use -v to see invocation)\r
+> Makefile.local:287: recipe for target 'notmuch-shared' failed\r
+> gmake: *** [notmuch-shared] Error 1\r
+\r
+Sorry this got dropped. That's what happens to mail sent to me\r
+personally :(. I'm assuming it's ok forward this output to the list.\r
+\r
+Is it correct that the statically linked version (notmuch) worked OK but\r
+the dynamically linked version (notmuch-shared) failed? That's\r
+consistent with what I observe on Debian, it's just that here the\r
+dynamically linked version falls back on the canonicalize_file_name in\r
+glibc, hiding the error.\r
+\r
+For people on glibc platforms who want to play with this, \r
+\r
+set HAVE_CANONICALIZE_FILE_NAME=0 in Makefile.config, make clean, make\r
+\r
+% nm  notmuch-shared | grep canonicalize\r
+\r
+d\r
+\r