Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Feb 8, 2021

On master (e51f6c4, after #20936 merge), Windows cross compiling fails:

$ make > /dev/null
In file included from ./policy/fees.h:12,
                 from policy/fees.cpp:6:
policy/fees.cpp: In member function ‘unsigned int CBlockPolicyEstimator::HighestTargetTracked(FeeEstimateHorizon) const’:
./sync.h:232:104: warning: control reaches end of non-void function [-Wreturn-type]
  232 | #define LOCK(cs) DebugLock<decltype(cs)> PASTE2(criticalblock, __COUNTER__)(cs, #cs, __FILE__, __LINE__)
      |                                                                                                        ^
policy/fees.cpp:680:5: note: in expansion of macro ‘LOCK’
  680 |     LOCK(m_cs_fee_estimator);
      |     ^~~~
test/fuzz/netaddress.cpp:12:10: fatal error: netinet/in.h: No such file or directory
   12 | #include <netinet/in.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:13039: test/fuzz/fuzz-netaddress.o] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
test/fuzz/string.cpp: In function ‘void string_fuzz_target(FuzzBufferType)’:
test/fuzz/string.cpp:81:11: error: ‘ShellEscape’ was not declared in this scope
   81 |     (void)ShellEscape(random_string_1);
      |           ^~~~~~~~~~~
make[2]: *** [Makefile:13543: test/fuzz/fuzz-string.o] Error 1
make[1]: *** [Makefile:15078: all-recursive] Error 1
make: *** [Makefile:812: all-recursive] Error 1

This PR fixes both of errors.

@fanquake fanquake added the Tests label Feb 8, 2021
@maflcko
Copy link
Member

maflcko commented Feb 8, 2021

Could remove --disable-fuzz-binary from the ci config to show that it works now?

@hebasto
Copy link
Member Author

hebasto commented Feb 8, 2021

Could remove --disable-fuzz-binary from the ci config to show that it works now?

Done.

@maflcko
Copy link
Member

maflcko commented Feb 8, 2021

Looks like this still fails:

  CXXLD    test/fuzz/fuzz.exe
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/../../../../x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): In function `main':
./mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain'
collect2: error: ld returned 1 exit status
Makefile:5240: recipe for target 'test/fuzz/fuzz.exe' failed

@hebasto
Copy link
Member Author

hebasto commented Feb 8, 2021

Could remove --disable-fuzz-binary from the ci config to show that it works now?

Done.

Reverted back.

@maflcko
Copy link
Member

maflcko commented Feb 8, 2021

cr ACK 723eb43

@fanquake fanquake merged commit d864696 into bitcoin:master Feb 9, 2021
@hebasto hebasto deleted the 210208-win branch February 9, 2021 09:07
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 9, 2021
723eb43 test: Fix Windows cross build (Hennadii Stepanov)

Pull request description:

  On master (e51f6c4, after bitcoin#20936 merge), Windows cross compiling fails:
  ```
  $ make > /dev/null
  In file included from ./policy/fees.h:12,
                   from policy/fees.cpp:6:
  policy/fees.cpp: In member function ‘unsigned int CBlockPolicyEstimator::HighestTargetTracked(FeeEstimateHorizon) const’:
  ./sync.h:232:104: warning: control reaches end of non-void function [-Wreturn-type]
    232 | #define LOCK(cs) DebugLock<decltype(cs)> PASTE2(criticalblock, __COUNTER__)(cs, #cs, __FILE__, __LINE__)
        |                                                                                                        ^
  policy/fees.cpp:680:5: note: in expansion of macro ‘LOCK’
    680 |     LOCK(m_cs_fee_estimator);
        |     ^~~~
  test/fuzz/netaddress.cpp:12:10: fatal error: netinet/in.h: No such file or directory
     12 | #include <netinet/in.h>
        |          ^~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [Makefile:13039: test/fuzz/fuzz-netaddress.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
  test/fuzz/string.cpp: In function ‘void string_fuzz_target(FuzzBufferType)’:
  test/fuzz/string.cpp:81:11: error: ‘ShellEscape’ was not declared in this scope
     81 |     (void)ShellEscape(random_string_1);
        |           ^~~~~~~~~~~
  make[2]: *** [Makefile:13543: test/fuzz/fuzz-string.o] Error 1
  make[1]: *** [Makefile:15078: all-recursive] Error 1
  make: *** [Makefile:812: all-recursive] Error 1
  ```

  This PR fixes both of errors.

ACKs for top commit:
  MarcoFalke:
    cr ACK 723eb43

Tree-SHA512: 5d2fba5ca806e64bf92011786d1f868c6624f786bfa753a10316feab7a802a28ec27a4bd25fc26dc289a399895a521c3878ffa1efeff0e540c7245cdb8e4942c
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants