Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem
authorJani Nikula <jani@nikula.org>
Sat, 4 Jan 2014 12:35:54 +0000 (14:35 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:52 +0000 (09:58 -0800)
13/d0c2c2e705a91f41602ab0bf0e9a1e70320f9d [new file with mode: 0644]

diff --git a/13/d0c2c2e705a91f41602ab0bf0e9a1e70320f9d b/13/d0c2c2e705a91f41602ab0bf0e9a1e70320f9d
new file mode 100644 (file)
index 0000000..7b92762
--- /dev/null
@@ -0,0 +1,242 @@
+Return-Path: <jani@nikula.org>\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 1BD6B431FC0\r
+       for <notmuch@notmuchmail.org>; Sat,  4 Jan 2014 04:36:06 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 eRXn7U0Ih5hV for <notmuch@notmuchmail.org>;\r
+       Sat,  4 Jan 2014 04:35:56 -0800 (PST)\r
+Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com\r
+       [209.85.128.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 09287431FBD\r
+       for <notmuch@notmuchmail.org>; Sat,  4 Jan 2014 04:35:55 -0800 (PST)\r
+Received: by mail-ve0-f174.google.com with SMTP id pa12so8291846veb.19\r
+       for <notmuch@notmuchmail.org>; Sat, 04 Jan 2014 04:35:55 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:mime-version:in-reply-to:references:date\r
+       :message-id:subject:from:to:cc:content-type;\r
+       bh=fDTtF+bLpWXoFX4MzHTuJHvwwgb9fyaPFwCC/fVlLlw=;\r
+       b=lxPle/eMelZuCSP9/MuueKoRzk0Dhem2BAPNrYGAyKTKVIRYkyD+cmkwD1jUPMLo3p\r
+       3Snhl6nrOslFpFTyLYHEXXtiYSgcf1hhuVn/F+Ofnl+gg2YpWS0XyKB3Os0romd/KaWP\r
+       v9CQVN1bTohIQejw8VoruOsRT1KjuQ3w17+TXHcgVTtoucaXNJZ4Cbk/I/rOk075IL5D\r
+       OFPSi25Ipq3D7qx+SgTkXsDHhnokP5wSgTT68XqKPyCt8WvJr52WnBtJ7ng2KzGHE4AL\r
+       SaEY5x701z120CtuZo9+7rF3armFSuHlbt1Gm/xlMW3K1oXcN2jcQXKtacxPyHD4ncpk\r
+       7M4A==\r
+X-Gm-Message-State:\r
+ ALoCoQmueCBDRYJBgizXiUz7LIG8BLNMQwsJ7j5w09dqN2Wf1werAbX6W6OhGQzCgfhYzx8XOrkP\r
+MIME-Version: 1.0\r
+X-Received: by 10.59.0.193 with SMTP id ba1mr13805413ved.12.1388838954326;\r
+       Sat, 04 Jan 2014 04:35:54 -0800 (PST)\r
+Received: by 10.58.143.6 with HTTP; Sat, 4 Jan 2014 04:35:54 -0800 (PST)\r
+Received: by 10.58.143.6 with HTTP; Sat, 4 Jan 2014 04:35:54 -0800 (PST)\r
+In-Reply-To: <20140103214735.GG27614@danbala.tuwien.ac.at>\r
+References: <20140103214735.GG27614@danbala.tuwien.ac.at>\r
+Date: Sat, 4 Jan 2014 14:35:54 +0200\r
+Message-ID:\r
+ <CAB+hUn-8eyY07y3j1N3JJLQ3qWVEVPoGWHcUVkovg34xH0ZOwQ@mail.gmail.com>\r
+Subject: Re: notmuch-0.16: realpath() compatibility issue;\r
+       clang visibility problem\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Thomas Klausner <tk@giga.or.at>\r
+Content-Type: multipart/alternative; boundary=047d7bdc855686369c04ef24443b\r
+Cc: Notmuch Mail <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: Sat, 04 Jan 2014 12:36:06 -0000\r
+\r
+--047d7bdc855686369c04ef24443b\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+For the visibility issue please upgrade Notmuch.\r
+\r
+BR,\r
+Jani.\r
+\r
+On Jan 4, 2014 2:26 PM, "Thomas Klausner" <tk@giga.or.at> wrote:\r
+>\r
+> Hi!\r
+>\r
+> I'm currently starting to try out notmuch-0.16 on NetBSD. It went off\r
+> to a rocky start, since it segfaulted in the initial config setup.\r
+>\r
+> Debugging it I found that notmuch uses a glibc extension to realpath,\r
+> allowing NULL as second argument.\r
+>\r
+> I've converted it to use a prepared buffer instead; attached is a\r
+> possible patch that makes notmuch complete its setup phase for me, and\r
+> adds inclusion of the header files suggested by the realpath man page\r
+> on NetBSD. Please address this issue in some way in the next release.\r
+>\r
+> Additionally, when compiling with clang, there are issues with the\r
+> visibility. The symptoms are:\r
+>\r
+> In file included from lib/database.cc:21:\r
+> In file included from ./lib/database-private.h:33:\r
+> ./lib/notmuch-private.h:479:8: error: visibility does not match previous\r
+declaration\r
+> array subscriptstruct visible _notmuch_string_list {\r
+>        ^\r
+> ./lib/notmuch-private.h:67:33: note: expanded from macro 'visible'\r
+>  # define visible __attribute__((visibility("default")))\r
+>                                 ^\r
+> ./lib/notmuch-private.h:52:13: note: previous attribute is here\r
+> #pragma GCC visibility push(hidden)\r
+>             ^\r
+>\r
+> In file included from lib/parse-time-vrp.cc:23:\r
+> In file included from ./lib/database-private.h:33:\r
+> ./lib/notmuch-private.h:479:8: error: visibility does not match previous\r
+declaration\r
+> struct visible _notmuch_string_list {\r
+>        ^\r
+> ./lib/notmuch-private.h:67:33: note: expanded from macro 'visible'\r
+> # define visible __attribute__((visibility("default")))\r
+>                                 ^\r
+> ./lib/notmuch-private.h:52:13: note: previous attribute is here\r
+> #pragma GCC visibility push(hidden)\r
+>             ^\r
+> 1 warning generated.\r
+> In file included from lib/directory.cc:21:\r
+> ./lib/notmuch-private.h:479:8: error: visibility does not match previous\r
+declaration\r
+> struct visible _notmuch_string_list {\r
+>        ^\r
+> ./lib/notmuch-private.h:67:33: note: expanded from macro 'visible'\r
+> # define visible __attribute__((visibility("default")))\r
+>                                 ^\r
+> ./lib/notmuch-private.h:52:13: note: previous attribute is here\r
+> #pragma GCC visibility push(hidden)\r
+>             ^\r
+>\r
+> and so on. I guess it is because the visibility differs between c and\r
+> c++. I've disabled visibility locally, see second attached patch, but\r
+> of course that's not a solution, just a workaround. Suggestions\r
+> welcome.\r
+>\r
+> Thanks,\r
+>  Thomas\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+>\r
+\r
+--047d7bdc855686369c04ef24443b\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<p dir=3D"ltr">For the visibility issue please upgrade Notmuch.</p>\r
+<p dir=3D"ltr">BR,<br>\r
+Jani.</p>\r
+<p dir=3D"ltr">On Jan 4, 2014 2:26 PM, &quot;Thomas Klausner&quot; &lt;<a h=\r
+ref=3D"mailto:tk@giga.or.at">tk@giga.or.at</a>&gt; wrote:<br>\r
+&gt;<br>\r
+&gt; Hi!<br>\r
+&gt;<br>\r
+&gt; I&#39;m currently starting to try out notmuch-0.16 on NetBSD. It went =\r
+off<br>\r
+&gt; to a rocky start, since it segfaulted in the initial config setup.<br>\r
+&gt;<br>\r
+&gt; Debugging it I found that notmuch uses a glibc extension to realpath,<=\r
+br>\r
+&gt; allowing NULL as second argument.<br>\r
+&gt;<br>\r
+&gt; I&#39;ve converted it to use a prepared buffer instead; attached is a<=\r
+br>\r
+&gt; possible patch that makes notmuch complete its setup phase for me, and=\r
+<br>\r
+&gt; adds inclusion of the header files suggested by the realpath man page<=\r
+br>\r
+&gt; on NetBSD. Please address this issue in some way in the next release.<=\r
+br>\r
+&gt;<br>\r
+&gt; Additionally, when compiling with clang, there are issues with the<br>\r
+&gt; visibility. The symptoms are:<br>\r
+&gt;<br>\r
+&gt; In file included from lib/database.cc:21:<br>\r
+&gt; In file included from ./lib/database-private.h:33:<br>\r
+&gt; ./lib/notmuch-private.h:479:8: error: visibility does not match previo=\r
+us declaration<br>\r
+&gt; array subscriptstruct visible _notmuch_string_list {<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>\r
+&gt; ./lib/notmuch-private.h:67:33: note: expanded from macro &#39;visible&=\r
+#39;<br>\r
+&gt; =C2=A0# define visible __attribute__((visibility(&quot;default&quot;))=\r
+)<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br>\r
+&gt; ./lib/notmuch-private.h:52:13: note: previous attribute is here<br>\r
+&gt; #pragma GCC visibility push(hidden)<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br>\r
+&gt;<br>\r
+&gt; In file included from lib/parse-time-vrp.cc:23:<br>\r
+&gt; In file included from ./lib/database-private.h:33:<br>\r
+&gt; ./lib/notmuch-private.h:479:8: error: visibility does not match previo=\r
+us declaration<br>\r
+&gt; struct visible _notmuch_string_list {<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>\r
+&gt; ./lib/notmuch-private.h:67:33: note: expanded from macro &#39;visible&=\r
+#39;<br>\r
+&gt; # define visible __attribute__((visibility(&quot;default&quot;)))<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br>\r
+&gt; ./lib/notmuch-private.h:52:13: note: previous attribute is here<br>\r
+&gt; #pragma GCC visibility push(hidden)<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br>\r
+&gt; 1 warning generated.<br>\r
+&gt; In file included from lib/directory.cc:21:<br>\r
+&gt; ./lib/notmuch-private.h:479:8: error: visibility does not match previo=\r
+us declaration<br>\r
+&gt; struct visible _notmuch_string_list {<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>\r
+&gt; ./lib/notmuch-private.h:67:33: note: expanded from macro &#39;visible&=\r
+#39;<br>\r
+&gt; # define visible __attribute__((visibility(&quot;default&quot;)))<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br>\r
+&gt; ./lib/notmuch-private.h:52:13: note: previous attribute is here<br>\r
+&gt; #pragma GCC visibility push(hidden)<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br>\r
+&gt;<br>\r
+&gt; and so on. I guess it is because the visibility differs between c and<=\r
+br>\r
+&gt; c++. I&#39;ve disabled visibility locally, see second attached patch, =\r
+but<br>\r
+&gt; of course that&#39;s not a solution, just a workaround. Suggestions<br=\r
+>\r
+&gt; welcome.<br>\r
+&gt;<br>\r
+&gt; Thanks,<br>\r
+&gt; =C2=A0Thomas<br>\r
+&gt;<br>\r
+&gt; _______________________________________________<br>\r
+&gt; notmuch mailing list<br>\r
+&gt; <a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a>=\r
+<br>\r
+&gt; <a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch">http://not=\r
+muchmail.org/mailman/listinfo/notmuch</a><br>\r
+&gt;<br>\r
+</p>\r
+\r
+--047d7bdc855686369c04ef24443b--\r