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

Windows cross-compile support #3172

Merged
merged 24 commits into from Aug 31, 2018

Conversation

@str4d
Contributor

str4d commented Apr 14, 2018

Usage on Debian / Ubuntu:

$ sudo apt install mingw-w64
$ sudo update-alternatives --config x86_64-w64-mingw32-gcc
(configure to use POSIX variant)
$ sudo update-alternatives --config x86_64-w64-mingw32-g++
(configure to use POSIX variant)
$ HOST=x86_64-w64-mingw32 ./zcutil/build.sh

Closes #489.

@str4d str4d added this to the v1.1.1 milestone Apr 14, 2018

@str4d str4d requested review from bitcartel and ianamunoz Apr 14, 2018

@str4d str4d added this to Implemented — Waiting for ACKs in Zcashd Team Apr 15, 2018

@mdr0id mdr0id self-requested a review Apr 16, 2018

@mdr0id

First review was due to config errors (POSIX alternatives) that didn't stick.

Rebuilding to provide review

@mdr0id

This comment has been minimized.

Show comment
Hide comment
@mdr0id

mdr0id Apr 16, 2018

Contributor

Tested ACK:

➜  zcash git:(mingw32) ll ./src/*.exe
-rwxrwxr-x 1 marsh marsh  13M Apr 16 09:28 ./src/zcash-cli.exe
-rwxrwxr-x 1 marsh marsh 187M Apr 16 09:28 ./src/zcashd.exe
-rwxrwxr-x 1 marsh marsh  33M Apr 16 09:28 ./src/zcash-tx.exe
Contributor

mdr0id commented Apr 16, 2018

Tested ACK:

➜  zcash git:(mingw32) ll ./src/*.exe
-rwxrwxr-x 1 marsh marsh  13M Apr 16 09:28 ./src/zcash-cli.exe
-rwxrwxr-x 1 marsh marsh 187M Apr 16 09:28 ./src/zcashd.exe
-rwxrwxr-x 1 marsh marsh  33M Apr 16 09:28 ./src/zcash-tx.exe
@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Apr 17, 2018

Contributor

Error when building on Ubuntu 16.04 derivative:

libbitcoin_server.a(libbitcoin_server_a-asyncrpcqueue.o): could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:2399: recipe for target 'zcashd.exe' failed
make[2]: *** [zcashd.exe] Error 1
/projects/zcash/depends/x86_64-w64-mingw32/share/../lib/libgtest.a(gtest-all.o): could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:2379: recipe for target 'zcash-gtest.exe' failed
make[2]: *** [zcash-gtest.exe] Error 1
Contributor

bitcartel commented Apr 17, 2018

Error when building on Ubuntu 16.04 derivative:

libbitcoin_server.a(libbitcoin_server_a-asyncrpcqueue.o): could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:2399: recipe for target 'zcashd.exe' failed
make[2]: *** [zcashd.exe] Error 1
/projects/zcash/depends/x86_64-w64-mingw32/share/../lib/libgtest.a(gtest-all.o): could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:2379: recipe for target 'zcash-gtest.exe' failed
make[2]: *** [zcash-gtest.exe] Error 1
@mdr0id

This comment has been minimized.

Show comment
Hide comment
@mdr0id

mdr0id Apr 17, 2018

Contributor

@bitcartel If you make clean and build again do you still get the above issues? I thought I saw a similar error that was due to inconsistencies in my mingw-w64-gcc and mingw-w64-g++.

Also what version of mingw-w64 are you using for this?

After sanity checking they were configured for POSIX variant, I was able to complete the build gracefully.

Contributor

mdr0id commented Apr 17, 2018

@bitcartel If you make clean and build again do you still get the above issues? I thought I saw a similar error that was due to inconsistencies in my mingw-w64-gcc and mingw-w64-g++.

Also what version of mingw-w64 are you using for this?

After sanity checking they were configured for POSIX variant, I was able to complete the build gracefully.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Apr 17, 2018

Contributor

@bitcartel also run make -C src/univalue clean, because it isn't correctly hooked up to the outer Makefile. I'll make a PR with bitcoin/bitcoin#6820 which fixed this.

Contributor

str4d commented Apr 17, 2018

@bitcartel also run make -C src/univalue clean, because it isn't correctly hooked up to the outer Makefile. I'll make a PR with bitcoin/bitcoin#6820 which fixed this.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Apr 17, 2018

Contributor

Hmm, I encountered a problem where even after cleaning, the first make failed, but a subsequent make succeeded. I'll see if I can reproduce it (might be related to using parallel make).

Contributor

str4d commented Apr 17, 2018

Hmm, I encountered a problem where even after cleaning, the first make failed, but a subsequent make succeeded. I'll see if I can reproduce it (might be related to using parallel make).

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Apr 18, 2018

Contributor

I think I identified the compilation issue: googletest wasn't picking up the correct compiler and linker. Now with this branch, after a make clean && make -C src/univalue clean compilation is successful first time.

Contributor

str4d commented Apr 18, 2018

I think I identified the compilation issue: googletest wasn't picking up the correct compiler and linker. Now with this branch, after a make clean && make -C src/univalue clean compilation is successful first time.

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Apr 18, 2018

Contributor

Executables get built:

src/zcash-cli.exe src/zcashd.exe src/zcash-gtest.exe src/zcash-tx.exe

But error:

libtool: error: Could not determine the host path corresponding to
libtool: error: '/projects/zcash/depends/x86_64-w64-mingw32/share/../lib:/projects/zcash/depends/x86_64-w64-mingw32/share/../bin'
libtool: error: Continuing, but uninstalled executables may not work.

Contributor

bitcartel commented Apr 18, 2018

Executables get built:

src/zcash-cli.exe src/zcashd.exe src/zcash-gtest.exe src/zcash-tx.exe

But error:

libtool: error: Could not determine the host path corresponding to
libtool: error: '/projects/zcash/depends/x86_64-w64-mingw32/share/../lib:/projects/zcash/depends/x86_64-w64-mingw32/share/../bin'
libtool: error: Continuing, but uninstalled executables may not work.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Apr 18, 2018

Contributor

@bitcartel if you build in non-threaded mode, you'll see those are for GenerateParams and CreateJoinSplit, old test executables that we should just delete.

Contributor

str4d commented Apr 18, 2018

@bitcartel if you build in non-threaded mode, you'll see those are for GenerateParams and CreateJoinSplit, old test executables that we should just delete.

@mdr0id mdr0id moved this from Implemented — Waiting for ACKs to Complete in Zcashd Team Apr 19, 2018

@mdr0id mdr0id moved this from Complete to Implemented — Waiting for ACKs in Zcashd Team Apr 25, 2018

@mdr0id mdr0id moved this from Implemented — Waiting for ACKs to In Progress in Zcashd Team Apr 25, 2018

@mdr0id mdr0id added the score: 2 label Apr 26, 2018

@mdr0id mdr0id moved this from In Progress to Blocked in Zcashd Team Apr 26, 2018

@radix42

This comment has been minimized.

Show comment
Hide comment
@radix42

radix42 Apr 29, 2018

Contributor

Note: cross compiling on Ubuntu 16.x is Not Recommended....it produces a zcashd.exe that functions, but as I've mentioned to @str4d in a private chat, in the past due to a bug in the cross compiling posix threading library the mingw toolchain uses, zcashd.exe will peg a CPU core even when idle. I don't know if he's had a chance to test if this behavior is still present in whatever updated version of the library may ship now with Ubuntu 16.x, but the bug is was NOT present in the older library version used by Debian Jessie, which I have been doing my production Windows cross-compiled builds on lo these many months.

I'm about to give it a whirl building with the PR's patches merged on my Jessie machine I do Windows builds on and will test shortly. I also have to spin up an Ubuntu 17.x VM in the next couple of days and can test build on that too.

Contributor

radix42 commented Apr 29, 2018

Note: cross compiling on Ubuntu 16.x is Not Recommended....it produces a zcashd.exe that functions, but as I've mentioned to @str4d in a private chat, in the past due to a bug in the cross compiling posix threading library the mingw toolchain uses, zcashd.exe will peg a CPU core even when idle. I don't know if he's had a chance to test if this behavior is still present in whatever updated version of the library may ship now with Ubuntu 16.x, but the bug is was NOT present in the older library version used by Debian Jessie, which I have been doing my production Windows cross-compiled builds on lo these many months.

I'm about to give it a whirl building with the PR's patches merged on my Jessie machine I do Windows builds on and will test shortly. I also have to spin up an Ubuntu 17.x VM in the next couple of days and can test build on that too.

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot May 4, 2018

Contributor

☔️ The latest upstream changes (presumably #2894) made this pull request unmergeable. Please resolve the merge conflicts.

Contributor

zkbot commented May 4, 2018

☔️ The latest upstream changes (presumably #2894) made this pull request unmergeable. Please resolve the merge conflicts.

@radix42

This comment has been minimized.

Show comment
Hide comment
@radix42

radix42 May 5, 2018

Contributor

After the testing I've done so far on multiple Windows 10 and Windows Server 2k16 machines building this branch, here's what I've found so far:
Ubuntu 16.x: everything builds fine, but the pthreads bug in mingw IS present, and it'll peg a core's worth of CPU (100% on a single core machine, 50% on dual core, etc)
Ubuntu 18.x: zcashd.exe, zcash-cli.exe and zcash-tx.exe build fine and do NOT have the pthread bug, woohoo! But the gtest exe does not build for some reason, and I haven't gotten to the bottom of that yet

I am still setting up my new Debian Stretch system to see if it builds and has the mingw pthread bug or not, but this branch does NOT build on Debian Jessie, at least not my build machine that's been stable for a long time and done many production mingw builds of zcash and forks. Note that zcash forks that track recent code (up to 1.0.14 from upstream zcash) also do NOT build on Jessie, and have the same results for builds on Ubuntu 16 and 18.

Contributor

radix42 commented May 5, 2018

After the testing I've done so far on multiple Windows 10 and Windows Server 2k16 machines building this branch, here's what I've found so far:
Ubuntu 16.x: everything builds fine, but the pthreads bug in mingw IS present, and it'll peg a core's worth of CPU (100% on a single core machine, 50% on dual core, etc)
Ubuntu 18.x: zcashd.exe, zcash-cli.exe and zcash-tx.exe build fine and do NOT have the pthread bug, woohoo! But the gtest exe does not build for some reason, and I haven't gotten to the bottom of that yet

I am still setting up my new Debian Stretch system to see if it builds and has the mingw pthread bug or not, but this branch does NOT build on Debian Jessie, at least not my build machine that's been stable for a long time and done many production mingw builds of zcash and forks. Note that zcash forks that track recent code (up to 1.0.14 from upstream zcash) also do NOT build on Jessie, and have the same results for builds on Ubuntu 16 and 18.

@radix42

This comment has been minimized.

Show comment
Hide comment
@radix42

radix42 May 5, 2018

Contributor

Here are links to my test builds of this branch built on Xenial and Bionic, and screenshots of them both sitting there idling (as much as the wallet on this machine can be said to ever be idle!), with the CPU difference being clearly visible:
https://zcash.mercerweiss.com/zcash-win-v1.1.0-str4d-bionic.zip
https://zcash.mercerweiss.com/zcash-win-v1.1.0-str4d-xenial.zip

zcashd-1 1 0-str4d-bionic
zcashd-1 1 0-str4d-xenial

Contributor

radix42 commented May 5, 2018

Here are links to my test builds of this branch built on Xenial and Bionic, and screenshots of them both sitting there idling (as much as the wallet on this machine can be said to ever be idle!), with the CPU difference being clearly visible:
https://zcash.mercerweiss.com/zcash-win-v1.1.0-str4d-bionic.zip
https://zcash.mercerweiss.com/zcash-win-v1.1.0-str4d-xenial.zip

zcashd-1 1 0-str4d-bionic
zcashd-1 1 0-str4d-xenial

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Aug 30, 2018

Contributor

⌛️ Testing commit 6c6ed24 with merge 8571211...

Contributor

zkbot commented Aug 30, 2018

⌛️ Testing commit 6c6ed24 with merge 8571211...

zkbot added a commit that referenced this pull request Aug 30, 2018

Auto merge of #3172 - str4d:mingw32, r=str4d
Windows cross-compile support

Usage on Debian / Ubuntu:

> $ sudo apt install mingw-w64
> $ sudo update-alternatives --config x86_64-w64-mingw32-gcc
> (configure to use POSIX variant)
> $ sudo update-alternatives --config x86_64-w64-mingw32-g++
> (configure to use POSIX variant)
> $ HOST=x86_64-w64-mingw32 ./zcutil/build.sh

Closes #489.
@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Aug 30, 2018

Contributor

💔 Test failed - pr-merge

Contributor

zkbot commented Aug 30, 2018

💔 Test failed - pr-merge

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

Hmm, some of those final type changes weren't reflected in some tests. I'm surprised that it compiled locally though... Fixing.

Contributor

str4d commented Aug 30, 2018

Hmm, some of those final type changes weren't reflected in some tests. I'm surprised that it compiled locally though... Fixing.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

Ah, it does still compile locally; there's just a compile-time merge conflict with master.

Contributor

str4d commented Aug 30, 2018

Ah, it does still compile locally; there's just a compile-time merge conflict with master.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

Oho! No, I fell victim to my own change. This PR removes --enable-werror from the default build configuration (due to unavoidable Windows warnings), but CI has been updated to keep enforcing it on Unix systems. The CI error is a warning locally that my build was moving past. At least this shows that CI's enforcement is working properly 😂

Contributor

str4d commented Aug 30, 2018

Oho! No, I fell victim to my own change. This PR removes --enable-werror from the default build configuration (due to unavoidable Windows warnings), but CI has been updated to keep enforcing it on Unix systems. The CI error is a warning locally that my build was moving past. At least this shows that CI's enforcement is working properly 😂

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

Okay, here are the errors with corresponding lines:

    EXPECT_LT(quotient.num_bits(), GMP_NUMB_BITS);
In file included from libsnark/algebra/fields/tests/test_bigint.cpp:10:0:
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperLT(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
libsnark/algebra/fields/tests/test_bigint.cpp:62:5:   required from here
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1526:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1510:7:
   if (val1 op val2) {\
       ~~~~~~~~~
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1526:28:
 GTEST_IMPL_CMP_HELPER_(LT, <);
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1510:12: note: in definition of macro ‘GTEST_IMPL_CMP_HELPER_’
   if (val1 op val2) {\
            ^~
    EXPECT_EQ(FieldT::extension_degree() % 2, 0);
In file included from libsnark/algebra/fields/tests/test_fields.cpp:15:0:
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1421:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
libsnark/algebra/fields/tests/test_fields.cpp:91:5:   required from ‘void test_unitary_inverse() [with FieldT = libsnark::Fp12_2over3over2_model<4, ((const libsnark::bigint<4>&)(& libsnark::alt_bn128_modulus_q))>]’
libsnark/algebra/fields/tests/test_fields.cpp:112:36:   required from ‘void test_all_fields() [with ppT = libsnark::alt_bn128_pp]’
libsnark/algebra/fields/tests/test_fields.cpp:184:35:   required from here
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1392:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   if (lhs == rhs) {
       ~~~~^~~~~~

In both cases, the LHS evaluates to size_t, and the RHS is a constant. The compiler is evaluating both RHSs to int, and the size_t to long unsigned int (on the Unix systems that are failing), and giving a signed-to-unsigned-comparison warning that becomes an error.

I'm confused because neither of these lines (or the functions they call) have been changed in this PR.

Contributor

str4d commented Aug 30, 2018

Okay, here are the errors with corresponding lines:

    EXPECT_LT(quotient.num_bits(), GMP_NUMB_BITS);
In file included from libsnark/algebra/fields/tests/test_bigint.cpp:10:0:
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperLT(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
libsnark/algebra/fields/tests/test_bigint.cpp:62:5:   required from here
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1526:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1510:7:
   if (val1 op val2) {\
       ~~~~~~~~~
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1526:28:
 GTEST_IMPL_CMP_HELPER_(LT, <);
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1510:12: note: in definition of macro ‘GTEST_IMPL_CMP_HELPER_’
   if (val1 op val2) {\
            ^~
    EXPECT_EQ(FieldT::extension_degree() % 2, 0);
In file included from libsnark/algebra/fields/tests/test_fields.cpp:15:0:
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1421:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
libsnark/algebra/fields/tests/test_fields.cpp:91:5:   required from ‘void test_unitary_inverse() [with FieldT = libsnark::Fp12_2over3over2_model<4, ((const libsnark::bigint<4>&)(& libsnark::alt_bn128_modulus_q))>]’
libsnark/algebra/fields/tests/test_fields.cpp:112:36:   required from ‘void test_all_fields() [with ppT = libsnark::alt_bn128_pp]’
libsnark/algebra/fields/tests/test_fields.cpp:184:35:   required from here
/mnt/c/Users/me/Documents/dev/zcash/zcash/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:1392:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   if (lhs == rhs) {
       ~~~~^~~~~~

In both cases, the LHS evaluates to size_t, and the RHS is a constant. The compiler is evaluating both RHSs to int, and the size_t to long unsigned int (on the Unix systems that are failing), and giving a signed-to-unsigned-comparison warning that becomes an error.

I'm confused because neither of these lines (or the functions they call) have been changed in this PR.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

Aha! I've figured out the problem: we've always had the above warnings. You can see them in current passing builds. The reason we've never failed on them before is we weren't passing -Werror through to the libsnark compiler. One of the build system changes in this PR fixes that, so we now hit it 🙃

I'll push a fix that ensures the constants used in the test comparisons are unsigned.

Contributor

str4d commented Aug 30, 2018

Aha! I've figured out the problem: we've always had the above warnings. You can see them in current passing builds. The reason we've never failed on them before is we weren't passing -Werror through to the libsnark compiler. One of the build system changes in this PR fixes that, so we now hit it 🙃

I'll push a fix that ensures the constants used in the test comparisons are unsigned.

str4d added some commits Aug 30, 2018

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

After fixing the unsigned warnings, I uncovered and fixed a printf format warning. Now I get full builds locally on Ubuntu with CONFIGURE_FLAGS=--enable-werror 😃

Contributor

str4d commented Aug 30, 2018

After fixing the unsigned warnings, I uncovered and fixed a printf format warning. Now I get full builds locally on Ubuntu with CONFIGURE_FLAGS=--enable-werror 😃

@daira

daira approved these changes Aug 30, 2018

ACK c53defd and e47ccf2

@mdr0id

mdr0id approved these changes Aug 30, 2018

ACK

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Aug 30, 2018

Contributor

Who's up for round two?

@zkbot r+

Contributor

str4d commented Aug 30, 2018

Who's up for round two?

@zkbot r+

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Aug 30, 2018

Contributor

📌 Commit e47ccf2 has been approved by str4d

Contributor

zkbot commented Aug 30, 2018

📌 Commit e47ccf2 has been approved by str4d

zkbot added a commit that referenced this pull request Aug 30, 2018

Auto merge of #3172 - str4d:mingw32, r=str4d
Windows cross-compile support

Usage on Debian / Ubuntu:

> $ sudo apt install mingw-w64
> $ sudo update-alternatives --config x86_64-w64-mingw32-gcc
> (configure to use POSIX variant)
> $ sudo update-alternatives --config x86_64-w64-mingw32-g++
> (configure to use POSIX variant)
> $ HOST=x86_64-w64-mingw32 ./zcutil/build.sh

Closes #489.
@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Aug 30, 2018

Contributor

⌛️ Testing commit e47ccf2 with merge 12c1156...

Contributor

zkbot commented Aug 30, 2018

⌛️ Testing commit e47ccf2 with merge 12c1156...

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Aug 31, 2018

Contributor

☀️ Test successful - pr-merge
Approved by: str4d
Pushing 12c1156 to master...

Contributor

zkbot commented Aug 31, 2018

☀️ Test successful - pr-merge
Approved by: str4d
Pushing 12c1156 to master...

@zkbot zkbot merged commit e47ccf2 into zcash:master Aug 31, 2018

1 check passed

homu Test successful
Details

Zcashd Team automation moved this from In Review to Released (Merged in Master) Aug 31, 2018

@mdr0id

This comment has been minimized.

Show comment
Hide comment
@mdr0id

mdr0id Aug 31, 2018

Contributor
Contributor

mdr0id commented Aug 31, 2018

@str4d str4d deleted the str4d:mingw32 branch Aug 31, 2018

@Tomas-M

This comment has been minimized.

Show comment
Hide comment
@Tomas-M

Tomas-M Oct 14, 2018

Contributor

This makes zcash cross-compile for Windows, but sending shielded transactions is broken. Is there any other issue here on github to discuss that?

Contributor

Tomas-M commented Oct 14, 2018

This makes zcash cross-compile for Windows, but sending shielded transactions is broken. Is there any other issue here on github to discuss that?

@radix42

This comment has been minimized.

Show comment
Hide comment
@radix42

radix42 Oct 14, 2018

Contributor
Contributor

radix42 commented Oct 14, 2018

@Tomas-M

This comment has been minimized.

Show comment
Hide comment
@Tomas-M

Tomas-M Oct 15, 2018

Contributor

@radix42 Ah, I was not synced. Thank you for heads up! :) Now I can confirm sending shielded transactions work fine. Compiled zcash 2.0.1 on Ubuntu 18.04, all ok

Contributor

Tomas-M commented Oct 15, 2018

@radix42 Ah, I was not synced. Thank you for heads up! :) Now I can confirm sending shielded transactions work fine. Compiled zcash 2.0.1 on Ubuntu 18.04, all ok

@perol

This comment has been minimized.

Show comment
Hide comment
@perol

perol Oct 16, 2018

Windows cross-compile failed on debian stretch

$ sudo apt install mingw-w64
$ sudo update-alternatives --config x86_64-w64-mingw32-gcc
(configure to use POSIX variant)
$ sudo update-alternatives --config x86_64-w64-mingw32-g++
(configure to use POSIX variant)

$ HOST=x86_64-w64-mingw32 ./zcutil/build.sh -j4
...
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.
/usr/bin/x86_64-w64-mingw32-ld: BFD (GNU Binutils) 2.28 assertion fail ../../../upstream/bfd/cofflink.c:265
Makefile:2406: recipe for target 'zcash-tx.exe' failed
make[2]: *** [zcash-tx.exe] Error 1
make[2]: *** Waiting for unfinished jobs....
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.
/usr/bin/x86_64-w64-mingw32-ld: BFD (GNU Binutils) 2.28 assertion fail ../../../upstream/bfd/cofflink.c:265
Makefile:2314: recipe for target 'zcash-cli.exe' failed
make[2]: *** [zcash-cli.exe] Error 1
mv -f wallet/gtest/.deps/zcash_gtest-test_wallet.Tpo wallet/gtest/.deps/zcash_gtest-test_wallet.Po
make[2]: Leaving directory '/media/perol/MYDATA/zcash/src'
Makefile:5758: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/perol/MYDATA/zcash/src'
Makefile:627: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

perol commented Oct 16, 2018

Windows cross-compile failed on debian stretch

$ sudo apt install mingw-w64
$ sudo update-alternatives --config x86_64-w64-mingw32-gcc
(configure to use POSIX variant)
$ sudo update-alternatives --config x86_64-w64-mingw32-g++
(configure to use POSIX variant)

$ HOST=x86_64-w64-mingw32 ./zcutil/build.sh -j4
...
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.
/usr/bin/x86_64-w64-mingw32-ld: BFD (GNU Binutils) 2.28 assertion fail ../../../upstream/bfd/cofflink.c:265
Makefile:2406: recipe for target 'zcash-tx.exe' failed
make[2]: *** [zcash-tx.exe] Error 1
make[2]: *** Waiting for unfinished jobs....
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.
/usr/bin/x86_64-w64-mingw32-ld: BFD (GNU Binutils) 2.28 assertion fail ../../../upstream/bfd/cofflink.c:265
Makefile:2314: recipe for target 'zcash-cli.exe' failed
make[2]: *** [zcash-cli.exe] Error 1
mv -f wallet/gtest/.deps/zcash_gtest-test_wallet.Tpo wallet/gtest/.deps/zcash_gtest-test_wallet.Po
make[2]: Leaving directory '/media/perol/MYDATA/zcash/src'
Makefile:5758: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/perol/MYDATA/zcash/src'
Makefile:627: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

@radix42

This comment has been minimized.

Show comment
Hide comment
@radix42

radix42 Oct 16, 2018

Contributor
Contributor

radix42 commented Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment