After git clone, how to compile against non-system sqlite3?

65 views
Skip to first unread message

Richard Michael

unread,
Jun 16, 2015, 2:14:34 PM6/16/15
to sqlite...@googlegroups.com
Hello list,

I am hacking on sqlite3-ruby and would like the test suite to compile the native gem against homebrew's sqlite3 [in "/usr/local/Cellar/sqlite/3.8.10.2"].

(Please note, I am not running "gem install ... ".)


Am I to use "ruby setup.rb <something?>" to teach the underlying extconf.rb about the alternate sqlite3?  Perhaps mini_portile can help somehow?

(Naively, I tried "ruby setup.rb config --with-sqlite3-dir=/usr/local/Cellar/sqlite/3.8.10.2", but setup.rb doesn't understand that option.)

I'm examining with:

DYLD_PRINT_LIBRARIES=1 rake test 2>&1 | grep libsqlite3
dyld: loaded: /usr/lib/libsqlite3.dylib


I appreciate any help and am happy to PR working instructions back to README.doc.


Thanks,
Richard







Richard Michael

unread,
Jun 17, 2015, 2:02:05 PM6/17/15
to sqlite...@googlegroups.com
(Replying to myself in case it helps someone.)

A little familiarity with rake-compiler was necessary.

"rake compile -- --with-sqlite3-dir=/path/to/sqlite3"

There doesn't appear to be any environment equivalent, so AFAICT, I can't do a single step "rake test", but "rake compile -- ...  && rake test" is OK.

Ronald Hart

unread,
Jul 16, 2015, 1:05:20 PM7/16/15
to sqlite...@googlegroups.com
Thanks for the post.  I am having a heck of a time trying to get to 3.8.10.2.
If you get it all working if you could please share that would be awesome.

Richard Michael

unread,
Jul 16, 2015, 1:10:57 PM7/16/15
to sqlite...@googlegroups.com
On Thu, Jul 16, 2015 at 3:52 AM, Ronald Hart <get...@gmail.com> wrote:
> Thanks for the post. I am having a heck of a time trying to get to
> 3.8.10.2.
> If you get it all working if you could please share that would be awesome.

Yes, my development environment (not meaning "gem install sqlite3") is
compiling against a homebrew installed sqlite3. My post contained the
steps I needed to do so. (Though, I omitted "brew install sqlite3";
that wouldn't matter -- e.g., you could use macports, manual install,
etc.)

If you post what you're trying to do exactly, and what you've tried so
far, perhaps I can help further.

Cheers,
Richard
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sqlite3-ruby" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sqlite3-ruby/gg4YuXN7id8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sqlite3-ruby...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

danxinnoble

unread,
Oct 1, 2015, 5:01:30 PM10/1/15
to sqlite3-ruby
Hi Richard

Thanks for your post.

I am trying to build sqlite3-ruby using a version of sqlite3 stored in a specific folder, namely sqlite-autoconf-3081101.

I am running from cygwin, if that matters.

When I try:
> rake compile -- --with-sqlite3-dir=/cygdrive/c/bin/sqlite-autoconf-3081101
I get the error:
rake aborted!
LoadError: cannot load such file -- hoe

Was -- meant to indicate a specific file?

The contents of folder sqlite-autoconf-3081101 are:
config.guess
config.log
config.status
config.sub
configure
depcomp
INSTALL
install-sh
libtool
ltmain.sh
Makefile
Makefile.am
Makefile.in
missing
README
shell.c
sqlite3.1
sqlite3.c
sqlite3.exe
sqlite3.h
sqlite3.lo
sqlite3.o
sqlite3.pc
sqlite3ext.h
sqlite3-shell.o
sqlite3-sqlite3.o
tea

Does this look similar to the contents of the directory that you used? 

Thanks
Daniel

Richard Michael

unread,
Oct 2, 2015, 11:22:42 PM10/2/15
to sqlite...@googlegroups.com
Hi Daniel,


On Thu, Oct 1, 2015 at 5:00 PM, danxinnoble <daniel...@intuidex.com> wrote:
> Hi Richard
>
> Thanks for your post.
>
> I am trying to build sqlite3-ruby using a version of sqlite3 stored in a
> specific folder, namely sqlite-autoconf-3081101.
>
> I am running from cygwin, if that matters.
>
> When I try:
>> rake compile -- --with-sqlite3-dir=/cygdrive/c/bin/sqlite-autoconf-3081101
> I get the error:
> rake aborted!
> LoadError: cannot load such file -- hoe
>
> Was -- meant to indicate a specific file?

No; rather, it appears you should install the 'hoe' gem: "gem install
hoe" should do it.

(At this point, I don't think your problem has anything to do with
sqlite itself.)

Regards,
Richard
Reply all
Reply to author
Forward
0 new messages