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

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

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    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...

    /opt/local/src/bitcoin]# uname -a
    SunOS a36dbe40-5628-e6ea-f7b8-8d89982fe9bf 5.11 joyent_20180525T172343Z i86pc i386 i86pc Solaris
    
    /opt/local/src/bitcoin]# gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/local/gcc49/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/local/gcc49/libexec/gcc/x86_64-sun-solaris2.11/4.9.3/lto-wrapper
    Target: x86_64-sun-solaris2.11
    Configured 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
    Thread model: posix
    gcc version 4.9.3 (GCC)
    
    /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
    ...
    Options used to compile and link:
      with wallet   = yes
      with gui / qt = no
      with zmq      = no
      with test     = no
      with bench    = yes
      with upnp     = auto
      use asm       = yes
      sanitizers    = 
      debug enabled = no
      gprof enabled = no
      werror        = no
    
      target os     = 
      build os      = 
    
      CC            = gcc
      CFLAGS        = -g -O2
      CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
      CXX           = g++ -std=c++11
      CXXFLAGS      =   -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla  -Wno-unused-parameter   -g -O2
      LDFLAGS       = -D_POSIX_PTHREAD_SEMANTICS -pthread  -Wl,-z,now -pie  
      ARFLAGS       = cr
    
    
    /opt/local/src/bitcoin]# make
    Making all in src
    make[1]: Entering directory '/opt/local/src/bitcoin/src'
    make[2]: Entering directory '/opt/local/src/bitcoin/src'
    make[3]: Entering directory '/opt/local/src/bitcoin'
    make[3]: Leaving directory '/opt/local/src/bitcoin'
      CXX      crypto/libbitcoinconsensus_la-aes.lo
      CXX      crypto/libbitcoinconsensus_la-chacha20.lo
      CXX      crypto/libbitcoinconsensus_la-hmac_sha256.lo
      CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
      CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
      CXX      crypto/libbitcoinconsensus_la-sha1.lo
      CXX      crypto/libbitcoinconsensus_la-sha256.lo
      CXX      crypto/libbitcoinconsensus_la-sha512.lo
      CXX      crypto/libbitcoinconsensus_la-sha256_sse4.lo
      CXX      libbitcoinconsensus_la-arith_uint256.lo
      CXX      consensus/libbitcoinconsensus_la-merkle.lo
    In file included from ./script/script.h:11:0,
                     from ./primitives/transaction.h:11,
                     from ./consensus/merkle.h:11,
                     from consensus/merkle.cpp:5:
    ./serialize.h:193:39: error: redefinition of 'template<class Stream> void Serialize(Stream&, int8_t)'
     template<typename Stream> inline void Serialize(Stream& s, int8_t a  ) { ser_wr
                                           ^
    ./serialize.h:192:39: note: 'template<class Stream> void Serialize(Stream&, char)' previously declared here
     template<typename Stream> inline void Serialize(Stream& s, char a    ) { ser_wr
                                           ^
    In file included from ./script/script.h:11:0,
                     from ./primitives/transaction.h:11,
                     from ./consensus/merkle.h:11,
                     from consensus/merkle.cpp:5:
    ./serialize.h:209:39: error: redefinition of 'template<class Stream> void Unserialize(Stream&, int8_t&)'
     template<typename Stream> inline void Unserialize(Stream& s, int8_t& a  ) { a =
                                           ^
    ./serialize.h:208:39: note: 'template<class Stream> void Unserialize(Stream&, char&)' previously declared here
     template<typename Stream> inline void Unserialize(Stream& s, char& a    ) { a =
                                           ^
    Makefile:8138: recipe for target 'consensus/libbitcoinconsensus_la-merkle.lo' failed
    make[2]: *** [consensus/libbitcoinconsensus_la-merkle.lo] Error 1
    make[2]: Leaving directory '/opt/local/src/bitcoin/src'
    Makefile:9824: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/opt/local/src/bitcoin/src'
    Makefile:756: recipe for target 'all-recursive' failed
    make: *** [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: 2026-04-30 06:15 UTC

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