On Nov 18, 2007 2:59 PM, P Kishor <[EMAIL PROTECTED]> wrote:
> On Nov 17, 2007 2:22 PM, P Kishor <[EMAIL PROTECTED]> wrote:
> > I need to build a DBD::SQLite package using SQLite with fts
> > capabilities. Can someone on this list kindly give me painless, easy
> > to understand instructions to do so? I need to do this on a Mac OS X
> > 10.4 first, and then on my web host subsequently (running some flavor
> > of Linux, natch).
> >
>
>
> ok, let's try this again.
>
> I found instructions for building a loadable extension at
> <http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions>
>
> Note to Richard on the subject of improving the website -- please make
> such instructions easier to find by perhaps linking them somewhere
> prominently under "building or compiling" right off the download page
> for the source code.
>
> That said, I tried to build the fts2 extension and got the following --
>
> $ tar xvzf sqlite-3.4.2
> $ mkdir sqlite-3.4.2-build
> $ cd sqlite-3.4.2
> <edit Makefile.in by commenting line 119 to enable loadable extensions>
> <line 119: # TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1>
> $ cd ..
> $ cd sqlite-3.4.2-build
> $ ../sqlite-3.4.2/configure LIBS=-ldl
> $ make
> $ export LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
> $ gcc -I`pwd` -shared ../sqlite-3.4.2/ext/fts2/fts2.c -o fts2.so
> i686-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
> /usr/bin/ld: Undefined symbols:
> _main
> _sqlite3Fts2HashClear
> _sqlite3Fts2HashFind
> _sqlite3Fts2HashInit
> _sqlite3Fts2HashInsert
> _sqlite3Fts2InitHashTable
> _sqlite3Fts2PorterTokenizerModule
> _sqlite3Fts2SimpleTokenizerModule
> collect2: ld returned 1 exit status
>
>
> so, this is the first step that I have surmount. Once this is done, I
> would really like fts2 to not be shared but be permanently jammed into
> sqlite3 so I don't have to load it manually (unless, there is any
> significant advantage to building a shared library).

this is getting more and more a happy waste of time (hopefully I would
have learned something out of this). After much searching, I found Joe
Wilson's instructions at
<http://readlist.com/lists/sqlite.org/sqlite-users/2/11644.html>

Following those pretty much to the t, I almost got everything working.
Except, I got the following during make

../sqlite-3.5.2/ext/fts1/fts1.c:7:2: error: #error fts1 has a design
flaw and has been deprecated.
make: *** [fts1.lo] Error 1

Fantastic. If it is has a design flaw and has been deprecated, then
why include it? Or, if it is included, where is the information that
it has been deprecated that one can read *before* doing make?

Anyway, I went back into Makefile.in and commented out all references
to fts1 and ran make again. This time I got

../sqlite-3.5.2/ext/fts2/fts2.c:7:2: error: #error fts2 has a design
flaw and has been deprecated.
make: *** [fts2.lo] Error 1

So, I went back into the ext library and discovered that there was
fts3. So, I went back into Makefile.in and commented out all
references to fts2, added similar looking lines for fts3 and ran make
again. This time it all worked. Great!

Well, not so great. Now when I run the new sqlite3, I get the following

dyld: lazy symbol binding failed: Symbol not found: _sqlite3Fts1Init
  Referenced from:
/Users/punkish/Projects/sqlite-3.5.2-build/.libs/libsqlite3.0.dylib
  Expected in: flat namespace

dyld: Symbol not found: _sqlite3Fts1Init
  Referenced from:
/Users/punkish/Projects/sqlite-3.5.2-build/.libs/libsqlite3.0.dylib
  Expected in: flat namespace

Trace/BPT trap

If I can get some clear instructions on how to do this successfully, I
promise to record them on the wiki for other poor souls who might try
this.

Many thanks in advance.

And, oh yes, still will need help with the following once the above is possible.


>
> Once I am successful with the above, I would like to build a
> DBD::SQLite with my new library.
>
> Many thanks for your guidance.
>
> --
> Puneet Kishor
>

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to