[SERVER-14754] Squelch GCC 4.9.1 warnings and linker error Created: 31/Jul/14 Updated: 06/Oct/14 Resolved: 11/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 2.7.4 |
| Fix Version/s: | 2.7.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Geert Bosch | Assignee: | Geert Bosch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | On Ubuntu 14.04, install GCC 4.9.1 and run "scons all". |
| Participants: |
| Description |
|
GCC 4.9.1 generates the warnings included below, as well as a linker error due to a (unneeded) desctructor. I have a patch that fixes this by initializing some out parameters even in case of an error, and by removing the unneeded destructor. Will submit for code review. g++ -o build/linux2/normal/mongo/db/commands/index_filter_commands.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/boost -Isrc/third_party/s2 -Isrc/third_party/pcre-8.30 -Ibuild/linux2/normal -Isrc -Isrc/third_party/snappy src/mongo/db/commands/index_filter_commands.cpp |
| Comments |
| Comment by Geert Bosch [ 11/Aug/14 ] |
|
This allows MongoDB to be built with the newest GCC compilers, no change otherwise. |
| Comment by Githook User [ 01/Aug/14 ] |
|
Author: {u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert.bosch@mongodb.com'}Message: |
| Comment by Geert Bosch [ 31/Jul/14 ] |
|
build/linux2/normal/mongo/db/repl/repl_coordinator_impl.o: In function `mongo::repl::TopologyCoordinatorImpl::~TopologyCoordinatorImpl()': I thought I had included this... apparently not. |
| Comment by Eric Milkie [ 31/Jul/14 ] |
|
What is the linker error? |