[SERVER-34026] compile mongo-r3.6.1 failed !!!!!!!! Created: 21/Mar/18  Updated: 06/Dec/22  Resolved: 22/Mar/18

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

Type: Bug Priority: Major - P3
Reporter: yxyxz123456 Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Triage
Operating System: ALL
Steps To Reproduce:

[root@master mongo-r3.6.1]# scons all
scons: Reading SConscript files ...
scons version: 3.0.1
python version: 2 7 5 'final' 0
Checking whether the C compiler works... (cached) yes
Checking whether the C++ compiler works... (cached) yes
Checking that the C++ compiler can link a C++ program... (cached) yes
Checking if C++ compiler "g++" is GCC... (cached) yes
Checking if C compiler "gcc" is GCC... (cached) yes
Detected a x86_64 processor
Checking if target OS linux is supported by the toolchain... (cached) yes
Checking if C compiler is GCC 5.3.0 or newer...(cached) yes
Checking if C++ compiler is GCC 5.3.0 or newer...(cached) yes
Checking if C compiler supports -Wno-unused-local-typedefs... (cached) yes
Checking if C compiler supports -Wno-unused-function... (cached) yes
Checking if C compiler supports -Wno-unused-private-field... (cached) no
Checking if C compiler supports -Wno-deprecated-declarations... (cached) yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... (cached) no
Checking if C compiler supports -Wno-unused-const-variable... (cached) yes
Checking if C compiler supports -Wno-unused-but-set-variable... (cached) yes
Checking if C compiler supports -Wno-missing-braces... (cached) yes
Checking if C compiler supports -Wno-inconsistent-missing-override... (cached) no
Checking if C compiler supports -Wno-potentially-evaluated-expression... (cached) no
Checking if C++ compiler supports -Wpessimizing-move... (cached) no
Checking if C++ compiler supports -Wredundant-move... (cached) no
Checking if C++ compiler supports -Wno-maybe-uninitialized... (cached) yes
Checking if C++ compiler supports -Wno-undefined-var-template... (cached) no
Checking if C++ compiler supports -Wno-instantiation-after-specialization... (cached) no
Checking if C compiler supports -Wno-unused-lambda-capture... (cached) no
Checking if C compiler supports -Wno-exceptions... (cached) no
Checking -Wnon-virtual-dtor for false positives... (cached) no
Checking if C compiler supports -fstack-protector-strong... (cached) yes
Checking if we are using libstdc++... (cached) yes
Checking if C++ compiler supports -std=c++14... (cached) yes
Checking if C compiler supports -std=c11... (cached) yes
Checking for C++14... (cached) yes
Checking for memset_s... (cached) no
Checking for C function strnlen()... (cached) yes
Checking for libstdc++ 5.3.0 or better... (cached) yes
Checking if we are on a POSIX system... (cached) yes
Checking if the POSIX monotonic clock is supported... (cached) yes
Checking off_t is 8 bytes... (cached) yes
Checking if linker supports -fuse-ld=gold... (cached) yes
Checking if linker supports Wl,-build-id... (cached) yes
Checking if linker supports Wl,-hash-style=gnu... (cached) yes
Checking if linker supports -Wl,-z,noexecstack... (cached) yes
Checking if linker supports Wl,-warn-execstack... (cached) yes
Checking if linker supports -Wl,-z,relro... (cached) yes
Checking for glibc with non-broken _FORTIFY_SOURCE...(cached) yes
Checking if C compiler supports -fno-builtin-memcmp... (cached) yes
Checking for storage class thread_local (cached) yes
Checking for C++14 std::enable_if_t support...(cached) yes
Checking for C++14 std::make_unique support... (cached) yes
Checking if pthread_setname_np is supported... (cached) yes
Checking for C library rt... (cached) yes
Checking for C library dl... (cached) yes
Checking for C++ header file execinfo.h... (cached) yes
Checking whether backtrace is declared... (cached) yes
Checking whether backtrace_symbols is declared... (cached) yes
Checking whether backtrace_symbols_fd is declared... (cached) yes
Checking for C library pcap... (cached) yes
Checking if std::atomic<int64_t> works... (cached) yes
Checking if std::atomic<uint64_t> works... (cached) yes
Checking if std::atomic<int32_t> works... (cached) yes
Checking if std::atomic<uint32_t> works... (cached) yes
Checking for extended alignment 64 for concurrency types... (cached) yes
Checking for mongoc_get_major_version() in C library mongoc-1.0... (cached) no

      • Run 'pip2 install --user regex' to speed up error code checking
        Checking if __malloc_hook is declared volatile... (cached) yes
        Checking for C function fallocate()... (cached) yes
        Checking for C function sync_file_range()... (cached) yes
        Checking for C header file x86intrin.h... (cached) yes
        scons: done reading SConscript files.
        scons: Building targets ...
        Compiling build/opt/mongo/util/signal_handlers.o
        /usr/bin/python2 buildscripts/idl/idlc.py --include src --base_dir build/opt --header build/opt/mongo/s/commands/cluster_multicast_gen.h --output build/opt/mongo/s/commands/cluster_multicast_gen.cpp src/mongo/s/commands/cluster_multicast.idl
        Compiling build/opt/mongo/s/commands/cluster_multicast_gen.o
        build/opt/mongo/s/commands/cluster_multicast_gen.cpp:102:1: internal compiler error: in schedule_generic_params_dies_gen, at dwarf2out.c:24142
        } // namespace mongo
        ^
        0x85eecc schedule_generic_params_dies_gen
        ../../gcc/dwarf2out.c:24142
        0x85eecc gen_struct_or_union_type_die
        ../../gcc/dwarf2out.c:22439
        0x85eecc gen_tagged_type_die
        ../../gcc/dwarf2out.c:22681
        0x84d7d8 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:22846
        0x84ddf6 gen_type_die
        ../../gcc/dwarf2out.c:22901
        0x852875 declare_in_namespace
        ../../gcc/dwarf2out.c:23305
        0x85e15b gen_tagged_type_die
        ../../gcc/dwarf2out.c:22669
        0x84d7d8 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:22846
        0x84ddf6 gen_type_die
        ../../gcc/dwarf2out.c:22901
        0x853178 modified_type_die
        ../../gcc/dwarf2out.c:11457
        0x854acb add_type_attribute
        ../../gcc/dwarf2out.c:19032
        0x85f222 gen_typedef_die
        ../../gcc/dwarf2out.c:22601
        0x851394 gen_decl_die
        ../../gcc/dwarf2out.c:23496
        0x85e9c3 gen_member_die
        ../../gcc/dwarf2out.c:22372
        0x85e9c3 gen_struct_or_union_type_die
        ../../gcc/dwarf2out.c:22478
        0x85e9c3 gen_tagged_type_die
        ../../gcc/dwarf2out.c:22681
        0x84d7d8 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:22846
        0x84ddf6 gen_type_die
        ../../gcc/dwarf2out.c:22901
        0x86077c retry_incomplete_types
        ../../gcc/dwarf2out.c:19408
        0x86077c dwarf2out_finish
        ../../gcc/dwarf2out.c:27387
        Please submit a full bug report,
        with preprocessed source if appropriate.
        Please include the complete backtrace with any bug report.
        See <http://gcc.gnu.org/bugs.html> for instructions.
        scons: *** [build/opt/mongo/s/commands/cluster_multicast_gen.o] Error 1
        scons: building terminated because of errors.
        build/opt/mongo/s/commands/cluster_multicast_gen.o failed: Error 1
        [root@master mongo-r3.6.1]#
