* Problem building notmuch
@ 2009-12-01 9:33 Steen Manniche
2009-12-01 16:46 ` Jed Brown
0 siblings, 1 reply; 3+ messages in thread
From: Steen Manniche @ 2009-12-01 9:33 UTC (permalink / raw)
To: notmuch
Hi list,
I've been trying to install notmuch but I ran into problems related to
talloc and, seemingly with notmuch's understanding of the talloc.h
file.
./configure affirms that all needed headers are installed:
[...]
Checking for Xapian development files... Yes.
Checking for GMime 2.4 development files... Yes.
Checking for talloc development files... Yes.
Checking for valgrind development files... No.
[...]
but then make complains:
[...]
CC lib/xutil.o
CXX lib/database.o
CXX lib/index.o
CXX lib/message.o
CXX lib/query.o
CXX lib/thread.o
AR lib/notmuch.a
CXX notmuch
notmuch.o: In function `main':
notmuch.c:(.text+0x326): undefined reference to `_talloc_free'
notmuch-config.o: In function `notmuch_config_set_user_other_email':
notmuch-config.c:(.text+0x42): undefined reference to `_talloc_free'
notmuch-config.o: In function `notmuch_config_close':
notmuch-config.c:(.text+0x75): undefined reference to `_talloc_free'
notmuch-config.o: In function `notmuch_config_set_user_primary_email':
notmuch-config.c:(.text+0x1ab): undefined reference to `_talloc_free'
notmuch-config.o: In function `notmuch_config_set_user_name':
notmuch-config.c:(.text+0x1fb): undefined reference to `_talloc_free'
notmuch-config.o:notmuch-config.c:(.text+0x24b): more undefined
references to `_talloc_free' follow
lib/notmuch.a(database.o): In function
`_resolve_message_id_to_thread_id(_notmuch_database*, void*, char
const*)':
database.cc:(.text+0x186e): undefined reference to `_talloc_steal_loc'
lib/notmuch.a(database.o): In function
`_my_talloc_free_for_g_hash(void*)':
database.cc:(.text+0x1a4c): undefined reference to `_talloc_free'
lib/notmuch.a(database.o): In function `notmuch_database_add_message':
database.cc:(.text+0x20e7): undefined reference to `_talloc_free'
database.cc:(.text+0x216b): undefined reference to `_talloc_free'
lib/notmuch.a(message.o): In function `_notmuch_message_create':
message.cc:(.text+0x1ee): undefined reference to `_talloc_free'
lib/notmuch.a(message.o): In function
`_notmuch_message_create_for_message_id':
message.cc:(.text+0x299): undefined reference to `_talloc_steal_loc'
message.cc:(.text+0x372): undefined reference to `_talloc_free'
lib/notmuch.a(message.o): In function `_notmuch_message_set_filename':
message.cc:(.text+0xd9e): undefined reference to `_talloc_free'
lib/notmuch.a(message.o): In function `_notmuch_message_add_term':
message.cc:(.text+0x157e): undefined reference to `_talloc_free'
lib/notmuch.a(message.o): In function `_notmuch_message_remove_term':
message.cc:(.text+0x193b): undefined reference to `_talloc_free'
lib/notmuch.a(message.o): In function `notmuch_message_destroy':
message.cc:(.text+0x1b5a): undefined reference to `_talloc_free'
lib/notmuch.a(query.o):query.cc:(.text+0x8fb): more undefined
references to `_talloc_free' follow
lib/notmuch.a(thread.o): In function
`_thread_add_message(_notmuch_thread*, _notmuch_message*)':
thread.cc:(.text+0x10c): undefined reference to `_talloc_steal_loc'
lib/notmuch.a(thread.o): In function `notmuch_thread_destroy':
thread.cc:(.text+0x854): undefined reference to `_talloc_free'
lib/notmuch.a(message-file.o): In function
`notmuch_message_file_close':
message-file.c:(.text+0x5f5): undefined reference to `_talloc_free'
collect2: ld returned 1 exit status
make: *** [notmuch] Error 1
I have the talloc.h in /usr/include and talloc_free as well as
_talloc_free is in there:
% egrep "*talloc_free" /usr/include/talloc.h
#define talloc_free(ctx) _talloc_free(ctx, __location__)
#define talloc_destroy(ctx) talloc_free(ctx)
#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
int _talloc_free(void *ptr, const char *location);
void talloc_free_children(void *ptr);
%
Probably unusable system info:
% uname -a
Linux algorithm 2.6.31-ARCH #1 SMP PREEMPT Fri Oct 23 11:12:58 CEST
2009 i686 Intel(R) Core(TM)2 Duo CPU P9500 @ 2.53GHz GenuineIntel
GNU/Linux
What am I doing wrong?
Best regards and thanks for the effort with notmuch!
Steen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem building notmuch
2009-12-01 9:33 Problem building notmuch Steen Manniche
@ 2009-12-01 16:46 ` Jed Brown
2009-12-02 9:51 ` Steen Manniche
0 siblings, 1 reply; 3+ messages in thread
From: Jed Brown @ 2009-12-01 16:46 UTC (permalink / raw)
To: Steen Manniche, notmuch
On Tue, 1 Dec 2009 10:33:05 +0100, Steen Manniche <steen@manniche.net> wrote:
> Probably unusable system info:
> % uname -a
> Linux algorithm 2.6.31-ARCH #1 SMP PREEMPT Fri Oct 23 11:12:58 CEST
> 2009 i686 Intel(R) Core(TM)2 Duo CPU P9500 @ 2.53GHz GenuineIntel
> GNU/Linux
This is pretty much my fault because I made the talloc package that is
on AUR. The problem is that you have both talloc-1 (from the smbclient
package) and talloc-2 (from the AUR talloc). The libtalloc.so symlink
points at smbclient's copy, but smbclient doesn't include a pkgconfig
for talloc, thus you are using the talloc-2 header and talloc-1 library.
How do other distros handle talloc-1/talloc-2 incompatibility?
Jed
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem building notmuch
2009-12-01 16:46 ` Jed Brown
@ 2009-12-02 9:51 ` Steen Manniche
0 siblings, 0 replies; 3+ messages in thread
From: Steen Manniche @ 2009-12-02 9:51 UTC (permalink / raw)
To: Jed Brown; +Cc: notmuch
Den Tue, Dec 01, 2009 at 05:46:04PM +0100 skrev Jed Brown:
> On Tue, 1 Dec 2009 10:33:05 +0100, Steen Manniche <steen@manniche.net>
> wrote:
> > Probably unusable system info:
> > % uname -a
> > Linux algorithm 2.6.31-ARCH #1 SMP PREEMPT Fri Oct 23 11:12:58 CEST
> > 2009 i686 Intel(R) Core(TM)2 Duo CPU P9500 @ 2.53GHz GenuineIntel
> > GNU/Linux
>
> This is pretty much my fault because I made the talloc package that is
> on AUR. The problem is that you have both talloc-1 (from the smbclient
> package) and talloc-2 (from the AUR talloc). The libtalloc.so symlink
> points at smbclient's copy, but smbclient doesn't include a pkgconfig
> for talloc, thus you are using the talloc-2 header and talloc-1 library.
>
> How do other distros handle talloc-1/talloc-2 incompatibility?
I have no idea, but the man pages of ld and gcc together with some
guru assistance helped me construct the following 'hack':
% mkdir LIBS && cd LIBS
% ln -s /usr/lib/libtalloc.so.2.0.0 libtalloc.so
% cd ..
% g++ debugger.o gmime-filter-reply.o notmuch.o notmuch-config.o notmuch-count.o notmuch-dump.o notmuch-new.o notmuch-reply.o notmuch-restore.o notmuch-search.o notmuch-search-tags.o notmuch-setup.o notmuch-show.o notmuch-tag.o notmuch-time.o query-string.o show-message.o lib/notmuch.a -LLIBS -lgmime-2.4 -lz -lnsl -lgobject-2.0 -lglib-2.0 -ltalloc -lxapian -o notmuch
The thing to note in the above line is -LLIBS
All this causes a good make and ldd reports
% ldd notmuch
linux-gate.so.1 => (0xb78ad000)
libgmime-2.4.so.2 => /usr/lib/libgmime-2.4.so.2 (0xb7836000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7822000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb780b000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb77d1000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb771f000)
libtalloc.so.2 => /usr/lib/libtalloc.so.2 (0xb7715000)
libxapian.so.15 => /usr/lib/libxapian.so.15 (0xb75bf000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb74ca000)
libm.so.6 => /lib/libm.so.6 (0xb74a4000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb7486000)
libc.so.6 => /lib/libc.so.6 (0xb7340000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7327000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7323000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb731f000)
librt.so.1 => /lib/librt.so.1 (0xb7316000)
libpcre.so.0 => /lib/libpcre.so.0 (0xb72e4000)
/lib/ld-linux.so.2 (0xb78ae000)
libdl.so.2 => /lib/libdl.so.2 (0xb72e0000)
and notmuch works.
Thanks for the fast reply, Jed. And I hope you get the package problem
solved.
Best regards,
Steen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-02 9:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 9:33 Problem building notmuch Steen Manniche
2009-12-01 16:46 ` Jed Brown
2009-12-02 9:51 ` Steen Manniche
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).