[SERVER-28063] GCC 6.3 compiling issues Created: 18/Feb/17  Updated: 23/Feb/17  Resolved: 22/Feb/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Victor Lav Assignee: Mark Benvenuto
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23420 Remove use of GNU extensions in parse... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

I'm trying to compile mongodb 3.4.2 with GCC 6.3 for ARM 64bit.
Linux jessie64 3.14.79+ #1 SMP PREEMPT Tue Feb 7 10:57:43 UTC 2017 aarch64 GNU/Linux

Compiling build/opt/mongo/base/parse_number_test.o
In file included from src/mongo/base/parse_number_test.cpp:37:0:
src/mongo/base/parse_number_test.cpp:295:49: error: exponent has no digits
     ASSERT_PARSES(double, "0xabcab.defdefP-10", 0xabcab.defdefP-10);
                                                 ^
src/mongo/unittest/unittest.h:106:93: note: in definition of macro '_ASSERT_COMPARISON'
     ::mongo::unittest::ComparisonAssertion_##COMPARISON(__FILE__, __LINE__, #a, #b, a, b)) \
                                                                                     ^
src/mongo/unittest/unittest.h:85:29: note: in expansion of macro 'ASSERT_EQ'
 #define ASSERT_EQUALS(a, b) ASSERT_EQ(a, b)
                             ^~~~~~~~~
src/mongo/base/parse_number_test.cpp:44:9: note: in expansion of macro 'ASSERT_EQUALS'
         ASSERT_EQUALS(static_cast<TYPE>(EXPECTED_VALUE), v); \
         ^~~~~~~~~~~~~
src/mongo/base/parse_number_test.cpp:295:5: note: in expansion of macro 'ASSERT_PARSES'
     ASSERT_PARSES(double, "0xabcab.defdefP-10", 0xabcab.defdefP-10);
     ^~~~~~~~~~~~~
scons: *** [build/opt/mongo/base/parse_number_test.o] Error 1
scons: building terminated because of errors.
build/opt/mongo/base/parse_number_test.o failed: Error 1



 Comments   
Comment by Mark Benvenuto [ 22/Feb/17 ]

The parse_number_test.cpp in MongoDB 3.4 file relies on a Gnu C++ extension for hexadecimal floating point numbers. With a change in in GCC 6.x to tighten C++ compliance, parse_number_test.cpp no longer compiles because MongoDB sets --std=c++11 in GCC. This has been fixed in master with https://github.com/mongodb/mongo/commit/86e6d8415f250e8b9806482d880e315283c6041b.

Generated at Thu Feb 08 04:17:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.