Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1027

When running src/libmongoc/build/autotools/Versions.m4 out of scope, VERSION_* is cat'ed from the wrong directory

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 1.3.0
    • Affects Version/s: 1.3.0-rc0
    • Component/s: Build, libbson, libmongoc
    • None

      The phongo build process sources "Versions.m4":

      ```
      if test "$PHP_LIBMONGOC" == "no"; then
      m4_include(src/libmongoc/build/autotools/Versions.m4)
      MONGOC_MAJOR_VERSION=mongoc_major_version
      MONGOC_MINOR_VERSION=mongoc_minor_version
      MONGOC_MICRO_VERSION=mongoc_micro_version
      MONGOC_API_VERSION=1.0
      MONGOC_VERSION=mongoc_version
      AC_SUBST(MONGOC_MAJOR_VERSION)
      AC_SUBST(MONGOC_MINOR_VERSION)
      AC_SUBST(MONGOC_MICRO_VERSION)
      AC_SUBST(MONGOC_API_VERSION)
      AC_SUBST(MONGOC_VERSION)
      AC_OUTPUT($srcdir/src/libmongoc/src/mongoc/mongoc-config.h)
      AC_OUTPUT($srcdir/src/libmongoc/src/mongoc/mongoc-version.h)
      fi
      ```
      to be able to set the right MONGOC_*_CONSTANTS, but since 13f9dae1b99962b3989cbbf3dd115d169211944e, there are now issues as Versions.m4 does a "cat" on VERSION_CURRENT and VERSION_RELEASE, without taking into account that they might no longer live in the same directory.

      This results in:
      ```
      cat: VERSION_CURRENT: No such file or directory
      cat: VERSION_RELEASED: No such file or directory
      cat: VERSION_CURRENT: No such file or directory
      cat: VERSION_RELEASED: No such file or directory
      ```

      when running our "phpize" (akin to autogen.sh). It shows the errors once for libbson and once for libmongoc.

      the "cat" needs to be done on the files in the right directory.

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            derick Derick Rethans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: