Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on Unbuntu 16.04 #196

Closed
axelay opened this issue Apr 23, 2018 · 10 comments
Closed

Cannot compile on Unbuntu 16.04 #196

axelay opened this issue Apr 23, 2018 · 10 comments
Labels
help wanted urgent Issues which deserve immediate attention

Comments

@axelay
Copy link

axelay commented Apr 23, 2018

Cannot compile as the title says
~/bitcoin-abc$ make
Making all in src
make[1]: Entering directory '/home/ubuntu/bitcoin-abc/src'
make[2]: Entering directory '/home/ubuntu/bitcoin-abc/src'
make[2]: *** No rule to make target 'seeder/dns.c', needed by 'seeder/libbitcoin_seeder_a-dns.o'. Stop.
make[2]: Leaving directory '/home/ubuntu/bitcoin-abc/src'
Makefile:9780: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/bitcoin-abc/src'
Makefile:722: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

GCC is up to date: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)

Any ideas?

@jasonbcox
Copy link
Contributor

GCC 5.4 is the highest available in the Ubuntu 16.04 PPAs, but it's not the latest version. I recommend installing GCC 7.1+. You also have two alternative options:

  1. Fix the bug preventing GCC 5.4 from building and submit a PR (example: https://reviews.bitcoinabc.org/D1113) We'd greatly appreciate this, as I'm sure you're not the only one to run into this issue.
  2. Build using CMake. There are some restrictions since CMake builds are still in progress, but you should be able to build a binary at the least.

@axelay
Copy link
Author

axelay commented Apr 23, 2018

I upgraded to gcc version 7.1.0 (Ubuntu 7.1.0-10ubuntu1~16.04.york0)
but I still have the same error... Any other ideas?

@jasonbcox
Copy link
Contributor

There should be more info about the error above this failure message. Can you provide that?

@axelay
Copy link
Author

axelay commented Apr 24, 2018

Not sure if that helps but here is the complete output for make:

Making all in src
make[1]: Entering directory '/home/ubuntu/bitcoin-abc/src'
make[2]: Entering directory '/home/ubuntu/bitcoin-abc/src'
  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
  CXX      libbitcoinconsensus_la-hash.lo
  CXX      primitives/libbitcoinconsensus_la-block.lo
  CXX      primitives/libbitcoinconsensus_la-transaction.lo
  CXX      libbitcoinconsensus_la-pubkey.lo
  CXX      script/libbitcoinconsensus_la-bitcoinconsensus.lo
  CXX      script/libbitcoinconsensus_la-interpreter.lo
  CXX      script/libbitcoinconsensus_la-script.lo
  CXX      script/libbitcoinconsensus_la-script_error.lo
  CXX      libbitcoinconsensus_la-uint256.lo
  CXX      libbitcoinconsensus_la-utilstrencodings.lo
make[3]: Entering directory '/home/ubuntu/bitcoin-abc/src/secp256k1'
gcc -I. -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o
gcc gen_context.o -o gen_context
./gen_context
  CC       src/libsecp256k1_la-secp256k1.lo
  CCLD     libsecp256k1.la
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/home/ubuntu/bitcoin-abc/src/secp256k1'
  CXXLD    libbitcoinconsensus.la
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      bitcoind-bitcoind.o
  CXX      libbitcoin_server_a-addrman.o
  CXX      libbitcoin_server_a-addrdb.o
  CXX      libbitcoin_server_a-bloom.o
  CXX      libbitcoin_server_a-blockencodings.o
  CXX      libbitcoin_server_a-chain.o
  CXX      libbitcoin_server_a-checkpoints.o
  CXX      libbitcoin_server_a-config.o
  CXX      libbitcoin_server_a-globals.o
  CXX      libbitcoin_server_a-httprpc.o
  CXX      libbitcoin_server_a-httpserver.o
  CXX      libbitcoin_server_a-init.o
init.cpp: In function ‘bool AppInitMain(Config&, boost::thread_group&, CScheduler&)’:
init.cpp:2177:56: warning: ‘nStart’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
                                                        ^
  CXX      libbitcoin_server_a-dbwrapper.o
  CXX      libbitcoin_server_a-merkleblock.o
  CXX      libbitcoin_server_a-miner.o
  CXX      libbitcoin_server_a-net.o
  CXX      libbitcoin_server_a-net_processing.o
  CXX      libbitcoin_server_a-noui.o
  CXX      policy/libbitcoin_server_a-fees.o
  CXX      policy/libbitcoin_server_a-policy.o
  CXX      libbitcoin_server_a-pow.o
  CXX      libbitcoin_server_a-rest.o
  CXX      rpc/libbitcoin_server_a-abc.o
  CXX      rpc/libbitcoin_server_a-blockchain.o
  CXX      rpc/libbitcoin_server_a-mining.o
  CXX      rpc/libbitcoin_server_a-misc.o
  CXX      rpc/libbitcoin_server_a-net.o
  CXX      rpc/libbitcoin_server_a-rawtransaction.o
  CXX      rpc/libbitcoin_server_a-server.o
  CXX      script/libbitcoin_server_a-scriptcache.o
  CXX      script/libbitcoin_server_a-sigcache.o
  CXX      script/libbitcoin_server_a-ismine.o
  CXX      libbitcoin_server_a-timedata.o
  CXX      libbitcoin_server_a-torcontrol.o
  CXX      libbitcoin_server_a-txdb.o
  CXX      libbitcoin_server_a-txmempool.o
  CXX      libbitcoin_server_a-ui_interface.o
  CXX      libbitcoin_server_a-validation.o
  CXX      libbitcoin_server_a-validationinterface.o
  CXX      libbitcoin_server_a-versionbits.o
  AR       libbitcoin_server.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      libbitcoin_common_a-amount.o
  CXX      libbitcoin_common_a-base58.o
  CXX      libbitcoin_common_a-cashaddr.o
  CXX      libbitcoin_common_a-cashaddrenc.o
  CXX      libbitcoin_common_a-chainparams.o
  CXX      libbitcoin_common_a-config.o
  CXX      libbitcoin_common_a-coins.o
  CXX      libbitcoin_common_a-compressor.o
  CXX      libbitcoin_common_a-dstencode.o
  CXX      libbitcoin_common_a-globals.o
  CXX      libbitcoin_common_a-core_read.o
  CXX      libbitcoin_common_a-core_write.o
  CXX      libbitcoin_common_a-key.o
  CXX      libbitcoin_common_a-keystore.o
  CXX      libbitcoin_common_a-netaddress.o
  CXX      libbitcoin_common_a-netbase.o
  CXX      libbitcoin_common_a-protocol.o
  CXX      libbitcoin_common_a-scheduler.o
  CXX      script/libbitcoin_common_a-sign.o
  CXX      script/libbitcoin_common_a-standard.o
  CXX      libbitcoin_common_a-warnings.o
  AR       libbitcoin_common.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Entering directory '/home/ubuntu/bitcoin-abc/src/univalue'
  CXX      lib/libunivalue_la-univalue.lo
  CXX      lib/libunivalue_la-univalue_get.lo
  CXX      lib/libunivalue_la-univalue_read.lo
  CXX      lib/libunivalue_la-univalue_write.lo
  CXXLD    libunivalue.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/home/ubuntu/bitcoin-abc/src/univalue'
  CXX      support/libbitcoin_util_a-lockedpool.o
  CXX      libbitcoin_util_a-chainparamsbase.o
  CXX      libbitcoin_util_a-clientversion.o
  CXX      compat/libbitcoin_util_a-glibc_sanity.o
  CXX      compat/libbitcoin_util_a-glibcxx_sanity.o
  CXX      compat/libbitcoin_util_a-strnlen.o
  CXX      libbitcoin_util_a-fs.o
  CXX      libbitcoin_util_a-random.o
  CXX      rpc/libbitcoin_util_a-protocol.o
  CXX      support/libbitcoin_util_a-cleanse.o
  CXX      libbitcoin_util_a-sync.o
  CXX      libbitcoin_util_a-threadinterrupt.o
  CXX      libbitcoin_util_a-uint256.o
  CXX      libbitcoin_util_a-util.o
  CXX      libbitcoin_util_a-utilmoneystr.o
  CXX      libbitcoin_util_a-utilstrencodings.o
  CXX      libbitcoin_util_a-utiltime.o
  AR       libbitcoin_util.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      wallet/libbitcoin_wallet_a-crypter.o
  CXX      wallet/libbitcoin_wallet_a-db.o
  CXX      wallet/libbitcoin_wallet_a-finaltx.o
  CXX      wallet/libbitcoin_wallet_a-rpcdump.o
  CXX      wallet/libbitcoin_wallet_a-rpcwallet.o
  CXX      wallet/libbitcoin_wallet_a-wallet.o
  CXX      wallet/libbitcoin_wallet_a-walletdb.o
  AR       libbitcoin_wallet.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      libbitcoin_consensus_a-arith_uint256.o
  CXX      consensus/libbitcoin_consensus_a-merkle.o
  CXX      libbitcoin_consensus_a-hash.o
  CXX      primitives/libbitcoin_consensus_a-block.o
  CXX      primitives/libbitcoin_consensus_a-transaction.o
  CXX      libbitcoin_consensus_a-pubkey.o
  CXX      script/libbitcoin_consensus_a-bitcoinconsensus.o
  CXX      script/libbitcoin_consensus_a-interpreter.o
  CXX      script/libbitcoin_consensus_a-script.o
  CXX      script/libbitcoin_consensus_a-script_error.o
  CXX      libbitcoin_consensus_a-uint256.o
  CXX      libbitcoin_consensus_a-utilstrencodings.o
  AR       libbitcoin_consensus.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      crypto/crypto_libbitcoin_crypto_a-aes.o
  CXX      crypto/crypto_libbitcoin_crypto_a-chacha20.o
  CXX      crypto/crypto_libbitcoin_crypto_a-hmac_sha256.o
  CXX      crypto/crypto_libbitcoin_crypto_a-hmac_sha512.o
  CXX      crypto/crypto_libbitcoin_crypto_a-ripemd160.o
  CXX      crypto/crypto_libbitcoin_crypto_a-sha1.o
  CXX      crypto/crypto_libbitcoin_crypto_a-sha256.o
  CXX      crypto/crypto_libbitcoin_crypto_a-sha512.o
  CXX      crypto/crypto_libbitcoin_crypto_a-sha256_sse4.o
  AR       crypto/libbitcoin_crypto.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      leveldb/db/leveldb_libleveldb_a-builder.o
  CXX      leveldb/db/leveldb_libleveldb_a-c.o
  CXX      leveldb/db/leveldb_libleveldb_a-dbformat.o
  CXX      leveldb/db/leveldb_libleveldb_a-db_impl.o
  CXX      leveldb/db/leveldb_libleveldb_a-db_iter.o
  CXX      leveldb/db/leveldb_libleveldb_a-dumpfile.o
  CXX      leveldb/db/leveldb_libleveldb_a-filename.o
  CXX      leveldb/db/leveldb_libleveldb_a-log_reader.o
  CXX      leveldb/db/leveldb_libleveldb_a-log_writer.o
  CXX      leveldb/db/leveldb_libleveldb_a-memtable.o
  CXX      leveldb/db/leveldb_libleveldb_a-repair.o
  CXX      leveldb/db/leveldb_libleveldb_a-table_cache.o
  CXX      leveldb/db/leveldb_libleveldb_a-version_edit.o
  CXX      leveldb/db/leveldb_libleveldb_a-version_set.o
  CXX      leveldb/db/leveldb_libleveldb_a-write_batch.o
  CXX      leveldb/table/leveldb_libleveldb_a-block_builder.o
  CXX      leveldb/table/leveldb_libleveldb_a-block.o
  CXX      leveldb/table/leveldb_libleveldb_a-filter_block.o
  CXX      leveldb/table/leveldb_libleveldb_a-format.o
  CXX      leveldb/table/leveldb_libleveldb_a-iterator.o
  CXX      leveldb/table/leveldb_libleveldb_a-merger.o
  CXX      leveldb/table/leveldb_libleveldb_a-table_builder.o
  CXX      leveldb/table/leveldb_libleveldb_a-table.o
  CXX      leveldb/table/leveldb_libleveldb_a-two_level_iterator.o
  CXX      leveldb/util/leveldb_libleveldb_a-arena.o
  CXX      leveldb/util/leveldb_libleveldb_a-bloom.o
  CXX      leveldb/util/leveldb_libleveldb_a-cache.o
  CXX      leveldb/util/leveldb_libleveldb_a-coding.o
  CXX      leveldb/util/leveldb_libleveldb_a-comparator.o
  CXX      leveldb/util/leveldb_libleveldb_a-crc32c.o
  CXX      leveldb/util/leveldb_libleveldb_a-env.o
  CXX      leveldb/util/leveldb_libleveldb_a-env_posix.o
  CXX      leveldb/util/leveldb_libleveldb_a-filter_policy.o
  CXX      leveldb/util/leveldb_libleveldb_a-hash.o
  CXX      leveldb/util/leveldb_libleveldb_a-histogram.o
  CXX      leveldb/util/leveldb_libleveldb_a-logging.o
leveldb/util/logging.cc: In function ‘bool leveldb::ConsumeDecimalNumber(leveldb::Slice*, uint64_t*)’:
leveldb/util/logging.cc:58:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           (v == kMaxUint64/10 && delta > kMaxUint64%10)) {
                                        ^
  CXX      leveldb/util/leveldb_libleveldb_a-options.o
  CXX      leveldb/util/leveldb_libleveldb_a-status.o
  CXX      leveldb/port/leveldb_libleveldb_a-port_posix.o
leveldb/port/port_posix.cc: In function ‘bool leveldb::port::HasAcceleratedCRC32C()’:
leveldb/port/port_posix.cc:60:15: warning: ‘ecx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   return (ecx & (1 << 20)) != 0;
               ^
  AR       leveldb/libleveldb.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      leveldb/port/leveldb_libleveldb_sse42_a-port_posix_sse.o
  AR       leveldb/libleveldb_sse42.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      leveldb/helpers/memenv/leveldb_libmemenv_a-memenv.o
  AR       leveldb/libmemenv.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    bitcoind
  CXX      seeder/bitcoin_seeder-main.o
  CXX      seeder/libbitcoin_seeder_a-bitcoin.o
  CXX      seeder/libbitcoin_seeder_a-db.o
make[2]: *** No rule to make target 'seeder/dns.c', needed by 'seeder/libbitcoin_seeder_a-dns.o'.  Stop.
make[2]: Leaving directory '/home/ubuntu/bitcoin-abc/src'
Makefile:9780: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/bitcoin-abc/src'
Makefile:722: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1```

@schancel
Copy link
Contributor

You need to regenerate your makefiles: ./autogen.sh && ./configure

@axelay
Copy link
Author

axelay commented Apr 25, 2018

Nope - done that already and it gives me the same result.
Anybody else got these issues or just me?

@schancel
Copy link
Contributor

@axelay I've had the issue. It started happening immediately after some cleanup of the seeder code. Cleaning my build dir, and rerunning the commands I listed above fixed it.

@schancel schancel added help wanted urgent Issues which deserve immediate attention labels Apr 25, 2018
@axelay
Copy link
Author

axelay commented Apr 26, 2018

I have now successfully compiled it and it's running - I cloned the repository again in the end just to make sure I had nothing left that could mess things up.
Thanks for the help @schancel & @jasonbcox

@axelay axelay closed this as completed Apr 26, 2018
@moziyoudiantian
Copy link

@axelay
warning: ‘ecx’ may be used uninitialized in this function
warning: comparison between signed and unsigned integer expressions

How to solve it? Do you remember? Because I've had this problem, too.

ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue Dec 1, 2020
Required for fixing Bitcoin-ABC#196. Offers all fundamental integer types, so
should be robust against any size type definition imaginable.

Also solves undefined behaviour for e.g. `UniValue(NaN).typ` and some
nits.

Test plan: `ninja check-univalue all check`
ftrader added a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue Dec 1, 2020
Make UniValue accept any integer type (Bitcoin-ABC#196)

Closes Bitcoin-ABC#196

See merge request bitcoin-cash-node/bitcoin-cash-node!870
@mironkraft
Copy link

mironkraft commented Feb 22, 2021

I have now successfully compiled it and it's running - I cloned the repository again in the end just to make sure I had nothing left that could mess things up.
Thanks for the help @schancel & @jasonbcox

you started all from begining?
i am facing same problem or similar to yours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted urgent Issues which deserve immediate attention
Development

No branches or pull requests

5 participants