[CDRIVER-494] Failure compiling latest c driver Created: 28/Dec/14  Updated: 03/May/17  Resolved: 25/Feb/15

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

Type: Bug Priority: Blocker - P1
Reporter: Ranjeet Kuruvilla [X] Assignee: Mira Carey
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 14.10


Issue Links:
Related
is related to CDRIVER-491 Build fails on OS X Yosemite 10.10.1 ... Closed

 Description   

Can not compile driver

> make
make[1]: Entering directory '/home/ranju/Downloads/mongo-c-driver'
CC src/mongoc/libmongoc_priv_la-mongoc-client.lo
src/mongoc/mongoc-client.c: In function 'mongoc_client_connect_tcp':
src/mongoc/mongoc-client.c:146:26: error: 'BSON_ERROR_BUFFER_SIZE' undeclared (first use in this function)
char errmsg_buf[BSON_ERROR_BUFFER_SIZE];
^
src/mongoc/mongoc-client.c:146:26: note: each undeclared identifier is reported only once for each function it appears in
src/mongoc/mongoc-client.c:146:15: warning: unused variable 'errmsg_buf' [-Wunused-variable]
char errmsg_buf[BSON_ERROR_BUFFER_SIZE];
^
Makefile:2547: recipe for target 'src/mongoc/libmongoc_priv_la-mongoc-client.lo' failed
make[1]: *** [src/mongoc/libmongoc_priv_la-mongoc-client.lo] Error 1
make[1]: Leaving directory '/home/ranju/Downloads/mongo-c-driver'
Makefile:3691: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
>



 Comments   
Comment by Mira Carey [ 25/Feb/15 ]

Ranjeet,

Are you still seeing this error with current master? That error you saw in the description for the ticket was a mismatch between the libbson version and libmongoc version, and the next error was a transient bug that only existed on master for a commit or two, so things may be resolved now.

Another suggestion would be to consider the last stable release of libmongoc, available at: https://github.com/mongodb/mongo-c-driver/releases/tag/1.1.0

Please re-open this if you find that you're still encountering errors, or if the release tarballs don't work for you.

Regards,
Jason

Comment by Ranjeet Kuruvilla [X] [ 29/Dec/14 ]

Hello
I was building from a new clonse, however I changed the constant with the value 32

This is the outcome
/usr/bin/ld:./build/autotools/versions.ldscript:239: syntax error in VERSION script
collect2: error: ld returned 1 exit status
Makefile:1655: recipe for target 'libmongoc-1.0.la' failed
make[1]: *** [libmongoc-1.0.la] Error 1
make[1]: Leaving directory '/home/ranju/Downloads/mongo-c-driver-affbaf7be2a48e66601f60e47e94950ae2263a93'
Makefile:3691: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Comment by Hannes Magnusson [ 29/Dec/14 ]

Are you building from an "old" git clone?
You need to update libbson too, see https://github.com/mongodb/mongo-c-driver/commit/affbaf7be2a48e66601f60e47e94950ae2263a93

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