From a8236f051ea026bd3fd9f73141ff4dfbf64c44b9 Mon Sep 17 00:00:00 2001 From: Suvayu Ali Date: Mon, 6 Jul 2015 16:04:10 +0200 Subject: [PATCH] Re: notmuch release 0.20.2 now available --- d8/46ef7ff217711c7d53869b840c9afdc2d77327 | 148 ++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 d8/46ef7ff217711c7d53869b840c9afdc2d77327 diff --git a/d8/46ef7ff217711c7d53869b840c9afdc2d77327 b/d8/46ef7ff217711c7d53869b840c9afdc2d77327 new file mode 100644 index 000000000..280fecc67 --- /dev/null +++ b/d8/46ef7ff217711c7d53869b840c9afdc2d77327 @@ -0,0 +1,148 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 078BD6DE0AD1 + for ; Mon, 6 Jul 2015 07:04:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.647 +X-Spam-Level: +X-Spam-Status: No, score=0.647 tagged_above=-999 required=5 tests=[AWL=1.467, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id dWANKlKbWxFI for ; + Mon, 6 Jul 2015 07:04:15 -0700 (PDT) +Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com + [74.125.82.51]) by arlo.cworth.org (Postfix) with ESMTPS id 9136A6DE0AC7 for + ; Mon, 6 Jul 2015 07:04:14 -0700 (PDT) +Received: by wgqq4 with SMTP id q4so141480751wgq.1 + for ; Mon, 06 Jul 2015 07:04:12 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=sender:date:from:to:subject:message-id:mail-followup-to:references + :mime-version:content-type:content-disposition:in-reply-to + :user-agent; bh=i6VGD8G/dKMIXgt2OQvmCRRn4ASab1UwLiRelcJMo/8=; + b=ANt1r6np4LNagbaviP8fpxN3XXFfi+aS0ngQfOhc5ER7xLVsj81wmP+sRdH23XQgze + OODx42psZEs4hGycYBdNWWuut5t+GH7Cp8Ph/tEU927b77lnIWzw/1GcOa7Ck7s+qqvH + 5auOjXgT3v96nptjK+ZVb9E0krKcDeqxRelRaNaszRjSCO9Fs2YWlctDfjhdtai/EXUU + O/umnUBHapQgbE037fUejuYkmjNGcekL5LfS3YGA0TLJht3VE5Hzi3cQjG/9AAf+Msf5 + deCqZnegmZcc4SPmMzmkrTlUbCORWyKEYRWeYQbMYQ4RLjEOmIGwFIsuj0S7V5G4ADlc + 2EPg== +X-Received: by 10.180.23.66 with SMTP id k2mr90590376wif.85.1436191452382; + Mon, 06 Jul 2015 07:04:12 -0700 (PDT) +Received: from chitra.no-ip.org ([2001:610:120:3001:2ad2:44ff:fe4a:b029]) + by mx.google.com with ESMTPSA id wx9sm28331660wjb.6.2015.07.06.07.04.11 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Mon, 06 Jul 2015 07:04:11 -0700 (PDT) +Sender: Suvayu Ali +Date: Mon, 6 Jul 2015 16:04:10 +0200 +From: Suvayu Ali +To: notmuch@notmuchmail.org +Subject: Re: notmuch release 0.20.2 now available +Message-ID: <20150706140410.GB4079@chitra.no-ip.org> +Mail-Followup-To: notmuch@notmuchmail.org +References: <87h9pplqer.fsf@maritornes.cs.unb.ca> + <20150630063942.GM24926@chitra.no-ip.org> + <87a8vhlkdv.fsf@maritornes.cs.unb.ca> + <20150630084018.GO24926@chitra.no-ip.org> + <87r3otjfib.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87r3otjfib.fsf@maritornes.cs.unb.ca> +User-Agent: Mutt/1.5.23.1 (2014-03-12) +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Mon, 06 Jul 2015 14:04:21 -0000 + +Hi David, + +First, apologies for the delay. I had a bicycle accident, still +recovering. + +On Tue, Jun 30, 2015 at 07:02:52PM +0200, David Bremner wrote: +> Suvayu Ali writes: +> +> > Yes, I have looked at what the official packages[1] do, I do exactly the +> > same[2]. Essentially the spec file does the following: +> > +> > pushd bindings/ruby +> > ruby extconf.rb --vendor --with-cflags="%{optflags}" +> > make %{?_smp_mflags} +> > popd +> +> I think the problem is contained in the original message. Since we want +> to create a shared library "notmuch.so" for ruby to import, we need to +> compile the C files in bindings/ruby with -fPIC. +> +> I don't know if this is Debian specific, or ruby version specific, but +> on my Debian Jessie machine with ruby 2.1, the generated Makefile +> bindings/ruby/Makefile has +> +> CFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector-strong -Wformat +> -Werror=format-security -fPIC $(ARCH_FLAG) +> +> in it +> +> even when invoked outside the notmuch build system; e.g. +> +> % cd bindings/ruby && ruby extconf.rb +> +> I guess the first step is to see if the -fPIC flag is also there on +> Fedora, and if not, why not. If I look at the builds for 0.19 [1] +> it seems it is. But notice there it is not required to pass it in to "--with-cflags" + +Indeed. I looked at the generated Makefiles, they like below: + +--- nm-0.20.2.mk 2015-07-06 15:11:26.138317221 +0200 ++++ nm-master.mk 2015-07-06 15:41:14.929951640 +0200 +@@ -80,7 +80,7 @@ + debugflags = -ggdb3 + warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat + CCDLFLAGS = -fPIC +-CFLAGS = $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic $(ARCH_FLAG) ++CFLAGS = $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC $(ARCH_FLAG) + INCFLAGS = -I. -I../../lib -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) + DEFS = + CPPFLAGS = $(DEFS) $(cppflags) + +So actually, the master version gets the -fPIC flag. But it should be +redundant, since CCDLFLAGS is already set to -fPIC. Now when I compare +the corresponding compile commands, I see (you also noticed that in the +logs): + +0.20.2: gcc -I. -I../../lib -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -m64 -o message.o -c message.c +master: gcc -I. -I../../lib -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o message.o -c message.c + +So the trailing bits of the command is somehow dropped, and the +CCDLFLAGS seems to be absent (see, no empty space either). I do not +understand why that would be the case. I'll dig further when I can find +some more time ... + +> [1] https://kojipkgs.fedoraproject.org/packages/notmuch/0.19/1.fc21/data/logs/x86_64/build.log +> - I couldn't find x86_64 build logs for 0.20 + +You can't, Fedora ships only 0.19. That's why I maintain the 0.20+ copr +repository, for myself and other interested (invisible) users out there +:-p. This gap was much wider in the past. + +Cheers, + +-- +Suvayu + +Open source is the future. It sets us free. -- 2.26.2