[CDRIVER-491] Build fails on OS X Yosemite 10.10.1 - if libbson is not installed Created: 23/Dec/14  Updated: 29/Dec/14  Resolved: 23/Dec/14

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Tyler Brock
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X Yosemite 10.10.1


Issue Links:
Related
related to CDRIVER-494 Failure compiling latest c driver Closed

 Description   

Build of C-driver failed with the following steps on Mac OS X Yosemite (10.10.1)

git clone git@github.com:mongodb/mongo-c-driver.git
cd mongo-c-driver/
./autogen.sh
make

Output from autogen:

...
libmongoc was configured with the following options:
 
Build configuration:
  Enable debugging (slow)                          : no
  Compile with debug symbols (slow)                : no
  Enable GCC build optimization                    : yes
  Enable automatic binary hardening                : yes
  Code coverage support                            : no
  Cross Compiling                                  : no
  Fast counters                                    : no
  SASL                                             : sasl2
  SSL                                              : yes
  Libbson                                          : bundled
 
Documentation:
  man                                              : no
  HTML                                             : no

Output from make:

...
  CC       src/mongoc/libmongoc_priv_la-mongoc-client.lo
src/mongoc/mongoc-client.c:146:26: error: use of undeclared identifier
      'BSON_ERROR_BUFFER_SIZE'
         char errmsg_buf[BSON_ERROR_BUFFER_SIZE];
                         ^
1 error generated.
make[1]: *** [src/mongoc/libmongoc_priv_la-mongoc-client.lo] Error 1
make: *** [all-recursive] Error 1



 Comments   
Comment by Tyler Brock [ 23/Dec/14 ]

This was fixed: https://github.com/mongodb/mongo-c-driver/commit/22878713b09e536a2e1c8ac79ccfa4b10abc919b

Started independently working on this before i saw the ticket so it wasn't prefixed with CDRIVER.

Comment by Jonathan Abrahams [ 23/Dec/14 ]

If libbson is installed from source, then the make will work.

Comment by Samantha Ritter (Inactive) [ 23/Dec/14 ]

As a workaround you can install libbson master from source, then when you build the c driver it should skip the bundling step: https://github.com/mongodb/libbson

Comment by Samantha Ritter (Inactive) [ 23/Dec/14 ]

It will build libbson automatically if you don't have it installed, but I suspect we are bundling in the wrong version of libbson. Because of a recent change (this commit: https://github.com/mongodb/mongo-c-driver/commit/affbaf7be2a48e66601f60e47e94950ae2263a93) the c driver now require this diff of libbson: https://github.com/mongodb/libbson/commit/5366a986bf9e16a3b1e347487ecbf2d882f5b8b4

Comment by Jonathan Abrahams [ 23/Dec/14 ]

I do not have libbson installed. Is this a prerequisite, or will it also build from this package? The README states

mongo-c-driver contains a copy of libbson in the case that your system does not already have libbson installed. The configure script will detect if libbson is not installed and install it too.

Comment by Samantha Ritter (Inactive) [ 23/Dec/14 ]

jonathan.abrahams what version of libbson are you using?

Generated at Wed Feb 07 21:09:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.