Open daira opened 4 years ago
run
pip install simplejson
andpip install pyblake2
(the latter is why you need Visual Studio; would be good to avoid that requirement);
Python 3.6 added BLAKE2s and BLAKE2b to hashlib
, based on the pyblake2
implementation. We can try to use the hashlib
implementations, and fall back to pyblake2
for pre-3.6.
Many of the RPC tests fail with errors similar to this one (on Windows 8.1, Python 3.8.4):
daira@katava:~$ sudo update-alternatives --config x86_64-w64-mingw32-gcc
[sudo] password for daira:
There are 2 choices for the alternative x86_64-w64-mingw32-gcc (providing /usr/bin/x86_64-w64-mingw32-gcc).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/x86_64-w64-mingw32-gcc-win32 60 auto mode
* 1 /usr/bin/x86_64-w64-mingw32-gcc-posix 30 manual mode
2 /usr/bin/x86_64-w64-mingw32-gcc-win32 60 manual mode
Press <enter> to keep the current choice[*], or type selection number: ^C
daira@katava:~$ sudo update-alternatives --config x86_64-w64-mingw32-g++
There are 2 choices for the alternative x86_64-w64-mingw32-g++ (providing /usr/bin/x86_64-w64-mingw32-g++).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode
* 1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode
2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode
Press <enter> to keep the current choice[*], or type selection number:
zcashd
uses std::thread
APIs, which are only available with the posix
threading option. The win32
threading option cannot possibly work.
We should probably document that the posix
threading option should be set using:
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
(Somewhat horrifyingly, the gcc and g++ threading options can be set differently. Don't do that!)
See also https://github.com/zcash/zcash/pull/6517/files#r1154268931, which might be sufficient to avoid needing to set these options.
Many of the RPC tests fail with errors similar to this one (on Windows 8.1, Python 3.8.4): [...]
This issue is still present in (888039caf1cc41577f9c8facecdc2525375e9be5 plus #4810). There seem to be many other RPC test failures as well, some that look like regressions.
Related (but no fix there): https://bugs.llvm.org/show_bug.cgi?id=43642
The process to get
zcashd
running is:HOST=x86_64-w64-mingw32 ./zcutil/build.sh -j$(nproc)
;.zcash-params
directory, and theqa
directory to Windows;zcash.conf
in the right place;zcashd.exe
and allow it to get through the Windows firewall (then shut downzcashd
before trying to run tests);To run the tests:
test_bitcoin.exe
andzcash-gtest.exe
;pip
);pip install simplejson
,pip install wheel
, andpip install pyblake2
(the latter is why you need Visual Studio; would be good to avoid that requirement);set BITCOIND=
path to zcashd.exeqa\rpc-tests
for %x in (*.py) do python %x