On 10/10/2011 08:37 PM, Tobias Mueller wrote:
Hello,
I'm trying to compile SQLite on a GNU/Linux system for use in an NFS
environment. The NFS server doesn't support locks via fcntl(), i.e.:
access("/homedir//.mozilla/firefox/51jxlyk4.default/places.sqlite", F_OK) = 0
stat("/homedir//.mozilla/firefox/51jxlyk4.default/places.sqlite",
{st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/homedir//.mozilla/firefox/51jxlyk4.default/places.sqlite",
O_RDWR|O_CREAT, 0644) = 42
fcntl(42, F_GETFD) = 0
fcntl(42, F_SETFD, FD_CLOEXEC) = 0
fstat(42, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lseek(42, 0, SEEK_SET) = 0
read(42, "", 100) = 0
fcntl(42, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741824, len=1})
= -1 ENOLCK (No locks available)
However, sqlite chooses "unix" as default locking method rendering
Firefox useless.
I found out that hardcoding "unix-none" into the openDatabase function
makes it work.
Hence I suspect it's sqlite's fault to not choose a working locking
style such as "unix-none" by itself.
FWIW: I thought I'd give one of the locking styles documented on
<http://www.sqlite.org/compile.html> a try, namely No locking or
dot-file locking.
However, compiling with -DSQLITE_ENABLE_LOCKING_STYLE fails:
gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.8\" "-DPACKAGE_STRING=\"sqlite
3.7.8\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.8\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1
-DHAVE_READLINE=1 -DHAVE_POSIX_FALLOCATE=1 -I.@am__isrc@ -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_LOCKING_STYLE
-MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c -fPIC -DPIC -o .libs/sqlite3.o
sqlite3.c: In function 'unixOpen':
sqlite3.c:29685:26: error: 'fsInfo' undeclared (first use in this function)
sqlite3.c:29685:26: note: each undeclared identifier is reported only once for
each function it appears in
sqlite3.c:29698:35: error: 'MNT_LOCAL' undeclared (first use in this function)
mv -f .deps/shell.Tpo .deps/shell.Po
make: *** [sqlite3.lo] Error 1
I think SQLITE_ENABLE_LOCKING_STYLE is only officially supported
on OSX.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users