#207 MiniDLNA v1.1.0 configure fails to properly detect libsqlite3

v1.0 (example)
closed-invalid
nobody
None
3
2014-07-29
2013-08-17
Lew
No

Using stock minidlna-1.1.0.tar.gz on stock Slackware 13.0 (32bit) system, ./configure incorrectly determines that libsqlite3 is not installed.

Slackware package sqlite-3.6.14.2-i486-1 is installed, and libsqlite3 is properly available

~ $ locate libsqlite3
/usr/lib/libsqlite3.la
/usr/lib/libsqlite3.so
/usr/lib/libsqlite3.so.0
/usr/lib/libsqlite3.so.0.8.6

The problem appears to be in the test built into ./configure that determines whether or not libsqlite3 is installed. The compile completes successfully, and successfully links libsqlite3, but /fails/ to link the libdl necessary for the dlsym()/dlerror()/dlopen()/dlclose() calls in libsqlite3.so. Thus, the test program fails to link, and ./configure falsely claims that libsqlite3 does not exist.

See attached ./configure.log extract for details on compile/link failure.

Additionally, see dlopen(3) man page for requirements for linking with libdl for support of dlopen() etc calls.

1 Attachments

Discussion

  • Lew

    Lew - 2013-08-20

    For Slackware 13.0 (and perhaps other releases and distros), libsqlite3 is compiled with libdl

    pkg-config(1) reports
    ~ $ pkg-config --cflags --libs sqlite3
    -lsqlite3 -ldl

     
  • Justin Maggard

    Justin Maggard - 2014-07-29

    This appears to be a sqlite3 bug that was fixed over 3 years ago.

    http://www3.sqlite.org/cgi/src/info/f69ed286ffb3f62f5cb5c1f7df55fa4d2468b472

     
    • Lew

      Lew - 2014-07-29

      On Monday 28 July 2014 21:21:52 Justin Maggard wrote:

      This appears to be a sqlite3 bug that was fixed over 3 years ago.

      http://www3.sqlite.org/cgi/src/info/f69ed286ffb3f62f5cb5c1f7df55fa4d2468b472

      sqlite bug fix appears to be the inclusion of a compile-time flag
      SQLITE_OMIT_LOAD_EXTENSION, which (when set) disables the ability for
      sqlite3 to load extensions dynamically.

      AFAICT, patch /does not/ remove the requirement for libdl on Linux systems,
      when sqlite3 compiled to load extensions dynamically (a valid configuration
      on Linux systems).

      Suggest that you include libdl in your link options, rather than asking
      downstream users to jump through hoops.

      --
      Lew Pitcher
      "In Skills, We Trust"
      PGP public key available upon request

       
  • Justin Maggard

    Justin Maggard - 2014-07-29

    You missed the pertinent part of the patch, which actually links libsqlite3 to libdl when SQLITE_OMIT_LOAD_EXTENSION is enabled. The libdl requirement doesn't go away -- it just works like it's supposed to.

    I mean, seriously, how crazy would it be if every program had to explicitly link to all the libraries that the shared libs they used linked to? I don't want to live in that world! ;-)

     
  • Justin Maggard

    Justin Maggard - 2014-07-29
    • status: open --> closed-invalid
     

Log in to post a comment.