couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Marino (JIRA)" <>
Subject [jira] [Created] (COUCHDB-2225) configure should fail if system cannot generate shared libraries (in LT_INIT)
Date Tue, 15 Apr 2014 11:58:19 GMT
Michael Marino created COUCHDB-2225:

             Summary: configure should fail if system cannot generate shared libraries (in
                 Key: COUCHDB-2225
             Project: CouchDB
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Build System
            Reporter: Michael Marino

The LT_INIT autoconf macro checks if the system can build shared libraries, which couch needs:



The AC_DISABLE/ENABLE_* requests that the system builds shared libraries and not static libraries,
but does not enforce it.  It should.  

An example of a failure mode is the observed configure output on a Synology (linux-based)

checking whether the gcc linker (/usr/local/x86_64-linux-gnu/x86_64-linux-gnu/x86_64-linux-gnu/bin/ld
-m elf_x86_64) supports shared libraries... no
checking dynamic linker characteristics... GNU/Linux
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes

In this case, gcc returns a broken path to ld, but configure succeeds even though no shared
libraries will/can be built.  'make' does fail later, but not in a way that makes the source
of the failure obvious:

cp .libs/ priv/
cp: can't stat '.libs/': No such file or directory

which arises because the so files are not built.  In this case, configuration and make succeed
when the correct path to ld is given (e.g. ./configure LD=/path/to/ld).  However, generally,
configure should die with an appropriate error if the system can not build shared libraries.


Change of the above lines in

AS_IF([test x"${enable_shared}" = "xno"], [
  AC_MSG_ERROR([System as configured cannot build shared libraries.])

And regeneration of configure.  I'm happy to produce a pull request for this.  

This message was sent by Atlassian JIRA

View raw message