After a few hours of trying, this is what I achieved and where I got stuck:
After setting up a jail for zcash, I installed the dependencies as mentioned on github’s link @anon16456014 posted, and similar to what @daira mentioned.
After installing git, I DL the source, then went to the download parameters step. with the following command: ./zcutil/fetch-params.sh
Which didn’t work. I had to edit that file and replace the first line with #!/usr/local/bin/bash
It then worked, gave a few error messages which were solved by installed flock and wget
Stuck at the build step:
The command ./zcutil/build.sh gives an error, which I believe is “normal” if I understand what is on github correctly, (and also what is mentioned as a comment in the build.sh file:
I need to enter :
MAKE=gmake ./zcutil/build.sh
But it doesn’t work and gives “MAKE=gmake command not found” message.
I couldn’t find a way to go beyond that point. Help is welcome
Edit:
moved a bit further by typing “bash” then set MAKE=gmake, then start the build.sh script.
But new error:
LCOV_ARG=
HARDENING_ARG=–enable-hardening
TEST_ARG=
‘[’ x = x–enable-lcov ‘]’
‘[’ x = x–disable-tests ‘]’
MINING_ARG=
‘[’ x = x–disable-mining ‘]’
PROTON_ARG=–enable-proton=no
‘[’ x = x–enable-proton ‘]’
eval gmake --version
++ gmake --version
GNU Make 4.2.1
Built for amd64-portbld-freebsd11.3
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
as --version
GNU assembler 2.17.50 [FreeBSD] 2007-07-03
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-freebsd’.
ld -v
GNU ld 2.17.50 [FreeBSD] 2007-07-03
HOST=zcash
BUILD=x86_64-unknown-freebsd11.3
NO_PROTON=–enable-proton=no
gmake -C ./depends/ V=1
gmake: Entering directory ‘/root/zcash/depends’
Invalid configuration zcash': machine zcash’ not recognized
shasum: hosts/.mk: No such file or directory.
So with all that extra time at home, I tried again building on FreeNAS / FreeBSD and I went a step further (I hope in the right direction):
I added those 2 lines in the build.sh file:
MAKE=gmake
HOST=X86_64
And this seemed to solve the above mentioned issue. Of course, another one popped up:
[root@zcash ~/zcash]# ./zcutil/build.sh
LCOV_ARG=
HARDENING_ARG=–enable-hardening
TEST_ARG=
‘[’ x = x–enable-lcov ‘]’
‘[’ x = x–disable-tests ‘]’
MINING_ARG=
‘[’ x = x–disable-mining ‘]’
PROTON_ARG=–enable-proton=no
‘[’ x = x–enable-proton ‘]’
eval gmake --version
++ gmake --version
GNU Make 4.2.1
Built for amd64-portbld-freebsd11.3
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
as --version
GNU assembler 2.17.50 [FreeBSD] 2007-07-03
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-freebsd’.
And I did one last attempt: to cross compile on a fresh ubuntu install for freebsd, which went further than the 2 previous trials, but still no luck I think I reached my limits and will give up for now. For info here what I get when I try to cross complie on ubuntu for freebsd:
It seems strange that rust cannot be downloaded…
HOST=x86_64-freebsd ./zcutil/build.sh -j$(nproc)
+ LCOV_ARG=
+ HARDENING_ARG=--enable-hardening
+ TEST_ARG=
+ '[' x-j4 = x--enable-lcov ']'
+ '[' x-j4 = x--disable-tests ']'
+ MINING_ARG=
+ '[' x-j4 = x--disable-mining ']'
+ PROTON_ARG=--enable-proton=no
+ '[' x-j4 = x--enable-proton ']'
+ eval make --version
++ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ as --version
GNU assembler (GNU Binutils for Ubuntu) 2.33
Copyright (C) 2019 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-linux-gnu'.
+ ld -v
GNU ld (GNU Binutils for Ubuntu) 2.33
+ HOST=x86_64-freebsd
+ BUILD=x86_64-unknown-linux-gnu
+ NO_PROTON=--enable-proton=no
+ make -j4 -C ./depends/ V=1
make: Entering directory '/home/den/zcash/depends'
/bin/sh: 1: test: rust-std-1.36.0-x86_64-pc-freebsd.tar.gz: unexpected operator
mkdir -p /home/den/zcash/depends/sources/download-stamps /home/den/zcash/depends/sources
rm -f /home/den/zcash/depends/sources/download-stamps/.stamp_fetched-rust-rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.hash
touch /home/den/zcash/depends/sources/download-stamps/.stamp_fetched-rust-rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.hash
cd /home/den/zcash/depends/sources/download-stamps; (test -f /home/den/zcash/depends/sources/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz || ( mkdir -p /home/den/zcash/depends/work/download/rust-1.36.0 && echo Fetching rust... && ( curl --location --fail --connect-timeout 10 --retry 3 -o "/home/den/zcash/depends/work/download/rust-1.36.0/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.temp" "https://download.z.cash/depends-sources/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz" || curl --location --fail --connect-timeout 10 --retry 3 -o "/home/den/zcash/depends/work/download/rust-1.36.0/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.temp" "https://static.rust-lang.org/dist/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz" ) && echo "eeeb1e9d0d7823c55f00f434789696e7249f465ba5966a5ab479040e3912c0e7 /home/den/zcash/depends/work/download/rust-1.36.0/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.temp" > /home/den/zcash/depends/work/download/rust-1.36.0/.rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.hash && sha256sum -c /home/den/zcash/depends/work/download/rust-1.36.0/.rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.hash && mv /home/den/zcash/depends/work/download/rust-1.36.0/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.temp /home/den/zcash/depends/sources/rust-std-1.36.0-x86_64-pc-freebsd.tar.gz && rm -rf /home/den/zcash/depends/work/download/rust-1.36.0 )) && (test -f /home/den/zcash/depends/sources/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz || ( mkdir -p /home/den/zcash/depends/work/download/rust-1.36.0 && echo Fetching rust... && ( curl --location --fail --connect-timeout 10 --retry 3 -o "/home/den/zcash/depends/work/download/rust-1.36.0/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.temp" "https://download.z.cash/depends-sources/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz" || curl --location --fail --connect-timeout 10 --retry 3 -o "/home/den/zcash/depends/work/download/rust-1.36.0/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.temp" "https://static.rust-lang.org/dist/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz" ) && echo "15e592ec52f14a0586dcebc87a957e472c4544e07359314f6354e2b8bd284c55 /home/den/zcash/depends/work/download/rust-1.36.0/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.temp" > /home/den/zcash/depends/work/download/rust-1.36.0/.rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.hash && sha256sum -c /home/den/zcash/depends/work/download/rust-1.36.0/.rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.hash && mv /home/den/zcash/depends/work/download/rust-1.36.0/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz.temp /home/den/zcash/depends/sources/rust-1.36.0-x86_64-unknown-linux-gnu.tar.gz && rm -rf /home/den/zcash/depends/work/download/rust-1.36.0 ))
Fetching rust...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
make: *** [funcs.mk:261: /home/den/zcash/depends/sources/download-stamps/.stamp_fetched-rust-rust-std-1.36.0-x86_64-pc-freebsd.tar.gz.hash] Error 22
make: Leaving directory '/home/den/zcash/depends'
Hi there,
I’m planning on building on FreeBSD but run on OpenBSD. Not sure if that’s going to work, as application building is totally new to me. It’s been all apt or dpkg for me… Thoughts?
Thanks, POT. Unfortunately, I didn’t make much progress. I couldn’t map the set of build requirements for the Linux environment to the OpenBSD environment. For example, finding what’s in the build-essential package on Linux didn’t allow me to find the equivalent packages in OpenBSD.
I also noticed that the C compiler in Linux Mint 20 is 9.3.0-17, while in OpenBSD 6.8 it is 4.2.1 20070719. I imagine that that by itself could be a major problem.
I chatted with a tech from the Horizen project, which is where I’m hopeful of deploying OpenBSD, who said he doesn’t believe the required work to backport BSD support to Zend hasn’t been done, though there IS support for a FreeBSD build target. Whatever that means. Sorry; looks like a bust at this point.
Followed the instructions I found but ended up getting the below once all the packages were installed:
make: “/usr/home/laurens/zen/depends/Makefile” line 20: Missing dependency operator
make: “/usr/home/laurens/zen/depends/Makefile” line 23: Need an operator
make: “/usr/home/laurens/zen/depends/Makefile” line 25: Missing dependency operator