Unknown type name lcb_U64

I am trying to build the php sdk on a detain 8 x64 image. Using both pecl install couchbase and the 2.0.0 version on github (phpize; make && make install). In both ways, I get the following errors:

In file included from /php-couchbase-master/bucket.c:9:0:
/php-couchbase-master/metadoc.h:15:34: error: unknown type name 'lcb_U64'
 int metadoc_from_long(zval *doc, lcb_U64 value,
                                  ^
/php-couchbase-master/bucket.c: In function 'zim_Bucket___construct':
/php-couchbase-master/bucket.c:316:19: error: 'union <anonymous>' has no member named 'v3'
   create_options.v.v3.connstr = dsn;
                   ^
/php-couchbase-master/bucket.c:317:19: error: 'union <anonymous>' has no member named 'v3'
   create_options.v.v3.username = name;
                   ^
/php-couchbase-master/bucket.c:318:19: error: 'union <anonymous>' has no member named 'v3'
   create_options.v.v3.passwd = password;
                   ^
/php-couchbase-master/bucket.c:319:19: error: 'union <anonymous>' has no member named 'v3'
   create_options.v.v3.type = LCB_TYPE_BUCKET;
                   ^
/php-couchbase-master/bucket.c: In function 'zim_Bucket_http_request':
/php-couchbase-master/bucket.c:1036:13: error: 'LCB_HTTP_TYPE_N1QL' undeclared (first use in this function)
      type = LCB_HTTP_TYPE_N1QL;
             ^
/php-couchbase-master/bucket.c:1036:13: note: each undeclared identifier is reported only once for each function it appears in
/php-couchbase-master/bucket.c: In function 'zim_Bucket_durability':
/php-couchbase-master/bucket.c:1121:28: error: 'lcb_U16' undeclared (first use in this function)
    opts.v.v0.persist_to = (lcb_U16)Z_LVAL_P(zpersist);
                            ^
Makefile:181: recipe for target 'bucket.lo' failed
make: *** [bucket.lo] Error 1

I can’t make sense of any of this, and would really appreciate some guidance.

Thanks!