FreeBSD / FreeNAS installation guide?

Hello there,

After my HDD used with the oDroid C2 died, I decided to go for something a bit more reliable and went for better hardware running FreeNAS.

I read that FreeBSD is now supported since 2.1.0, but I can’t find anything related to the installation of a node.

Since I know the team makes excellent and complete documentation, I was wondering if I just missed it and if somebody could point me to it.

1 Like

Please ensure the dependencies listed under Linux are available in FreeBSD and your GCC is version 4.9+.

Also please see: https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html#dependency-version-check

1 Like

On the target:

pkg install autoconf automake bash cmake gcc gmake libtool pkgconf

On the build machine:

HOST=armv6-freebsd ./zcutil/build.sh

That’s untested and I’m not 100% sure it’s the right value for HOST. If not then try armv6-unknown-freebsd.

1 Like

Sorry, I was not specific enough in my first post:
I installed FreeNAS on an x64 machine. So I imagine I don’t need to specify HOST as you mentioned?

First time I try FreeNAS… I guess I’ll have to spend a few hours before it works … :slight_smile:

1 Like

Oh right. That’s correct, you don’t need to specify HOST unless you’re cross-compiling for a different architecture/OS.

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 @rex4539 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 :slight_smile:

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

(The last line repeats many times. )

Quite a good topic, I have a lot of useful knowledge. Do not know you have solved the problem yet?
Thank you.

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 © 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=x86_64-freebsd
  • BUILD=x86_64-unknown-freebsd11.3
  • NO_PROTON=–enable-proton=no
  • gmake -C ./depends/ V=1
    gmake: Entering directory ‘/root/zcash/depends’
    test: rust-std-1.36.0-x86_64-pc-freebsd.tar.gz: unexpected operator
    echo Building boost…
    Building boost…
    mkdir -p /root/zcash/depends/work/build/x86_64-freebsd/boost/1_70_0-16f98b7ce62/.
    cd /root/zcash/depends/work/build/x86_64-freebsd/boost/1_70_0-16f98b7ce62/.; PATH="/root/zcash/depends/x86_64-freebsd/native/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin" ./b2 -d2 -j2 -d1 --prefix=/root/zcash/depends/work/staging/x86_64-freebsd/boost/1_70_0-16f98b7ce62/root/zcash/depends/x86_64-freebsd --layout=system threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 variant=release stage
    /bin/sh: ./b2: not found
    gmake: *** [funcs.mk:260: /root/zcash/depends/work/build/x86_64-freebsd/boost/1_70_0-16f98b7ce62/./.stamp_built] Error 127
    gmake: Leaving directory ‘/root/zcash/depends’
    [root@zcash ~/zcash]#

As usual, if anybody could help, that would be great :slight_smile: