Building Zcash on RHEL fails - help

I’m trying to build the source of zcash on my RHEL system.

The system is running CentOS 7.3.1611.

I’ve got all the required software installed as per the guide on github (gcc, devtoolset, autotools etc.)

However the build still fails with error

GNU assembler version 2.25.1-22.base.el7
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-redhat-linux’.

  • ld -v
    GNU ld version 2.25.1-22.base.el7
  • HOST=HOST_NAME
  • BUILD=x86_64-unknown-linux-gnu
  • NO_RUST=–enable-rust=no
  • NO_PROTON=–enable-proton=no
  • make -j4 -C ./depends/ V=1
    Invalid configuration HOST-NAME': machine HOST-NAME’ not recognized
    make: Entering directory /ZCash/zcash-1.0.11/depends' Makefile:68: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory sha256sum: hosts/.mk: No such file or directory make: *** No rule to make target hosts/.mk’. Stop.
    make: Leaving directory `/ZCash/zcash-1.0.11/depends’

Has anyone been able to build ZCash on CentOS7 before?

Thanks

no problems here, same centos.

  1. is you shell bash?
  2. can by any chance your hostname contain some strange characters other than alpha-numeric?

in depends dir ./config.guess should output something like this:

[user@hostname depends]$ ./config.guess
x86_64-unknown-linux-gnu

Yes I use bash.

The hostname has no strange characters. Alphanumeric only.

My depends for, config.guess shows the same result as yours.

What commands you run to execute the build?

i’m following since 1.0.0 or something, always do:

git fetch origin
git checkout v1.0.11
./zcutil/build.sh --disable-rust

and that’s all.

from your first output it seems varialbles host_os and others are not set in Makefile. i suspect you have some environment variable like HOST and it breaks everything at zcutil/build.sh lines:

if [[ -z "${HOST-}" ]]; then
    HOST=x86_64-unknown-linux-gnu
fi

would you please do:

env|grep HOST

Running the command gives this

HOSTNAME=server.university.ac.uk
HOST=server.university.ac.uk
HOSTTYPE=x86_64-linux

HOST is clearly troublesome. try:

  unset HOST

and run again

It seems to be working now, will report if it succeeds or not.

It seems to have gotten stuck at the point below since I replied.

mkdir -p /ZCash/zcash-1.0.11/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-25db6283a25
cd /ZCash/zcash-1.0.11/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-25db6283a25; mkdir -p /ZCash/zcash-1.0.11/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-25db6283a25 && echo “36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0 /ZCash/zcash-1.0.11/depends/sources/boost_1_62_0.tar.bz2” > /ZCash/zcash-1.0.11/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-25db6283a25/.boost_1_62_0.tar.bz2.hash && sha256sum -c /ZCash/zcash-1.0.11/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-25db6283a25/.boost_1_62_0.tar.bz2.hash && tar --strip-components=1 -xf /ZCash/zcash-1.0.11/depends/sources/boost_1_62_0.tar.bz2
/ZCash/zcash-1.0.11/depends/sources/boost_1_62_0.tar.bz2: OK

Seems to have crashed during build, error doesnt seem clear

ar -rs libleveldb.a db/builder.o db/c.o db/dbformat.o db/db_impl.o db/db_iter.o db/dumpfile.o db/filename.o db/log_reader.o db/log_writer.o db/memtable.o db/repair.o db/table_cache.o db/version_edit.o db/version_set.o db/write_batch.o table/block_builder.o table/block.o table/filter_block.o table/format.o table/iterator.o table/merger.o table/table_builder.o table/table.o table/two_level_iterator.o util/arena.o util/bloom.o util/cache.o util/coding.o util/comparator.o util/crc32c.o util/env.o util/env_posix.o util/env_win.o util/filter_policy.o util/hash.o util/histogram.o util/logging.o util/options.o util/status.o port/port_posix.o
ar: creating libleveldb.a
make[3]: Leaving directory /ZCash/zcash-1.0.11/src/leveldb' make[2]: Leaving directory /ZCash/zcash-1.0.11/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ZCash/zcash-1.0.11/src’
make: *** [all-recursive] Error 1

make[3]: Leaving directory /ZCash/zcash-1.0.11/src/leveldb’ make[2]: Leaving directory/ZCash/zcash-1.0.11/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ZCash/zcash-1.0.11/src’
make: *** [all-recursive] Error 1

I got the same error when I tried to update to 1.0.11 on centos 7. I was too lazy to figure out why and reverted to my backup of 1.0.10-1

I got the same error again, what commands did you use to make the build?

Now its a problem with

zmq\libbitcoin_zmq_a-zmqpublishnotifier.o Error 1
[ Variable] was not declared in this scope (multiple variables)

Honestly why cant the build just work…Never had problems with other currencies

bump please, can anyone help

run zcutil/build.sh --disable-rust >log.out 2>log.err and post your full logs somewhere

Logs as requested. This is ZCash 1.0.11

log.err Pastiebin.com 59aeb639c333a
log.out Pastiebin.com 59aeb66a910c5

i suspect you have an old zeromq installed in the system and it conflicts with zcash.

would you please provide:

yum list installed | grep zeromq
ls -la /usr/local/include/zmq* /usr/include/zmq*

indeed, it reports with nothing and no such file or directory.

sorry, no more ideas.

i suggest you to start with fresh centos-minimal and then adding necessary packages and the rest as in Home · zcash/zcash Wiki · GitHub

Ok Thanks, They need to add a full package list to RHEL based systems. Currently its only the utils which doesnt seem to be enough. Thanks for all your help