From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A5B00429E31 for ; Sat, 16 Jul 2011 13:34:45 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 5Cov-Q6GMZZj for ; Sat, 16 Jul 2011 13:34:44 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D2990429E29 for ; Sat, 16 Jul 2011 13:34:43 -0700 (PDT) Received: from zancas.localnet (fctnnbsc30w-142167167212.pppoe-dynamic.High-Speed.nb.bellaliant.net [142.167.167.212]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p6GKYdEZ014827 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Sat, 16 Jul 2011 17:34:39 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1QiBZO-0008Vb-V7; Sat, 16 Jul 2011 17:34:38 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH 1/2] libnotmuch: export Xapian typeinfo symbols Date: Sat, 16 Jul 2011 17:34:27 -0300 Message-Id: <1310848468-27665-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310848468-27665-1-git-send-email-david@tethera.net> References: <87liw4ei1t.fsf@zancas.localnet> <1310848468-27665-1-git-send-email-david@tethera.net> Cc: David Bremner 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, 16 Jul 2011 20:34:46 -0000 From: David Bremner The lack of such exporting seems to cause problems catching exceptions, as suggested by http://gcc.gnu.org/wiki/Visibility This manifested in the symbol-hiding test failing when notmuch was compile with gcc 4.4.5. On i386, this further manifested as notmuch new failing to run (crashing with an uncaught exception on first run). --- lib/Makefile.local | 4 +--- lib/gen-version-script.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 lib/gen-version-script.sh diff --git a/lib/Makefile.local b/lib/Makefile.local index 7e2bc87..48f8852 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -76,9 +76,7 @@ $(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ notmuch.sym: lib/notmuch.h - printf "{\nglobal:\n" > notmuch.sym - sed -n 's/^\s*\(notmuch_[a-z_]*\)\s*(.*/\t\1;/p' $< >> notmuch.sym - printf "local: *;\n};\n" >> notmuch.sym + sh lib/gen-version-script.sh < $< > $@ $(dir)/$(SONAME): $(dir)/$(LIBNAME) ln -sf $(LIBNAME) $@ diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh new file mode 100644 index 0000000..1cd33be --- /dev/null +++ b/lib/gen-version-script.sh @@ -0,0 +1,16 @@ +cat <