Hi,

On OS X, homebrew installs sqlite3 as “keg-only” because otherwise it 
interferes with the system sqlite3. This means that libsqlite3.dylib ends up in 
/usr/local/opt/sqlite/lib, not in /usr/local/lib

When I build lsqlite3 with luarocks, well, to be honest, I’m not sure what 
happens, but when I then

$ lua -e "require'lsqlite3'"
lua: error loading module 'lsqlite3' from file 
'/usr/local/lib/lua/5.1/lsqlite3.so':
        dlopen(/usr/local/lib/lua/5.1/lsqlite3.so, 2): Symbol not found: 
_sqlite3_enable_load_extension
 Referenced from: /usr/local/lib/lua/5.1/lsqlite3.so
 Expected in: dynamic lookup

So my guess is that:
- when lsqlite3 is being compiled, it either expects 
_sqlite3_enable_load_extension, or it gets the brew sqlite3.h, which leads it 
to believe that _sqlite3_enable_load_extension
- when lsqlite3 is loaded, it loads the system sqlite3, which for whatever 
reason, lacks _sqlite3_enable_load_extension

On the other hand, the following works:

$ DYLD_LIBRARY_PATH=/usr/local/opt/sqlite/lib/ lua -e "require'lsqlite3’"


Any hints on how to persuade Luarocks to build lsqlite3 in such a way that it 
goes looking for libsqlite3.dylib in /usr/local/opt/sqlite/lib?

Cheers,
Geoff

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to