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

functional_tests: fix linking on Windows #4492

Merged

Conversation

iDunk5400
Copy link
Contributor

No description provided.

@moneromooo-monero
Copy link
Collaborator

Should this be detected, or is this a "standard" thing ?

@iDunk5400
Copy link
Contributor Author

One of the commits merged today causes performance_tests linking to fail in MSYS2.

[100%] Linking CXX executable functional_tests.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/functional_tests.dir/objects.a(transactions_flow_test.cpp.obj):transactions_flow_test.cpp:(.text+0x1161): undefined reference to `BCryptOpenAlgorithmProvider'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/functional_tests.dir/objects.a(transactions_flow_test.cpp.obj):transactions_flow_test.cpp:(.text+0x1184): undefined reference to `BCryptGenRandom'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/functional_tests.dir/objects.a(transactions_flow_test.cpp.obj):transactions_flow_test.cpp:(.text+0x11d7): undefined reference to `BCryptCloseAlgorithmProvider'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/functional_tests.dir/objects.a(transactions_flow_test.cpp.obj):transactions_flow_test.cpp:(.text+0x12e0): undefined reference to `BCryptCloseAlgorithmProvider'
collect2.exe: error: ld returned 1 exit status

All three undefined references are provided by bcrypt library, according to Microsoft.
https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/nf-bcrypt-bcryptopenalgorithmprovider
https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/nf-bcrypt-bcryptclosealgorithmprovider
https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/nf-bcrypt-bcryptgenrandom
If this can be detected instead, that would be great.

Copy link
Collaborator

@moneromooo-monero moneromooo-monero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, maybe someone will come up with that. This patch fixes at least one machine, let's see if it breaks another.

Copy link
Contributor

@fluffypony fluffypony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@fluffypony fluffypony merged commit 7f2ad1a into monero-project:master Oct 5, 2018
fluffypony added a commit that referenced this pull request Oct 5, 2018
7f2ad1a functional_tests: fix linking on Windows (iDunk5400)
fluffypony added a commit that referenced this pull request Oct 6, 2018
7f2ad1a functional_tests: fix linking on Windows (iDunk5400)
fotolockr pushed a commit to fotolockr/monero that referenced this pull request May 1, 2019
7f2ad1a functional_tests: fix linking on Windows (iDunk5400)
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 this pull request may close these issues.

3 participants