Asterisk
  1. Asterisk
  2. ASTERISK-19751

asterisk fails to autoconfigure - cannot find sqlite3

    Details

    • Type: Bug Bug
    • Status: Open
    • Severity: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 10.3.0
    • Target Release Version/s: None
    • Component/s: Core/BuildSystem
    • Security Level: None
    • Labels:
      None
    • Environment:
      Slackware64 and probably other x64 distros.
    • Frequency of Occurrence:
      Constant

      Description

      running configure this way:
      ASTCFLAGS="-g" \
      CFLAGS="-O2 -fPIC" \
      CXXFLAGS="-O2 -fPIC" \
      ./configure \
      --prefix=/usr \
      --libdir=/usr/lib64 \
      --sysconfdir=/etc \
      --localstatedir=/var \
      --mandir=/usr/man \
      --build=x86_64-slackware-linux
      After a bunch of checkups got, next:
      ...skipped...
      checking for speex_encode in -lspeex... no
      checking for speex_preprocess_ctl in -lspeex... no
      checking for speex_preprocess_ctl in -lspeexdsp... no
      checking for sqlite_exec in -lsqlite... no
      checking for sqlite3_open in -lsqlite3... no
      configure: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database.
      configure: WARNING: *** Please install the SQLite3 development package.
      However SQLite3 is installed.
      (Will attach listing of sqlite3 related files on FS).

      1. config.log-clean
        658 kB
        feyfre
      2. config.log-keys
        659 kB
        feyfre
      3. sqlite-seacrh.txt
        4 kB
        feyfre

        Activity

        Hide
        feyfre added a comment -

        config.log after running configure with mentioned keys
        With such keys most of software built on Slackware.

        Show
        feyfre added a comment - config.log after running configure with mentioned keys With such keys most of software built on Slackware.
        Hide
        feyfre added a comment - - edited

        Attached some configure logs. I hope it will help somehow.

        Show
        feyfre added a comment - - edited Attached some configure logs. I hope it will help somehow.
        Hide
        Matt Jordan added a comment -

        Looking at your configure log, the reason why the configure script bombed out is this:

        /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lsqlite

        If you execute ld from that directory (which should end up being /usr/x86_64-slackware-linux/bin/ld) - can it find the sqlite library?

        Show
        Matt Jordan added a comment - Looking at your configure log, the reason why the configure script bombed out is this: /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lsqlite If you execute ld from that directory (which should end up being /usr/x86_64-slackware-linux/bin/ld) - can it find the sqlite library?
        Hide
        feyfre added a comment -

        > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lsqlite

        > If you execute ld from that directory (which should end up being /usr/x86_64-slackware-linux/bin/ld) - can it find the sqlite library?

        This issue is not about SQLite. I have not installed any SQLite. I explicitly stated SQLite3. So ld -lsqlite will not find any sqlite libraries - it is intended to be so.

        So, back to SQLite3.
        I have got advice by Slackware maintainer. Workaround is pretty simple:
        LDFLAGS="-ldl" ./confogure <otherargs>
        It works.
        Problem was in:
        > configure:50059: checking for sqlite3_open in -lsqlite3
        > configure:50094: gcc -o conftest -g -O2 -pthread conftest.c -lsqlite3 -lm >&5
        > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlsym'
        > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlerror'
        > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlopen'
        > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlclose'
        > collect2: ld returned 1 exit status
        > configure:50101: $? = 1

        So, solution is to tuneup configure to set extra libraries to probe with. I saw configure detects asound library with extra library dl. So the same should be for SQLite3. Use AST_EXT_LIB_CHECK ?
        But I do not know how to modify configure.ac correctly, and how to regenerate configure correctly(running autoconf in source root generates very suspicious configure - about 5 times smaller than provided).

        Show
        feyfre added a comment - > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lsqlite > If you execute ld from that directory (which should end up being /usr/x86_64-slackware-linux/bin/ld) - can it find the sqlite library? This issue is not about SQLite. I have not installed any SQLite. I explicitly stated SQLite3. So ld -lsqlite will not find any sqlite libraries - it is intended to be so. So, back to SQLite3. I have got advice by Slackware maintainer. Workaround is pretty simple: LDFLAGS="-ldl" ./confogure <otherargs> It works. Problem was in: > configure:50059: checking for sqlite3_open in -lsqlite3 > configure:50094: gcc -o conftest -g -O2 -pthread conftest.c -lsqlite3 -lm >&5 > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlsym' > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlerror' > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlopen' > /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../lib64/libsqlite3.so: undefined reference to `dlclose' > collect2: ld returned 1 exit status > configure:50101: $? = 1 So, solution is to tuneup configure to set extra libraries to probe with. I saw configure detects asound library with extra library dl. So the same should be for SQLite3. Use AST_EXT_LIB_CHECK ? But I do not know how to modify configure.ac correctly, and how to regenerate configure correctly(running autoconf in source root generates very suspicious configure - about 5 times smaller than provided).
        Hide
        Matt Jordan added a comment -

        Sorry about that - I was looking at the wrong library! Thanks for catching that and pointing out the correct issue here - that being that, for whatever reason, the sqlite3 library on SlackWare cannot locate the dynamic linker library using the standard shared object library search path.

        That being said, I'm not convinced this is something that should be changed in Asterisk's default configure script. The fact that your particular distro / machine configuration required the dynamic linker library to be specified in order to load the sqlite3 library seems rather odd. As its not something that has to be specified for the vast majority of distros, this seems to be a rather isolated event. And, as was pointed out, a workaround is available in the Asterisk configure script by explicitly specifying that the ld library should be linked.

        You're more then welcome to solicit other opinions on this from other developers in #asterisk-dev or on the asterisk-dev mailing list. They may have more insight into why this would be the case, and whether or not the configure script should be modified.

        Show
        Matt Jordan added a comment - Sorry about that - I was looking at the wrong library! Thanks for catching that and pointing out the correct issue here - that being that, for whatever reason, the sqlite3 library on SlackWare cannot locate the dynamic linker library using the standard shared object library search path. That being said, I'm not convinced this is something that should be changed in Asterisk's default configure script. The fact that your particular distro / machine configuration required the dynamic linker library to be specified in order to load the sqlite3 library seems rather odd. As its not something that has to be specified for the vast majority of distros, this seems to be a rather isolated event. And, as was pointed out, a workaround is available in the Asterisk configure script by explicitly specifying that the ld library should be linked. You're more then welcome to solicit other opinions on this from other developers in #asterisk-dev or on the asterisk-dev mailing list. They may have more insight into why this would be the case, and whether or not the configure script should be modified.

          People

          • Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development