Nicolas Williams wrote:
> On Fri, Jun 12, 2009 at 10:06:31PM +0100, Dr. David Kirkby wrote:
>> [...]
>> -lpthread -lc   -Wl,-soname -Wl,libsqlite3.so.0 -o .libs/libsqlite3.so.0.8.6
>>
>> If the order of libpthread and libc are exchanged, the library can be 
>> built. In other words, libc needs to be linked before libpthread, not 
>> the other way around.
> 
> Hmm, that's really odd.  On S10 libpthread is an empty filter on libc,
> which is a fancy way of saying that all of the code in libpthread moved
> to libc and libpthread is just a shell saying as much so that older
> programs linked with libpthread can still run.  You should not add
> -lpthread to the link-edit of any program or shared object in Solaris 10
> or above, but if you did the order in which -lpthread and -lc appear in
> the link-edit command-line should make no difference.
> 
>> I've no idea if that is a bug in gcc, a bug in libtool or a bug in sqlite.
> 
> I don't see -lpthread in configure.ac, but I do see this in the output
> of ./configure:
> 
> checking whether to support threadsafe operation... yes
> checking for library containing pthread_create... none required
> 
> and then the generated Makefile does actually include -lpthread, but
> only for building the Tcl module, testfixture, and sqlite3_analyzer:
> 
> ./Makefile:LIBTCL = -L/usr/lib -ltcl8.4 -ldl  -lsocket -lnsl -lpthread -lm
> 
> Very strange.
> 
> Nico


The thing that made me try exchanging libc and libpthread was in fact 
some hints on other pages, totally unrelated to sqlite. There are tons 
of links with people having this problem on Apache, ntop, and other bits 
of software. libtool is always involved.

I can't seem to find the page which suggested transposing the order of 
the libraries, but there was one, which made me transpose them.

Perhaps I should try to find what is adding libpthread then, and remove it.

In the short term I'd like to get this working on sqlite-3.5.3. But in 
the longer term, I would hope that Sage updates to the latest sqlite, so 
it would need to run on that.



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to