Compiling from source, missing sqlite3 header

  • Torke

    Torke - 2009-08-04

    I'd like to build my own binary from source.  I've grabbed the source from CVS and  I have all the prerequisite headers/libraries, but I'm running into a little issue with sqlite3.

    Running `make` works fine, until this error appears:

    Compiling image_utils.c
    Compiling albumart.c
    Compiling log.c
    make: *** No rule to make target `-lsqlite3', needed by `minidlna'.  Stop.

    I have installed sqlite-3.6.16 using the default configure options and the header file appears on my filesystem:

    (torke@icarus) [~/downloads/minidlna]$ locate sqlite3.h

    (torke@icarus) [~/downloads/minidlna]$ ls -l /usr/local/include/sqlite3*
    -rw-r--r-- 1 root root 259788 2009-08-02 23:18 /usr/local/include/sqlite3.h
    -rw-r--r-- 1 root root  20754 2009-08-02 23:18 /usr/local/include/sqlite3ext.h

    I've updated the missing headers section in to point to the right spot and also added -I/usr/local/include to CFLAGS in the Makefile, no such luck.

    Any suggestions to what I can try?

    • Torke

      Torke - 2009-08-04

      For what it's worth, I've recompiled sqlite3 with ./configure --includedir=/usr/include, but the same "no rule to make target" error shows up when I try to compile minidlna.

      • Justin Maggard

        Justin Maggard - 2009-08-04

        It looks like it's able to find the headers, but it can't find the library.  You should try adding -L/usr/local/lib to the CFLAGS.

    • Justin Maggard

      Justin Maggard - 2009-08-04

      Or install libsqlite3 into /usr/lib instead of /usr/local/lib.

    • Torke

      Torke - 2009-08-05

      Reinstalling sqlite with ./configure --includedir=/usr/include --libdir=/usr/lib worked.

      A colleague also suggested manually linking the binary by executing gcc outside the Makefile script with the appropriate arguments.

      Happy to report both methods worked.  Off I go to stream some data...


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks