Nicolas Williams wrote:
> On Fri, Jun 12, 2009 at 04:34:50PM -0500, 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 spoke to a Solaris linker engineer, and we both suspect that: a)
> you're using gld, b) libtool is doing things not apparent from the logs
> that you've posted, c) gld is choking on Solaris libraries that are
> filters, of which two that are implicated here are: libpthread (appears
> explicitly in the output you posted) and libdl (implied by the errors
> about dlerror and friends).
Thank you for your help. The fact you told me I did not need to link
libpthread was crucial to solving this.
I've found that just removing the libpthread from the generated Makefile
solves this.
The offer is still there for a sqlite developer to fix this properly on
a Sun, but as a hack, just removing the library works. See my code below.
Dave
if [ `uname` = "SunOS" ]; then
# Linking in pthread is not necessary in recent versions of Solaris,
as all the functionality is
# in libc. The thread library is only included for backwards
compatibility. However, libtool
# appears to be messing things up, so the library will be removed
from the Makefile.
# This is probably not the most elegant way, but it works.
# David Kirkby, 13th June 2009
sed 's/LIBPTHREAD=-lpthread/LIBPTHREAD=/g' Makefile >
Makefile-without-pthread
mv Makefile-without-pthread Makefile
fi
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users