unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* problems with symbol hiding on Debian Squeeze i386
@ 2011-07-11 19:25 David Bremner
  2011-07-16 20:34 ` david
  2011-07-16 23:18 ` problems with symbol hiding on Debian Squeeze i386 anarcat
  0 siblings, 2 replies; 6+ messages in thread
From: David Bremner @ 2011-07-11 19:25 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 2678 bytes --]


Julien Valroth reported on IRC that he had problems with the initial
call of 'notmuch new' crashing with

terminate called after throwing an instance of 'Xapian::InvalidArgumentError'

I confirmed that the following quick and dirty patch seems to fix the problem.

--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -36,7 +36,7 @@ LIBRARY_SUFFIX = so
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)
 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
-LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME)
+LIBRARY_LINK_FLAG = -shared -Wl,-soname=$(SONAME)
 ifeq ($(LIBDIR_IN_LDCONFIG),1)
 ifeq ($(DESTDIR),)
 LIBRARY_INSTALL_POST_COMMAND=ldconfig

I haven't quite decided what to do about this yet, but I thought I'd get
this on the record, because it seems to me a few people have been having
problems with this.

FWIW, I tested with various versions of xapian and libgmime, but the
problem still exists for  gmime 2.4.25-1, and xapian 1.2.5-1, both
recompiled for squeeze.

If you install the libxapian22 from sid, then gcc and libc6 are both
upgraded, and the problem goes away (but you are not really running
squeeze anymore).  

About the only good news is that the symbol hiding test does indeed fail
on squeeze i386.

I have appended part of the backtrace, in case anyone finds it
illuminating.  As far as I can tell without line numbers, the catch in
_notmuch_message_remove_term is failing. I suppose this could be the
kind of "exceptions start mysteriously malfunctioning" that
http://gcc.gnu.org/wiki/Visibility warns about.

Xapian _seems_ to do the right thing with visisibility
declarations for these exception classes.

I don't know what, if anything to conclude from the fact that everything
seems to work fine in gcc 4.6.

backtrace:

#4  0xf7ac2442 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0xf7ac2581 in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0xf7b3fb83 in Xapian::Document::Internal::remove_term(std::string const&) ()
   from /usr/lib/sse2/libxapian.so.22
#7  0xf7b3fc76 in Xapian::Document::remove_term(std::string const&) ()
   from /usr/lib/sse2/libxapian.so.22
#8  0xf7fd5233 in _notmuch_message_remove_term ()
   from /home/bremner/software/upstream/notmuch/lib/libnotmuch.so.1
#9  0xf7fd5389 in notmuch_message_remove_tag ()
   from /home/bremner/software/upstream/notmuch/lib/libnotmuch.so.1
#10 0xf7fd63ea in notmuch_message_maildir_flags_to_tags ()
   from /home/bremner/software/upstream/notmuch/lib/libnotmuch.so.1
#11 0x08050483 in add_files_recursive ()

[-- Attachment #2: Type: application/pgp-signature, Size: 315 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-17  1:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11 19:25 problems with symbol hiding on Debian Squeeze i386 David Bremner
2011-07-16 20:34 ` david
2011-07-16 20:34   ` [PATCH 1/2] libnotmuch: export Xapian typeinfo symbols david
2011-07-17  1:29     ` [PATCH] " david
2011-07-16 20:34   ` [PATCH 2/2] debian: add (demangled) Xapian exception typeinfo symbols to libnotmuch1.symbols david
2011-07-16 23:18 ` problems with symbol hiding on Debian Squeeze i386 anarcat

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).