Can’t compile bitcoin for SmartOS - recipe for target ‘consensus/libbitcoinconsensus_la-merkle.lo’ failed #13576

issue stacepellegrino openend this issue on June 30, 2018
  1. stacepellegrino commented at 9:50 am on June 30, 2018: none

    I am trying to compile the latest bitcoin source from GitHub on the latest SmartOS and do not know how to solve the following compile error…

     0/opt/local/src/bitcoin]# uname -a
     1SunOS a36dbe40-5628-e6ea-f7b8-8d89982fe9bf 5.11 joyent_20180525T172343Z i86pc i386 i86pc Solaris
     2
     3/opt/local/src/bitcoin]# gcc -v
     4Using built-in specs.
     5COLLECT_GCC=/opt/local/gcc49/bin/gcc
     6COLLECT_LTO_WRAPPER=/opt/local/gcc49/libexec/gcc/x86_64-sun-solaris2.11/4.9.3/lto-wrapper
     7Target: x86_64-sun-solaris2.11
     8Configured with: ../gcc-4.9.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --with-gxx-include-dir=/opt/local/gcc49/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc49 --build=x86_64-sun-solaris2.11 --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc49/info --mandir=/opt/local/gcc49/man
     9Thread model: posix
    10gcc version 4.9.3 (GCC)
    11
    12/opt/local/src/bitcoin]# ./configure --with-gui=no --disable-tests --enable-cxx --disable-shared --with-pic --prefix=/usr/local --with-incompatible-bdb --target=x86_64-sun-solaris2.11
    13...
    14Options used to compile and link:
    15  with wallet   = yes
    16  with gui / qt = no
    17  with zmq      = no
    18  with test     = no
    19  with bench    = yes
    20  with upnp     = auto
    21  use asm       = yes
    22  sanitizers    = 
    23  debug enabled = no
    24  gprof enabled = no
    25  werror        = no
    26
    27  target os     = 
    28  build os      = 
    29
    30  CC            = gcc
    31  CFLAGS        = -g -O2
    32  CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
    33  CXX           = g++ -std=c++11
    34  CXXFLAGS      =   -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla  -Wno-unused-parameter   -g -O2
    35  LDFLAGS       = -D_POSIX_PTHREAD_SEMANTICS -pthread  -Wl,-z,now -pie  
    36  ARFLAGS       = cr
    37
    38
    39/opt/local/src/bitcoin]# make
    40Making all in src
    41make[1]: Entering directory '/opt/local/src/bitcoin/src'
    42make[2]: Entering directory '/opt/local/src/bitcoin/src'
    43make[3]: Entering directory '/opt/local/src/bitcoin'
    44make[3]: Leaving directory '/opt/local/src/bitcoin'
    45  CXX      crypto/libbitcoinconsensus_la-aes.lo
    46  CXX      crypto/libbitcoinconsensus_la-chacha20.lo
    47  CXX      crypto/libbitcoinconsensus_la-hmac_sha256.lo
    48  CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
    49  CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
    50  CXX      crypto/libbitcoinconsensus_la-sha1.lo
    51  CXX      crypto/libbitcoinconsensus_la-sha256.lo
    52  CXX      crypto/libbitcoinconsensus_la-sha512.lo
    53  CXX      crypto/libbitcoinconsensus_la-sha256_sse4.lo
    54  CXX      libbitcoinconsensus_la-arith_uint256.lo
    55  CXX      consensus/libbitcoinconsensus_la-merkle.lo
    56In file included from ./script/script.h:11:0,
    57                 from ./primitives/transaction.h:11,
    58                 from ./consensus/merkle.h:11,
    59                 from consensus/merkle.cpp:5:
    60./serialize.h:193:39: error: redefinition of 'template<class Stream> void Serialize(Stream&, int8_t)'
    61 template<typename Stream> inline void Serialize(Stream& s, int8_t a  ) { ser_wr
    62                                       ^
    63./serialize.h:192:39: note: 'template<class Stream> void Serialize(Stream&, char)' previously declared here
    64 template<typename Stream> inline void Serialize(Stream& s, char a    ) { ser_wr
    65                                       ^
    66In file included from ./script/script.h:11:0,
    67                 from ./primitives/transaction.h:11,
    68                 from ./consensus/merkle.h:11,
    69                 from consensus/merkle.cpp:5:
    70./serialize.h:209:39: error: redefinition of 'template<class Stream> void Unserialize(Stream&, int8_t&)'
    71 template<typename Stream> inline void Unserialize(Stream& s, int8_t& a  ) { a =
    72                                       ^
    73./serialize.h:208:39: note: 'template<class Stream> void Unserialize(Stream&, char&)' previously declared here
    74 template<typename Stream> inline void Unserialize(Stream& s, char& a    ) { a =
    75                                       ^
    76Makefile:8138: recipe for target 'consensus/libbitcoinconsensus_la-merkle.lo' failed
    77make[2]: *** [consensus/libbitcoinconsensus_la-merkle.lo] Error 1
    78make[2]: Leaving directory '/opt/local/src/bitcoin/src'
    79Makefile:9824: recipe for target 'all-recursive' failed
    80make[1]: *** [all-recursive] Error 1
    81make[1]: Leaving directory '/opt/local/src/bitcoin/src'
    82Makefile:756: recipe for target 'all-recursive' failed
    83make: *** [all-recursive] Error 1
    
  2. sipa commented at 5:51 pm on June 30, 2018: member
    It looks like int8_t and char are the same type on your system, while the code assumes they’re different. I’m not sure how we should deal with that.
  3. fanquake added the label Linux/Unix on Jul 1, 2018
  4. MarcoFalke added the label Build system on Jul 1, 2018
  5. stacepellegrino commented at 1:25 pm on July 1, 2018: none
    Is this a compiler issue and would recompiling a later version of g++ get over the issue? Which version do you recommend to get over this issue?
  6. stacepellegrino closed this on Jul 1, 2018

  7. Empact commented at 2:36 am on July 2, 2018: member
    @stacepellegrino could you re-open this? We can close it when a fix is merged.
  8. stacepellegrino reopened this on Jul 2, 2018

  9. stacepellegrino commented at 5:44 am on July 2, 2018: none
    Reopened till the fix is merged.
  10. stacepellegrino commented at 5:46 am on July 2, 2018: none
    Reopened until fix is merged.
  11. laanwj closed this on Jul 5, 2018

  12. laanwj referenced this in commit 40334c71d6 on Jul 5, 2018
  13. askari01 commented at 7:31 am on July 16, 2018: none
    still not fixed
  14. Empact commented at 2:01 pm on July 16, 2018: member
    @askari01 can you elaborate on what you’re seeing / post your build error output? The fix for this error is in master, so if you are building master I suspect you are seeing something different.
  15. askari01 commented at 6:43 am on July 17, 2018: none

    Making all in src make[1]: Entering directory ‘/home/syedaskari/Downloads/bitcoin/src’ make[2]: Entering directory ‘/home/syedaskari/Downloads/bitcoin/src’ make[3]: Entering directory ‘/home/syedaskari/Downloads/bitcoin’ make[3]: Leaving directory ‘/home/syedaskari/Downloads/bitcoin’ CXXLD libbitcoinconsensus.la crypto/.libs/libbitcoinconsensus_la-aes.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:3727: recipe for target ’libbitcoinconsensus.la’ failed make[2]: *** [libbitcoinconsensus.la] Error 1 make[2]: Leaving directory ‘/home/syedaskari/Downloads/bitcoin/src’ Makefile:9960: recipe for target ‘all-recursive’ failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory ‘/home/syedaskari/Downloads/bitcoin/src’ Makefile:776: recipe for target ‘all-recursive’ failed make: *** [all-recursive] Error 1

  16. MarcoFalke commented at 12:51 pm on July 17, 2018: member
    What is the output of git log -1 and does make disclean && ./autogen.sh && ./configure && make work?
  17. askari01 commented at 1:12 pm on July 17, 2018: none

    output from git log -1:

    commit 8803c9132a78d8182bd828a29f7051fc7688f934 (HEAD -> master, origin/master, origin/HEAD) Merge: b25a4c228 38040c34e Author: MarcoFalke falke.marco@gmail.com Date: Sat Jul 14 13:08:26 2018 -0400

    Merge [#13138](/bitcoin-bitcoin/13138/): [tests] Remove accounts from wallet_importprunedfunds.py
    
    38040c34e1 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)
    
    Pull request description:
    
      This was split from [#13075](/bitcoin-bitcoin/13075/) to not block review/merge of that PR.
    
    Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
    

    make disclean && ./autogen.sh && ./configure && make

    make:


    No rule to make target ‘disclean’.

    Stop.

  18. MarcoFalke commented at 7:06 pm on July 17, 2018: member
    @askari01 Could you please create a fresh issue with your problems and include all steps to reproduce from a fresh clone in a fresh folder? (Don’t forget to include the config.log file after ./configure)
  19. PastaPastaPasta referenced this in commit da9156f1a8 on Jul 7, 2020
  20. PastaPastaPasta referenced this in commit f350352a12 on Jul 7, 2020
  21. PastaPastaPasta referenced this in commit 06a1e20d8a on Jul 8, 2020
  22. gades referenced this in commit d29ea73888 on Jun 26, 2021
  23. MarcoFalke locked this on Sep 8, 2021
  24. gades referenced this in commit 976078c4a6 on Feb 5, 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: 2024-11-21 09:12 UTC

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