title: got SIGSEGV while calling 'require ("lsqlite3")' with lua 5.1.5
body: <p>I had built lua 5.1.5 and lsqlite3-0.8.1. all of them run well on my RedHat Linux.   </p>
  
  <p>and then I ported them to my MIPS development board. lua and other modules (such as luafilesystem, md5, cgilua and wsapi) run well. but lsqlite3 does not work.</p>
  
  <p>when I execute require("lsqlite3") in lua command line, it returns error messages in below:</p>
  
  <h1>lua</h1>
  
  <p>Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio</p>
  
  <blockquote>
    <p>require("lsqlite3")
    do_page_fault() #2: sending SIGSEGV to lua for invalid read access from
    00000000 (epc == 00000000, ra == 2ac36144)
    Segmentation fault</p>
    
    <h1> </h1>
  </blockquote>
  
  <p>can any one give me any help to fix it? Thanks!</p>
  
  <p>I got few progress in solving this problem, I rebuilt the LUA with gcc compile option '-Wl,-E' and rebuilt lsqlite3 later. I executed require ("lsqlite3") in lua command line, and it didnt print any message. I continued running some other database operation commands and found them all been successfully executed. As it seemed the problem had been solved, I should be very happy about it. 
  but another more strange problem raised.</p>
  
  <p>If I put sentence require("lsqlite3") into a file, and then execute the file in this way:</p>
  
  <blockquote>
    <p>lua file</p>
  </blockquote>
  
  <p>it still printed  error messages like this:</p>
  
  <blockquote>
    <p>do_page_fault() #2: sending SIGSEGV to lua for invalid read access from
    2ada054c (epc == 2ada054c, ra == 2abdceac)</p>
  </blockquote>
  
  <p>If I put more database operation sentences into a file, and then run this file by lua. Lua can give correct result of query operation and insert values to table correctly, but always print error messages showed above.</p>
  
  <p>If I run sentences in the file one by one in lua command line interface, it never print this error message. </p>
  
  <p>It seems to give the error message when executing the 'require' function. But if I put require("lfs") into a file and run this file by lua, it never print error message. </p>
  
  <p>I am confused that whait is the difference between the lua command line execution and lua script.</p>