From eef99cd58e9ff8985d59ec4c051245f820a37a34 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sat, 4 Jan 2014 14:46:37 +0200 Subject: [PATCH] Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem --- 35/3d53a47d66c99175a8496b3ec93669385c982a | 265 ++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 35/3d53a47d66c99175a8496b3ec93669385c982a diff --git a/35/3d53a47d66c99175a8496b3ec93669385c982a b/35/3d53a47d66c99175a8496b3ec93669385c982a new file mode 100644 index 000000000..688ea64c2 --- /dev/null +++ b/35/3d53a47d66c99175a8496b3ec93669385c982a @@ -0,0 +1,265 @@ +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 494E1431FC0 + for ; Sat, 4 Jan 2014 04:46:47 -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 RNHtIL1Bi828 for ; + Sat, 4 Jan 2014 04:46:39 -0800 (PST) +Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com + [209.85.220.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 672FE431FBD + for ; Sat, 4 Jan 2014 04:46:39 -0800 (PST) +Received: by mail-pa0-f51.google.com with SMTP id fa1so16878769pad.10 + for ; Sat, 04 Jan 2014 04:46:37 -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=JtSa5qOKFXCZ/rkmDJn8clo+cswnzCqKUs59YmhGYp4=; + b=KthG+TaUgaROCkXaGKNjO6EXnyeherW9uqoSmXF0nQfkgMPvAHHttZyjcIp4bN+qFe + IovriRb/BD5G9dc7VYHF8iO7dPafYTvmNpvahqv/yCC3R794fxFZBgmnlSAQM5ofUtBY + aqnbZAVOzOyepnuB2vbdgGLcVsY64ZjOeG+ZJDBDWzZi5S07DtAWTy6bUBxuOqrqvmo+ + WXSwuKF6iJeWKrZGQYD2W9PdlaArCpXxmACHH1DjjZpMlaC7qRMfw0yj9VyJrd/+wvSw + Gq/N46KXnqxXOKdnz3f8uRK3sHQwnHRqv4bI+obTrcUyJbFV5GC6tG2GzZ2yxFM6l1cO + DdAg== +X-Gm-Message-State: + ALoCoQlWHuEZZM7CymHHw0MUVGpglcot2ZWhLJ03Qfyn7MfCBrp20Z7+fFiTeLpRdD0umBoMozYM +MIME-Version: 1.0 +X-Received: by 10.68.99.226 with SMTP id et2mr56822556pbb.8.1388839597368; + Sat, 04 Jan 2014 04:46:37 -0800 (PST) +Received: by 10.70.42.228 with HTTP; Sat, 4 Jan 2014 04:46:37 -0800 (PST) +Received: by 10.70.42.228 with HTTP; Sat, 4 Jan 2014 04:46:37 -0800 (PST) +In-Reply-To: + +References: <20140103214735.GG27614@danbala.tuwien.ac.at> + +Date: Sat, 4 Jan 2014 14:46:37 +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=047d7b6dd09cda0cb204ef246ae9 +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:46:47 -0000 + +--047d7b6dd09cda0cb204ef246ae9 +Content-Type: text/plain; charset=UTF-8 + +I guess we should look at realpath() compatibility, but in fairness passing +NULL for the second parameter is according to POSIX.1-2008, not glibc +extension. + +On Jan 4, 2014 2:35 PM, "Jani Nikula" wrote: +> +> 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 +> > + +--047d7b6dd09cda0cb204ef246ae9 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +

I guess we should look at realpath() compatibility, but in f= +airness passing NULL for the second parameter is according to POSIX.1-2008,= + not glibc extension.

+

On Jan 4, 2014 2:35 PM, "Jani Nikula" <jani@nikula.org> wrote:
+>
+> 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 realp= +ath,
+> > 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 rele= +ase.
+> >
+> > Additionally, when compiling with clang, there are issues with th= +e
+> > 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 p= +revious 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 'vis= +ible'
+> > =C2=A0# define visible __attribute__((visibility("default&qu= +ot;)))
+> > =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 p= +revious declaration
+> > struct visible _notmuch_string_list {
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0^
+> > ./lib/notmuch-private.h:67:33: note: expanded from macro 'vis= +ible'
+> > # 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 p= +revious declaration
+> > struct visible _notmuch_string_list {
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0^
+> > ./lib/notmuch-private.h:67:33: note: expanded from macro 'vis= +ible'
+> > # 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
+> > c++. I've disabled visibility locally, see second attached pa= +tch, but
+> > of course that's not a solution, just a workaround. Suggestio= +ns
+> > welcome.
+> >
+> > Thanks,
+> > =C2=A0Thomas
+> >
+> > _______________________________________________
+> > notmuch mailing list
+> > notmuch@notmuchmail.or= +g
+> > http:= +//notmuchmail.org/mailman/listinfo/notmuch
+> >
+

+ +--047d7b6dd09cda0cb204ef246ae9-- -- 2.26.2