Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-856

Build errors using bundled libbson and system libmongoc

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.3
    • Affects Version/s: 1.2.1
    • Component/s: None
    • None

      System:MacOS 10.12.2 Developer Beta 6
      PHP:7.0.8
      Clone GitHub.But Make Error:
      /Users/Sean/mongo-php-driver/src/libbson/src/bson/bson-macros.h:23:4: error: "Only <bson.h> can be included directly."

      ➜ mongo-php-driver git:(master) brew install automake autoconf libtool pkgconfig

      Updating Homebrew...
      Warning: automake-1.15 already installed
      Warning: autoconf-2.69 already installed
      Warning: libtool-2.4.6_1 already installed
      Warning: pkg-config-0.29.1_2 already installed

      In file included from /Users/Sean/mongo-php-driver/src/libbson/src/yajl/yajl.c:17:
      In file included from src/libbson/src/yajl/yajl_parse.h:22:
      /Users/Sean/mongo-php-driver/src/libbson/src/bson/bson-compat.h:23:3: error: "Only <bson.h> can be included directly."

      1. error "Only <bson.h> can be included directly."
        ^
        In file included from /Users/Sean/mongo-php-driver/src/libbson/src/yajl/yajl.c:17:
        In file included from src/libbson/src/yajl/yajl_parse.h:22:
        In file included from /Users/Sean/mongo-php-driver/src/libbson/src/bson/bson-compat.h:38:
        /Users/Sean/mongo-php-driver/src/libbson/src/bson/bson-macros.h:23:4: error: "Only <bson.h> can be included directly."
      2. error "Only <bson.h> can be included directly."
        ^
        /bin/sh /Users/Sean/mongo-php-driver/libtool --mode=compile cc -Isrc/libbson/src/yajl/ -I/Users/Sean/mongo-php-driver/src/libbson/src/yajl/ -DPHP_ATOM_INC -I/Users/Sean/mongo-php-driver/include -I/Users/Sean/mongo-php-driver/main -I/Users/Sean/mongo-php-driver -I/Applications/MAMP/bin/php/php7.0.8/include/php -I/Applications/MAMP/bin/php/php7.0.8/include/php/main -I/Applications/MAMP/bin/php/php7.0.8/include/php/TSRM -I/Applications/MAMP/bin/php/php7.0.8/include/php/Zend -I/Applications/MAMP/bin/php/php7.0.8/include/php/ext -I/Applications/MAMP/bin/php/php7.0.8/include/php/ext/date/lib -I/usr -I/Users/Sean/mongo-php-driver/src/BSON/ -I/Users/Sean/mongo-php-driver/src/MongoDB/ -I/Users/Sean/mongo-php-driver/src/MongoDB/Exception/ -I/Users/Sean/mongo-php-driver/src/contrib/ -I/Users/Sean/mongo-php-driver/src/libmongoc/src/mongoc/ -I/Users/Sean/mongo-php-driver/src/libbson/src/ -I/Users/Sean/mongo-php-driver/src/libbson/src/yajl/ -I/Users/Sean/mongo-php-driver/src/libbson/src/bson/ -I/usr/local/opt/openssl/include -g -O2 -D_THREAD_SAFE -pthread -c /Users/Sean/mongo-php-driver/src/libbson/src/yajl/yajl_encode.c -o src/libbson/src/yajl/yajl_encode.lo
        2 errors generated.
        make: *** [src/libbson/src/yajl/yajl.lo] Error 1
        make: *** Waiting for unfinished jobs....
        cc -Isrc/libbson/src/yajl/ -I/Users/Sean/mongo-php-driver/src/libbson/src/yajl/ -DPHP_ATOM_INC -I/Users/Sean/mongo-php-driver/include -I/Users/Sean/mongo-php-driver/main -I/Users/Sean/mongo-php-driver -I/Applications/MAMP/bin/php/php7.0.8/include/php -I/Applications/MAMP/bin/php/php7.0.8/include/php/main -I/Applications/MAMP/bin/php/php7.0.8/include/php/TSRM -I/Applications/MAMP/bin/php/php7.0.8/include/php/Zend -I/Applications/MAMP/bin/php/php7.0.8/include/php/ext -I/Applications/MAMP/bin/php/php7.0.8/include/php/ext/date/lib -I/usr -I/Users/Sean/mongo-php-driver/src/BSON/ -I/Users/Sean/mongo-php-driver/src/MongoDB/ -I/Users/Sean/mongo-php-driver/src/MongoDB/Exception/ -I/Users/Sean/mongo-php-driver/src/contrib/ -I/Users/Sean/mongo-php-driver/src/libmongoc/src/mongoc/ -I/Users/Sean/mongo-php-driver/src/libbson/src/ -I/Users/Sean/mongo-php-driver/src/libbson/src/yajl/ -I/Users/Sean/mongo-php-driver/src/libbson/src/bson/ -I/usr/local/opt/openssl/include -g -O2 -D_THREAD_SAFE -pthread -c /Users/Sean/mongo-php-driver/src/libbson/src/yajl/yajl_encode.c -fno-common -DPIC -o src/libbson/src/yajl/.libs/yajl_encode.o

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            NaiXiaoXin SeanWang [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: