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

For the visibility issue please upgrade Notmuch.

+

BR,
+Jani.

+

On Jan 4, 2014 2:26 PM, "Thomas Klausner" <tk@giga.or.at> wrote:
+>
+> Hi!
+>
+> I'm currently starting to try out notmuch-0.16 on NetBSD. It went = +off
+> to a rocky start, since it segfaulted in the initial config setup.
+>
+> Debugging it I found that notmuch uses a glibc extension to realpath,<= +br> +> allowing NULL as second argument.
+>
+> I've converted it to use a prepared buffer instead; attached is a<= +br> +> possible patch that makes notmuch complete its setup phase for me, and= +
+> adds inclusion of the header files suggested by the realpath man page<= +br> +> on NetBSD. Please address this issue in some way in the next release.<= +br> +>
+> Additionally, when compiling with clang, there are issues with the
+> visibility. The symptoms are:
+>
+> In file included from lib/database.cc:21:
+> In file included from ./lib/database-private.h:33:
+> ./lib/notmuch-private.h:479:8: error: visibility does not match previo= +us declaration
+> array subscriptstruct visible _notmuch_string_list {
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0^
+> ./lib/notmuch-private.h:67:33: note: expanded from macro 'visible&= +#39;
+> =C2=A0# define visible __attribute__((visibility("default"))= +)
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
+> ./lib/notmuch-private.h:52:13: note: previous attribute is here
+> #pragma GCC visibility push(hidden)
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
+>
+> In file included from lib/parse-time-vrp.cc:23:
+> In file included from ./lib/database-private.h:33:
+> ./lib/notmuch-private.h:479:8: error: visibility does not match previo= +us declaration
+> struct visible _notmuch_string_list {
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0^
+> ./lib/notmuch-private.h:67:33: note: expanded from macro 'visible&= +#39;
+> # define visible __attribute__((visibility("default")))
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
+> ./lib/notmuch-private.h:52:13: note: previous attribute is here
+> #pragma GCC visibility push(hidden)
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
+> 1 warning generated.
+> In file included from lib/directory.cc:21:
+> ./lib/notmuch-private.h:479:8: error: visibility does not match previo= +us declaration
+> struct visible _notmuch_string_list {
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0^
+> ./lib/notmuch-private.h:67:33: note: expanded from macro 'visible&= +#39;
+> # define visible __attribute__((visibility("default")))
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
+> ./lib/notmuch-private.h:52:13: note: previous attribute is here
+> #pragma GCC visibility push(hidden)
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
+>
+> and so on. I guess it is because the visibility differs between c and<= +br> +> c++. I've disabled visibility locally, see second attached patch, = +but
+> of course that's not a solution, just a workaround. Suggestions +> welcome.
+>
+> Thanks,
+> =C2=A0Thomas
+>
+> _______________________________________________
+> notmuch mailing list
+> notmuch@notmuchmail.org= +
+> http://not= +muchmail.org/mailman/listinfo/notmuch
+>
+

+ +--047d7bdc855686369c04ef24443b-- -- 2.26.2