[SERVER-24566] Debug build fails in configure Created: 14/Jun/16  Updated: 13/Aug/16  Resolved: 22/Jul/16

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

Type: Bug Priority: Major - P3
Reporter: Susan LoVerso Assignee: Waley Chen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-24599 compiling with opt off should turn of... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

My build command:

python27 scons --wiredtiger --dbg=on -j 24 core

The error:

Checking for C library wpcap... no
Checking if std::atomic<int64_t> works... no
Checking for C library atomic... yes
Checking if std::atomic<int64_t> works with libatomic... no
The toolchain does not support std::atomic, cannot continue
See /mnt/fast/sue/work/mongo/build/scons/config.log for details

And the details from config.log:

scons: Configure: Checking if std::atomic<int64_t> works with libatomic...
build/scons/sconf_temp/conftest_53.cpp <-
  |
  |#include <atomic>
  |
  |int main() {
  |    std::atomic<int64_t> x;
  |
  |    x.store(0);
  |    int64_t y = 1;
  |    x.fetch_add(y);
  |    x.fetch_sub(y);
  |    x.exchange(y);
  |    x.compare_exchange_strong(y, x);
  |    return x.load();
  |}
  |
Compiling build/scons/sconf_temp/conftest_53.o
In file included from /opt/mongodbtoolchain/v2/include/c++/5.3.0/x86_64-mongodb-linux/bits/os_defines.h:39:0,
                 from /opt/mongodbtoolchain/v2/include/c++/5.3.0/x86_64-mongodb-linux/bits/c++config.h:482,
                 from /opt/mongodbtoolchain/v2/include/c++/5.3.0/bits/atomic_base.h:35,
                 from /opt/mongodbtoolchain/v2/include/c++/5.3.0/atomic:41,
                 from build/scons/sconf_temp/conftest_53.cpp:2:
/usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^
cc1plus: all warnings being treated as errors
scons: Configure: no

Sprint: Platforms 18 (08/05/16)
Participants:

 Description   

When attempting to build a debug version with --dbg=on from master, it fails in configure. mark.benvenuto gave me a workaround, adding --dbg=on --runtime-hardening=off makes it work and complete.

I'm building on AWS linux. Mark saw it using GCC 5.3 on master as well.



 Comments   
Comment by Githook User [ 22/Jul/16 ]

Author:

{u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}

Message: SERVER-24566 Debug build fails in configure
Branch: master
https://github.com/mongodb/mongo/commit/9a8cc7728527c33bb6d0ecdddd0952ce22b61d2a

Comment by Andrew Morrow (Inactive) [ 14/Jun/16 ]

Interesting. It looks like we will need to add a conditional to disable fortify if we are not doing an opt build.

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