[CDRIVER-1214] Error building with 1.3 Driver on Ubuntu 14.04 Created: 29/Apr/16  Updated: 11/Sep/19  Resolved: 29/Apr/16

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

Type: Task Priority: Major - P3
Reporter: John Page Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-439 libbson and libmongoc should compile ... Closed

 Description   

Hi,
I'm getting the following issue with the 1.3 driver on ubuntu 1.4. Any suggestions?

 
gcc -c -o main.o main.c -I. -I /usr/local/include/libbson-1.0 -I /usr/local/include/libmongoc-1.0 -O2 --std=c99 -D_XOPEN_SOURCE -D_GNU_SOURCE
In file included from /usr/local/include/libbson-1.0/bson-compat.h:38:0,
                 from /usr/local/include/libbson-1.0/bson.h:23,
                 from /usr/local/include/libmongoc-1.0/mongoc.h:22,
                 from main.c:11:
/usr/local/include/libbson-1.0/bson-macros.h:212:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__inline__’
#  define BSON_INLINE __inline__
                       ^
/usr/local/include/libbson-1.0/bson-decimal128.h:61:20: note: in expansion of macro ‘BSON_INLINE’
static _Decimal128 BSON_INLINE
                    ^
In file included from /usr/local/include/libbson-1.0/bson.h:33:0,
                 from /usr/local/include/libmongoc-1.0/mongoc.h:22,
                 from main.c:11:
/usr/local/include/libbson-1.0/bson-decimal128.h:71:32: error: unknown type name ‘_Decimal128’
bson_Decimal128_to_decimal128 (_Decimal128        decimal128,



 Comments   
Comment by Hannes Magnusson [ 29/Apr/16 ]

Well. For one, _Decimal128 isn't available in c99 so thats not going to work
We've got plenty of build failure with -std=c99

Comment by Hannes Magnusson [ 29/Apr/16 ]

You are not using libbson 1.3, this is libbson from master.

I does appear the order there is a bit dubious

Comment by A. Jesse Jiryu Davis [ 29/Apr/16 ]

Hannes, did our Decimal 128 support code break C99 compatibility?

Comment by John Page [ 29/Apr/16 ]

My Error -c99 no longer needed.

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