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

issue martinbehrens openend 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:

    0/usr/include/c++/4.8.2/bits/stl_list.h:1149:9: note:   template argument deduction/substitution failed:
    1rpc/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>}
    2         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

    0[user@localhost bitcoin]$ git branch
    1* master
    2[user@localhost bitcoin]$ git log
    3commit cf0c67b62c2037dc9e70ea84ffee3b205a9b1bef
    

    Environment Info

    0[user@localhost bitcoin]$ cat /etc/centos-release
    1CentOS Linux release 7.5.1804 (Core)
    
     0[user@localhost bitcoin]$ cat /proc/cpuinfo
     1processor	: 0
     2vendor_id	: GenuineIntel
     3cpu family	: 6
     4model		: 42
     5model name	: Intel Xeon E312xx (Sandy Bridge)
     6stepping	: 1
     7microcode	: 0x1
     8cpu MHz		: 3092.972
     9cache size	: 16384 KB
    10physical id	: 0
    11siblings	: 1
    12core id		: 0
    13cpu cores	: 1
    14apicid		: 0
    15initial apicid	: 0
    16fpu		: yes
    17fpu_exception	: yes
    18cpuid level	: 13
    19wp		: yes
    20flags		: 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
    21bogomips	: 6185.94
    22clflush size	: 64
    23cache_alignment	: 64
    24address sizes	: 40 bits physical, 48 bits virtual
    25power management:
    
    0[user@localhost bitcoin]$ gcc -v
    1Using built-in specs.
    2COLLECT_GCC=gcc
    3COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
    4Target: x86_64-redhat-linux
    5Configured 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
    6Thread model: posix
    7gcc 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 …

    0yum install centos-release-scl
    1yum install devtoolset-7-gcc*
    2scl 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

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

    Which gives:

    0/usr/include/c++/4.8/bits/stl_list.h:1149:9: note:   template argument deduction/substitution failed:
    1rpc/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>}
    2         it = g_rpc_server_info.active_commands.insert(g_rpc_server_info.active_commands.cend(), {method, GetTimeMicros()});
    3                                                                                                                          ^
    4make[2]: *** [rpc/libbitcoin_server_a-server.o] Error 1
    5make[2]: Leaving directory `/home/dbolser/bitcoin/src'
    6make[1]: *** [all-recursive] Error 1
    7make[1]: Leaving directory `/home/dbolser/bitcoin/src'
    8make: *** [all-recursive] Error 1
    

    Just replying to help those googling.

  9. MarcoFalke commented at 0: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


martinbehrens MarcoFalke dbolser

Labels
Linux/Unix

Milestone
0.18.0


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: 2024-10-05 04:12 UTC

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