Hi Barak,

On Fri, 18 Mar 2011, Barak A. Pearlmutter wrote:

You probably need to tighten your libsqlite3-dev dependency. Maybe it
requires 3.7.5.

Fossil ships with its own copy of sqlite, which I remove in favour of
the debian package.  For a while I used an aggressive version
dependency, but I recently switched to guarding the snippets of code
in the fossil sources that use advanced sqlite functionality.  (Which
is used in all cases for extra safety or metering, and not essential
functionality.)

Have you sent this patch upstream?

This includes in particular these added #if guards:

   $ grep -n -B1 -A4 stmt_readonly src/*.c
   src/report.c-247-#if SQLITE_VERSION_NUMBER >= 3007004
   src/report.c:248:  if( !sqlite3_stmt_readonly(pStmt) ){
   src/report.c-249-    zErr = mprintf("SQL must not modify the database");
   src/report.c-250-  }
   src/report.c-251-#endif
   src/report.c-252-  if( pStmt ){
   --
   src/report.c-857-#if SQLITE_VERSION_NUMBER >= 3007004
   src/report.c:858:  if( !sqlite3_stmt_readonly(pStmt) ){
   src/report.c-859-    sqlite3_finalize(pStmt);
   src/report.c-860-    return SQLITE_ERROR;
   src/report.c-861-  }
   src/report.c-862-#endif

So apparently either the version there, taken from the sqlite
changelog, is wrong, or I wrote the guard incorrectly.  Could I ask
what version of libsqlite3-dev you had installed?  I ask because this
works for me using libsqlite3-dev 3.7.3-1.

The version I was using was the version in squeeze

orwell:/home/faheem# apt-cache policy libsqlite3-0  libsqlite3-dev
libsqlite3-0:
  Installed: 3.7.3-1
  Candidate: 3.7.3-1
  Version table:
     3.7.5-1 0
50 http://debian.csail.mit.edu/debian/ unstable/main i386 Packages
 *** 3.7.3-1 0
        500 http://debian.csail.mit.edu/debian/ squeeze/main i386 Packages
        100 /var/lib/dpkg/status
libsqlite3-dev:
  Installed: 3.7.3-1
  Candidate: 3.7.3-1
  Version table:
     3.7.5-1 0
50 http://debian.csail.mit.edu/debian/ unstable/main i386 Packages
 *** 3.7.3-1 0
        500 http://debian.csail.mit.edu/debian/ squeeze/main i386 Packages
        100 /var/lib/dpkg/status

I just switched back to that from 3.7.5, and can still reproduce the failure on my squeeze installation. Note I'm using

faheem@orwell:/usr/local/src/fossil/fossil-2011.03.01.190432$ debuild binary

to build.

The errors are coming from the snippets you quoted, so maybe the guards are at fault. Though in that case I don't understand why you are not seeing the problem.

                                                            Regards, Faheem

gcc -g -Os -Wall -DFOSSIL_ENABLE_SSL -o fossil ./bld/add.o ./bld/allrepo.o ./bld/attach.o ./bld/bag.o ./bld/bisect.o ./bld/blob.o ./bld/branch.o ./bld/browse.o ./bld/captcha.o ./bld/cgi.o ./bld/checkin.o ./bld/checkout.o ./bld/clearsign.o ./bld/clone.o ./bld/comformat.o ./bld/configure.o ./bld/content.o ./bld/db.o ./bld/delta.o ./bld/deltacmd.o ./bld/descendants.o ./bld/diff.o ./bld/diffcmd.o ./bld/doc.o ./bld/encode.o ./bld/event.o ./bld/export.o ./bld/file.o ./bld/finfo.o ./bld/graph.o ./bld/http.o ./bld/http_socket.o ./bld/http_ssl.o ./bld/http_transport.o ./bld/import.o ./bld/info.o ./bld/leaf.o ./bld/login.o ./bld/main.o ./bld/manifest.o ./bld/md5.o ./bld/merge.o ./bld/merge3.o ./bld/name.o ./bld/pivot.o ./bld/popen.o ./bld/pqueue.o ./bld/printf.o ./bld/rebuild.o ./bld/report.o ./bld/rss.o ./bld/schema.o ./bld/search.o ./bld/setup.o ./bld/sha1.o ./bld/shun.o ./bld/skins.o ./bld/sqlcmd.o ./bld/stash.o ./bld/stat.o ./bld/style.o ./bld/sync.o ./bld/tag.o ./bld/th_main.o ./bld/timeline.o ./bld/tkt.o ./bld/tktsetup.o ./bld/undo.o ./bld/update.o ./bld/url.o ./bld/user.o ./bld/verify.o ./bld/vfile.o ./bld/wiki.o ./bld/wikiformat.o ./bld/winhttp.o ./bld/xfer.o ./bld/zip.o ./bld/shell.o ./bld/th.o ./bld/th_lang.o -lz -lsqlite3 -lcrypto -lssl
./bld/report.o: In function `sqlite3_exec_readonly':
/usr/local/src/fossil/fossil-2011.03.01.190432/./bld/report_.c:858: undefined reference to `sqlite3_stmt_readonly'
./bld/report.o: In function `verify_sql_statement':
/usr/local/src/fossil/fossil-2011.03.01.190432/./bld/report_.c:248: undefined reference to `sqlite3_stmt_readonly'
collect2: ld returned 1 exit status
make[1]: *** [fossil] Error 1
make[1]: Leaving directory `/usr/local/src/fossil/fossil-2011.03.01.190432'
dh_auto_build: make -j1 returned exit code 2
make: *** [binary] Error 2
debuild: fatal error at line 1307:
couldn't exec fakeroot debian/rules:



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to