Stuck in Sqlite3 3.8.2 Hell [Ubuntu 14.04]

90 views
Skip to first unread message

Ronald Hart

unread,
Jul 16, 2015, 1:05:19 PM7/16/15
to sqlite...@googlegroups.com
I am going crazy.  
I completed wiped any trace of sqlite3 (including includes and libraries) from my Ubuntu 14.04 machine.  
I also uninstalled all traces of the gem.  
If I then do a "gem install sqlite3" it complains of course there are no libraries.
Next I install Sqlite3 3.8.10 from source.  I test it out with shell and it checks out and I no longer get the "near "WITH": syntax error" when doing a recursive query.
Now comes the fun part. I install the gem " install sqlite3 -- --with-sqlite3-include=/usr/local/include --with-sqlite3-lib=/usr/local/lib"
I think my problem is solved.  Then I run my ruby code and alas, the "near "WITH": syntax error" shows up again.  In ruby I query the Sqlite3 version and it tells me "3.8.2"!!!!!

Any help from anyone would be greatly appreciated.

Aaron Patterson

unread,
Jul 16, 2015, 2:07:05 PM7/16/15
to sqlite...@googlegroups.com
After you build sqlite, can you check what it's linked against? On OS X
it's `otool -L /path/to/dylyb`, on Linux I *think* it's `ldd
/path/to/lib`.

Make sure it's linked against the right version of sqlite3. Also, there
is a way to see what libraries get loaded at runtime. On OS X, like
this:

$ DYLD_PRINT_LIBRARIES=1 ruby -e'require "sqlite3"'

On Linux like this (though I didn't test it):

$ LD_TRACE_LOADED_OBJECTS=1 ruby -e'require "sqlite3"'

That should tell you which shared libraries are getting loaded. You
should be able to verify the right version is getting loaded. Just a
shot in the dark, but you may need to add /usr/local/lib to you
ld.so.conf.

--
Aaron Patterson
http://tenderlovemaking.com/
Reply all
Reply to author
Forward
0 new messages