Re: Problems with sqlite



Jon Trowbridge said:
> On Tue, 2004-12-07 at 21:37 -0600, Michael Davies wrote:
>> ERROR: System.Reflection.TargetInvocationException: Exception has been
>> thrown by the target of an invocation. ---> System.DllNotFoundException:
>> sqlite
>> in <0x00053> (wrapper managed-to-native)
>
> This is just a guess, but the problem could be a mono-ism that has been
> a source of much confusion.
>
> The mono runtime will throw a System.DllNotFoundException any time an
> attempt to dlopen() a shared library fails.  This is misleading because
> there are several different ways a dlopen() call can fail --- the file
> not being found is just the most obvious one.
>
> Often, dlopen() will fail because of unresolved symbols.  This usually
> happens because the shared library's dependencies were not set properly
> at build-time.  It is an easy mistake to make: lots of shared libraries
> are never ever dlopen()ed by other apps --- they are linked to
> applications, along with lots of other libraries via a tool like
> pkg-config that also (independently) manages library dependencies.
>
> There is an easy way to test for this: try linking just that library
> against a trivial C program.  Create a file trivial.c containing just
> "main() { }" and then:
> % gcc trivial.c -lsqlite
>
> If there are no errors, libsqlite.so's dependencies are set correctly
> and the problem must be something else.  If you see unresolved symbols,
> the Ubuntu libsqlite.so is broken.

Thanks Jon for your guidance - you were right on the money.

Ubuntu's libsqlite.so appears broken.  It looks ok, but on installing the
CVS version of sqlite in a different prefix, everything suddenly works.

(Two points for those googling in the future - make sure you back revise
the CVS repo for sqlite to 2.8, and make sure LD_LIBRARY_PATH points to
your newly built sqlite rather than the system's installed version)

CVS Beagle now is running as expected on my Warty Ubuntu install.

-- 
michael at msdavies dot net
http://michaeldavies.org/weblog




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]