[CXX-1097] Compiling driver on rhel 7 with Oracle Solaris studio 12.5 Created: 20/Oct/16 Updated: 11/Sep/19 Resolved: 20/Oct/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build |
| Affects Version/s: | 3.0.2 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial - P5 |
| Reporter: | Alex Vilensky | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux Redhat 7 |
||
| Description |
|
I was wondering if you ever attempted to compile your C+11 driver with Oracle Solaris studio v12.5 on RedHat 7. I had no problems building libbson and the C driver, but for some reason the compiler choked on the C+ driver. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 20/Oct/16 ] | |||||||||
|
nistar - OK, I'm going to close this issue. Hopefully Oracle will bring their toolchain up to spec! | |||||||||
| Comment by Alex Vilensky [ 20/Oct/16 ] | |||||||||
|
Just opened a ticket with Oracle. Thank you for your help. | |||||||||
| Comment by Andrew Morrow (Inactive) [ 20/Oct/16 ] | |||||||||
|
I'd report it to your vendor then. Since we don't have access to this compiler it is unlikely that we will be able to help find a workaround. | |||||||||
| Comment by Alex Vilensky [ 20/Oct/16 ] | |||||||||
|
CC -std=c++11 -g -o static_assert static_assert.cpp It seems to me the compiler is not standards compliant. | |||||||||
| Comment by Andrew Morrow (Inactive) [ 20/Oct/16 ] | |||||||||
|
Tracing this through, it appears that the static assertion on line 38 of value.cpp is firing for the b_double type:
This is pretty strange, as b_double::value is a typedef for double. What happens if you compile the following program with your compiler:
Does that compile for you? | |||||||||
| Comment by Alex Vilensky [ 20/Oct/16 ] | |||||||||
|
[ 3%] Building CXX object src/bsoncxx/CMakeFiles/bsoncxx.dir/types/value.cpp.o | |||||||||
| Comment by Andrew Morrow (Inactive) [ 20/Oct/16 ] | |||||||||
|
Those first issues are with libbson, so I recommend that you open a ticket in the CDRIVER project. For the second issue, I'll need more. Does it give you an include stack or some other context? We need to know which expansion of the BSONCXX_ENUM is causing this (it is an X macros style mechanism). What .cpp file was being compiled? | |||||||||
| Comment by Alex Vilensky [ 20/Oct/16 ] | |||||||||
|
Hi Andrew, the first error I got was caused by a missing #define in bson-atomic.h on line 97. I had to change
| |||||||||
| Comment by Andrew Morrow (Inactive) [ 20/Oct/16 ] | |||||||||
|
Can you provide the error it emitted? As far as I know, we have never tried to use that compiler. |