Skip to content
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

Errors when building with MSVC #67

Closed
hebasto opened this issue Oct 6, 2022 · 4 comments · Fixed by #72
Closed

Errors when building with MSVC #67

hebasto opened this issue Oct 6, 2022 · 4 comments · Fixed by #72

Comments

@hebasto
Copy link
Contributor

hebasto commented Oct 6, 2022

There is a minisketch_tests.cpp test in the Bitcoin Core project. Being built with MSVC, it fails in different scenarios:

A similar issue has been observed when using experimental CMake-based build system as well.

Another simple way to reproduce the issue is to build libminisketch without clmul instructions support, see this branch:

C:\Users\hebasto\bitcoin>build_msvc\x64\Release\test_bitcoin.exe -t minisketch_tests
Running 1 test case...
C:/Users/hebasto/bitcoin/src/test/minisketch_tests.cpp(43): fatal error: in "minisketch_tests/minisketch_test": critical check dec.has_value() has failed

*** 1 failure is detected in the test module "Bitcoin Core Test Suite"

C:\Users\hebasto\bitcoin>msbuild --version
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

17.2.1.25201

UPDATE: also see #67 (comment)

@hebasto
Copy link
Contributor Author

hebasto commented Oct 6, 2022

cc @sipsorcery

@hebasto
Copy link
Contributor Author

hebasto commented Oct 8, 2022

Using this branch, one can build this repository tests on Windows natively:

C:\Users\hebasto\minisketch>cmake -G "Visual Studio 17 2022" -A x64 -S . -B build
C:\Users\hebasto\minisketch>cmake --build build --config Release

And tests fail:

C:\Users\hebasto\minisketch>build\Release\test.exe
Running libminisketch tests with complexity=4
C:\Users\hebasto\minisketch\src\test.cpp:249: Check condition failed: bits * table_capacity[max_elements] >= fpbits

@sipsorcery
Copy link

@hebasto nothing stands out as a possible cause to me.

@hebasto
Copy link
Contributor Author

hebasto commented Oct 13, 2022

And tests fail:

For bits=1, fpbits=2, max_elements=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants