(v0.20.1) Not compiling on Illumos/SmartOS #21485

issue kayront openend this issue on March 20, 2021
  1. kayront commented at 9:49 am on March 20, 2021: none
     0$ bmake
     1=> Bootstrap dependency digest>=20010302: found digest-20190127
     2===> Building for bitcoin-0.20.1nb3
     3Making all in src
     4gmake[1]: Entering directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1/src'
     5gmake[2]: Entering directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1/src'
     6gmake[3]: Entering directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1'
     7gmake[3]: Leaving directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1'
     8  CXXLD    bitcoin-tx
     9Undefined                       first referenced
    10 symbol                             in file
    11freeifaddrs                         libbitcoin_util.a(libbitcoin_util_a-randomenv.o)
    12getifaddrs                          libbitcoin_util.a(libbitcoin_util_a-randomenv.o)
    13ld: fatal: symbol referencing errors. No output written to .libs/bitcoin-tx
    14collect2: error: ld returned 1 exit status
    15gmake[2]: *** [Makefile:7355: bitcoin-tx] Error 1
    16gmake[2]: Leaving directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1/src'
    17gmake[1]: *** [Makefile:17263: all-recursive] Error 1
    18gmake[1]: Leaving directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1/src'
    19gmake: *** [Makefile:782: all-recursive] Error 1
    20*** Error code 2
    21
    22Stop.
    23bmake[1]: stopped in /data/pkgsrc/finance/bitcoin
    24*** Error code 1
    

    I found this, which seems to be the same issue, but on a Python context.

    Previous issues with compiling on Illumos seem to have been sorted out (#15708 & more), but now it’s stuck here.

  2. kayront added the label Bug on Mar 20, 2021
  3. fanquake commented at 10:15 am on March 20, 2021: member
    @kayront did you want to try #21486?
  4. kayront commented at 12:36 pm on March 20, 2021: none

    @fanquake it goes a little bit further with your changes, but still no dice.

     0gmake[3]: Leaving directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1'
     1  CXX      libbitcoin_util_a-randomenv.o
     2  AR       libbitcoin_util.a
     3  CXXLD    bitcoind
     4  CXXLD    bitcoin-cli
     5  CXXLD    bench/bench_bitcoin
     6  CXXLD    bitcoin-tx
     7  CXXLD    bitcoin-wallet
     8Undefined                       first referenced
     9 symbol                             in file
    10freeifaddrs                         libbitcoin_util.a(libbitcoin_util_a-randomenv.o)
    11getifaddrs                          libbitcoin_util.a(libbitcoin_util_a-randomenv.o)
    12ld: fatal: symbol referencing errors. No output written to .libs/bitcoin-tx
    13collect2: error: ld returned 1 exit status
    14gmake[2]: *** [Makefile:7355: bitcoin-tx] Error 1
    15gmake[2]: *** Waiting for unfinished jobs....
    16gmake[2]: Leaving directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1/src'
    17gmake[1]: *** [Makefile:17263: all-recursive] Error 1
    18gmake[1]: Leaving directory '/home/pbulk/build/finance/bitcoin/work/bitcoin-0.20.1/src'
    19gmake: *** [Makefile:782: all-recursive] Error 1
    20*** Error code 2
    
  5. fanquake commented at 1:12 pm on March 20, 2021: member

    it goes a little bit further with your changes, but still no dice.

    Hmm ok. Did you make clean between the builds?

  6. kayront commented at 1:37 pm on March 20, 2021: none

    Indeed I had not.

    But after trying again, this time after a clean:

     0  AR       crypto/libbitcoin_crypto_shani.a
     1  AR       crc32c/libcrc32c.a
     2  AR       leveldb/libleveldb.a
     3  AR       crc32c/libcrc32c_sse42.a
     4  AR       leveldb/libmemenv.a
     5  CXXLD    bitcoin-cli
     6  CXXLD    bitcoin-tx
     7  CXXLD    bitcoin-wallet
     8  CXXLD    bitcoind
     9Undefined                       first referenced
    10 symbol                             in file
    11freeifaddrs                         libbitcoin_util.a(libbitcoin_util_a-randomenv.o)
    12getifaddrs                          libbitcoin_util.a(libbitcoin_util_a-randomenv.o)
    13ld: fatal: symbol referencing errors. No output written to .libs/bitcoin-tx
    14collect2: error: ld returned 1 exit status
    15gmake[2]: *** [Makefile:7355: bitcoin-tx] Error 1
    
  7. sipa commented at 4:50 pm on March 20, 2021: member
    Some googling tells me that on some systems these functions are in libsocket rather than libc. Maybe we need -lsocket ?
  8. kayront commented at 6:35 pm on March 20, 2021: none

    @sipa that’s exactly what I linked before suggests.

    Any idea what/where to change to test the hypothesis?

  9. fanquake commented at 0:42 am on March 21, 2021: member

    Any idea what/where to change to test the hypothesis? @kayront I’ve added an -lsocket link check to #21486 if you’d like to try that again.

  10. kayront commented at 1:29 pm on March 21, 2021: none

    Bitcoin Core version v0.20.1.0-g7ff64311bee570874c4f0dfa18f518552188df08 (release build)

    But without prefixing the command with LC_ALL=C (#17379), it segfaults instead, with:

    0terminate called after throwing an instance of 'std::runtime_error'
    1  what():  locale::facet::_S_create_c_locale name not valid
    2Abort (core dumped)
    

    Seems that we can close this issue here though. Again, thank you for helping out :)

  11. kayront commented at 1:29 pm on March 21, 2021: none
    Just to make sure, will these changes be on v0.22 ?
  12. fanquake deleted a comment on Mar 24, 2021
  13. fanquake commented at 5:21 am on March 26, 2021: member
    @kayront these changes should make it into v22.0 yes (likely also be backported). I’ve had to push a small fix to #21486. Could you retest, and comment on that PR when you have?
  14. fanquake closed this on Mar 31, 2021

  15. sidhujag referenced this in commit 0fccae38e3 on Mar 31, 2021
  16. fanquake commented at 9:52 am on April 6, 2021: member
    @kayront the fix has been merged into master (which will become 22.0), and is being backported into the 0.21 branch in #21616. So should also be part of the 0.21.1 release.
  17. MarcoFalke referenced this in commit 0b9a046c1a on Apr 7, 2021
  18. PastaPastaPasta referenced this in commit e8b06b328c on Jul 17, 2022
  19. DrahtBot locked this on Aug 18, 2022
  20. PastaPastaPasta referenced this in commit e958185a49 on Aug 30, 2022
  21. PastaPastaPasta referenced this in commit 6b00cb9ae3 on Aug 30, 2022
  22. PastaPastaPasta referenced this in commit 2966452a1b on Sep 3, 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-12-22 00:12 UTC

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