Error compiling Bitcoin Core on Centos 7.5 (with default gcc 4.8) #15172

issue martinbehrens opened this issue on January 15, 2019
  1. martinbehrens commented at 10:07 AM on January 15, 2019: none

    Description

    Compiling bitcoind (cf0c67b62c2037dc9e70ea84ffee3b205a9b1bef, master branch) fails with:

    /usr/include/c++/4.8.2/bits/stl_list.h:1149:9: note:   template argument deduction/substitution failed:
    rpc/server.cpp:54:122: note:   cannot convert ‘g_rpc_server_info.RPCServerInfo::active_commands.std::list<_Tp, _Alloc>::cend<RPCCommandExecutionInfo, std::allocator<RPCCommandExecutionInfo> >()’ (type ‘std::list<RPCCommandExecutionInfo>::const_iterator {aka std::_List_const_iterator<RPCCommandExecutionInfo>}’) to type ‘std::list<RPCCommandExecutionInfo>::iterator {aka std::_List_iterator<RPCCommandExecutionInfo>}’
             it = g_rpc_server_info.active_commands.insert(g_rpc_server_info.active_commands.cend(), {method, GetTimeMicros()});
    

    Steps to replicate

    Replicable on two different VM's:

    (- git checkout master)

    • git pull
    • make clean && ./autogen.sh && ./configure --disable-wallet --without-gui --with-zmq --enable-zmq && make

    Expected behavior

    Compilation should be successful.

    Current behavior

    Compilation was not successful.

    Bitcoin Core Version

    [user@localhost bitcoin]$ git branch
    * master
    [user@localhost bitcoin]$ git log
    commit cf0c67b62c2037dc9e70ea84ffee3b205a9b1bef
    
    

    Environment Info

    [user@localhost bitcoin]$ cat /etc/centos-release
    CentOS Linux release 7.5.1804 (Core)
    
    [user@localhost bitcoin]$ cat /proc/cpuinfo
    processor	: 0
    vendor_id	: GenuineIntel
    cpu family	: 6
    model		: 42
    model name	: Intel Xeon E312xx (Sandy Bridge)
    stepping	: 1
    microcode	: 0x1
    cpu MHz		: 3092.972
    cache size	: 16384 KB
    physical id	: 0
    siblings	: 1
    core id		: 0
    cpu cores	: 1
    apicid		: 0
    initial apicid	: 0
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 13
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt arat
    bogomips	: 6185.94
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 40 bits physical, 48 bits virtual
    power management:
    
    [user@localhost bitcoin]$ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
    Thread model: posix
    gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
    
  2. fanquake added the label Linux/Unix on Jan 15, 2019
  3. martinbehrens commented at 3:14 PM on January 15, 2019: none

    Note: Still reproducible at a5daf70ffb80c14ddf9f35c638d9e8087d8732e9 and eb2aecfb80662a91c649ea1455d9812ced05c323

  4. MarcoFalke added this to the milestone 0.18.0 on Jan 15, 2019
  5. MarcoFalke commented at 4:54 PM on January 15, 2019: member

    This could be the gcc version, unfortunately we don't test that Bitcoin Core still compiles with the minimum required (4.8)

  6. martinbehrens commented at 5:42 PM on January 15, 2019: none

    This could be the gcc version, unfortunately we don't test that Bitcoin Core still compiles with the minimum required (4.8)

    Confirmed.

    After upgrading gcc with ...

    yum install centos-release-scl
    yum install devtoolset-7-gcc*
    scl enable devtoolset-7 bash
    

    ... to v7.3.1 it does compile successfully.

  7. martinbehrens renamed this:
    Error compiling Bitcoin Core on Centos 7.5
    Error compiling Bitcoin Core on Centos 7.5 (with default gcc 4.8)
    on Jan 15, 2019
  8. dbolser commented at 11:27 AM on January 23, 2019: contributor

    I'm getting the same error on Linux Mint 17.3 Rosa

    $ gcc --version
    gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
    

    Which gives:

    /usr/include/c++/4.8/bits/stl_list.h:1149:9: note:   template argument deduction/substitution failed:
    rpc/server.cpp:54:122: note:   cannot convert ‘g_rpc_server_info.RPCServerInfo::active_commands.std::list<_Tp, _Alloc>::cend<RPCCommandExecutionInfo, std::allocator<RPCCommandExecutionInfo> >()’ (type ‘std::list<RPCCommandExecutionInfo>::const_iterator {aka std::_List_const_iterator<RPCCommandExecutionInfo>}’) to type ‘std::list<RPCCommandExecutionInfo>::iterator {aka std::_List_iterator<RPCCommandExecutionInfo>}’
             it = g_rpc_server_info.active_commands.insert(g_rpc_server_info.active_commands.cend(), {method, GetTimeMicros()});
                                                                                                                              ^
    make[2]: *** [rpc/libbitcoin_server_a-server.o] Error 1
    make[2]: Leaving directory `/home/dbolser/bitcoin/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/dbolser/bitcoin/src'
    make: *** [all-recursive] Error 1
    

    Just replying to help those googling.

  9. MarcoFalke commented at 12:55 AM on January 25, 2019: member

    I proposed a fix in #15248

  10. MarcoFalke closed this on Jan 28, 2019

  11. MarcoFalke referenced this in commit d6e700e40f on Jan 28, 2019
  12. MarcoFalke referenced this in commit bb36f5e24b on Jan 30, 2019
  13. Munkybooty referenced this in commit 598e03032f on Aug 21, 2021
  14. Munkybooty referenced this in commit ae815295fa on Aug 23, 2021
  15. Munkybooty referenced this in commit ade5fe3663 on Aug 24, 2021
  16. Munkybooty referenced this in commit e1aa2db883 on Aug 24, 2021
  17. Munkybooty referenced this in commit 2c50a7445e on Aug 24, 2021
  18. UdjinM6 referenced this in commit 51ebb81b76 on Aug 24, 2021
  19. Munkybooty referenced this in commit c2c6e65c5e on Aug 24, 2021
  20. MarcoFalke locked this on Dec 16, 2021
  21. Munkybooty referenced this in commit 841aba6b41 on Feb 3, 2022
  22. Munkybooty referenced this in commit c7fdafdc93 on Feb 4, 2022
  23. Munkybooty referenced this in commit 17a51c2da3 on Feb 24, 2022
  24. Munkybooty referenced this in commit 7159cce9ed on Mar 6, 2022
  25. Munkybooty referenced this in commit 3cd488afcb on Mar 8, 2022
  26. Munkybooty referenced this in commit 7788f0d9be on Mar 9, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me