Participants:

 Description   

[root@master mongo-r3.6.1]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc6/libexec/gcc/x86_64-pc-linux-gnu/6.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/usr/local/gcc6 --enable-checking=release --enable-languages=c,c++ --enable-threads=posix --disable-multilib
Thread model: posix
gcc version 6.2.0 (GCC)
[root@master mongo-r3.6.1]#
[root@master mongo-r3.6.1]#
[root@master mongo-r3.6.1]#

[root@master mongo-r3.6.1]# scons all
scons: Reading SConscript files ...
scons version: 3.0.1
python version: 2 7 5 'final' 0
Checking whether the C compiler works... (cached) yes
Checking whether the C++ compiler works... (cached) yes
Checking that the C++ compiler can link a C++ program... (cached) yes
Checking if C++ compiler "g++" is GCC... (cached) yes
Checking if C compiler "gcc" is GCC... (cached) yes
Detected a x86_64 processor
Checking if target OS linux is supported by the toolchain... (cached) yes
Checking if C compiler is GCC 5.3.0 or newer...(cached) yes
Checking if C++ compiler is GCC 5.3.0 or newer...(cached) yes
Checking if C compiler supports -Wno-unused-local-typedefs... (cached) yes
Checking if C compiler supports -Wno-unused-function... (cached) yes
Checking if C compiler supports -Wno-unused-private-field... (cached) no
Checking if C compiler supports -Wno-deprecated-declarations... (cached) yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... (cached) no
Checking if C compiler supports -Wno-unused-const-variable... (cached) yes
Checking if C compiler supports -Wno-unused-but-set-variable... (cached) yes
Checking if C compiler supports -Wno-missing-braces... (cached) yes
Checking if C compiler supports -Wno-inconsistent-missing-override... (cached) no
Checking if C compiler supports -Wno-potentially-evaluated-expression... (cached) no
Checking if C++ compiler supports -Wpessimizing-move... (cached) no
Checking if C++ compiler supports -Wredundant-move... (cached) no
Checking if C++ compiler supports -Wno-maybe-uninitialized... (cached) yes
Checking if C++ compiler supports -Wno-undefined-var-template... (cached) no
Checking if C++ compiler supports -Wno-instantiation-after-specialization... (cached) no
Checking if C compiler supports -Wno-unused-lambda-capture... (cached) no
Checking if C compiler supports -Wno-exceptions... (cached) no
Checking -Wnon-virtual-dtor for false positives... (cached) no
Checking if C compiler supports -fstack-protector-strong... (cached) yes
Checking if we are using libstdc++... (cached) yes
Checking if C++ compiler supports -std=c++14... (cached) yes
Checking if C compiler supports -std=c11... (cached) yes
Checking for C++14... (cached) yes
Checking for memset_s... (cached) no
Checking for C function strnlen()... (cached) yes
Checking for libstdc++ 5.3.0 or better... (cached) yes
Checking if we are on a POSIX system... (cached) yes
Checking if the POSIX monotonic clock is supported... (cached) yes
Checking off_t is 8 bytes... (cached) yes
Checking if linker supports -fuse-ld=gold... (cached) yes
Checking if linker supports Wl,-build-id... (cached) yes
Checking if linker supports Wl,-hash-style=gnu... (cached) yes
Checking if linker supports -Wl,-z,noexecstack... (cached) yes
Checking if linker supports Wl,-warn-execstack... (cached) yes
Checking if linker supports -Wl,-z,relro... (cached) yes
Checking for glibc with non-broken _FORTIFY_SOURCE...(cached) yes
Checking if C compiler supports -fno-builtin-memcmp... (cached) yes
Checking for storage class thread_local (cached) yes
Checking for C++14 std::enable_if_t support...(cached) yes
Checking for C++14 std::make_unique support... (cached) yes
Checking if pthread_setname_np is supported... (cached) yes
Checking for C library rt... (cached) yes
Checking for C library dl... (cached) yes
Checking for C++ header file execinfo.h... (cached) yes
Checking whether backtrace is declared... (cached) yes
Checking whether backtrace_symbols is declared... (cached) yes
Checking whether backtrace_symbols_fd is declared... (cached) yes
Checking for C library pcap... (cached) yes
Checking if std::atomic<int64_t> works... (cached) yes
Checking if std::atomic<uint64_t> works... (cached) yes
Checking if std::atomic<int32_t> works... (cached) yes
Checking if std::atomic<uint32_t> works... (cached) yes
Checking for extended alignment 64 for concurrency types... (cached) yes
Checking for mongoc_get_major_version() in C library mongoc-1.0... (cached) no

      • Run 'pip2 install --user regex' to speed up error code checking
        Checking if __malloc_hook is declared volatile... (cached) yes
        Checking for C function fallocate()... (cached) yes
        Checking for C function sync_file_range()... (cached) yes
        Checking for C header file x86intrin.h... (cached) yes
        scons: done reading SConscript files.
        scons: Building targets ...
        Compiling build/opt/mongo/util/signal_handlers.o
        /usr/bin/python2 buildscripts/idl/idlc.py --include src --base_dir build/opt --header build/opt/mongo/s/commands/cluster_multicast_gen.h --output build/opt/mongo/s/commands/cluster_multicast_gen.cpp src/mongo/s/commands/cluster_multicast.idl
        Compiling build/opt/mongo/s/commands/cluster_multicast_gen.o
        build/opt/mongo/s/commands/cluster_multicast_gen.cpp:102:1: internal compiler error: in schedule_generic_params_dies_gen, at dwarf2out.c:24142
        } // namespace mongo
        ^
        0x85eecc schedule_generic_params_dies_gen
        ../../gcc/dwarf2out.c:24142
        0x85eecc gen_struct_or_union_type_die
        ../../gcc/dwarf2out.c:22439
        0x85eecc gen_tagged_type_die
        ../../gcc/dwarf2out.c:22681
        0x84d7d8 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:22846
        0x84ddf6 gen_type_die
        ../../gcc/dwarf2out.c:22901
        0x852875 declare_in_namespace
        ../../gcc/dwarf2out.c:23305
        0x85e15b gen_tagged_type_die
        ../../gcc/dwarf2out.c:22669
        0x84d7d8 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:22846
        0x84ddf6 gen_type_die
        ../../gcc/dwarf2out.c:22901
        0x853178 modified_type_die
        ../../gcc/dwarf2out.c:11457
        0x854acb add_type_attribute
        ../../gcc/dwarf2out.c:19032
        0x85f222 gen_typedef_die
        ../../gcc/dwarf2out.c:22601
        0x851394 gen_decl_die
        ../../gcc/dwarf2out.c:23496
        0x85e9c3 gen_member_die
        ../../gcc/dwarf2out.c:22372
        0x85e9c3 gen_struct_or_union_type_die
        ../../gcc/dwarf2out.c:22478
        0x85e9c3 gen_tagged_type_die
        ../../gcc/dwarf2out.c:22681
        0x84d7d8 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:22846
        0x84ddf6 gen_type_die
        ../../gcc/dwarf2out.c:22901
        0x86077c retry_incomplete_types
        ../../gcc/dwarf2out.c:19408
        0x86077c dwarf2out_finish
        ../../gcc/dwarf2out.c:27387
        Please submit a full bug report,
        with preprocessed source if appropriate.
        Please include the complete backtrace with any bug report.
        See <http://gcc.gnu.org/bugs.html> for instructions.
        scons: *** [build/opt/mongo/s/commands/cluster_multicast_gen.o] Error 1
        scons: building terminated because of errors.
        build/opt/mongo/s/commands/cluster_multicast_gen.o failed: Error 1
        [root@master mongo-r3.6.1]#


 Comments   
Comment by yxyxz123456 [ 22/Mar/18 ]

@Andrew Morrow
thanks for you reply. when I use gcc-5.4, successful, thanks again.

Comment by Andrew Morrow (Inactive) [ 21/Mar/18 ]

Your compiler crashed, apparently while generating debug info. Can you try a different compiler like clang, or try to upgrade your compiler to a newer version? Also, you can download our pre-built binaries of mongodb community from https://www.mongodb.com/download-center#community, in which case you don't need to compile from source at all.

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