cmake: Add bitcoin-qt to Guix scripts#88
Conversation
|
|
||
| # Unsetting the CMAKE_PREFIX_PATH variable resolves linking issues | ||
| # with bitcoin-qt. This action is possible because other packages | ||
| # using Guix's cmake-build-system continue to build without issues. |
There was a problem hiding this comment.
resolves linking issues # with bitcoin-qt.
Can this be more specific? Why is this only needed in Guix? Is it fixed in later versions of Qt?
Guix's cmake-build-system continue to build without issues.
Is this guaranteed? Or just happens to work now by chance / might break in the future?
There was a problem hiding this comment.
resolves linking issues # with bitcoin-qt.
Can this be more specific?
Otherwise, the build/src/qt/CMakeFiles/bitcoin-qt.dir/link.txt contains -L/home/hebasto/.guix-profile/lib (on my machine), which results in errors noted by @TheCharlatan.
Why is this only needed in Guix?
Because Guix sets it to a value which does not work for us. For more details, please refer to https://mail.gnu.org/archive/html/guix-commits/2015-03/msg00518.html.
Is it fixed in later versions of Qt?
I don't know. Lurking through the https://bugreports.qt.io did not help much.
Guix's cmake-build-system continue to build without issues.
Is this guaranteed? Or just happens to work now by chance / might break in the future?
No guarantees. However, if any package, which uses Guix's cmake-build-system, fails to find its dependencies we still able to specify hint via the CMAKE_LIBRARY_PATH and/or CMAKE_INCLUDE_PATH environment variables.
As an alternative solution, we might consider the patching:
sed -i "s|-L${CMAKE_PREFIX_PATH}/lib||" build/src/qt/CMakeFiles/bitcoin-qt.dir/link.txtThere was a problem hiding this comment.
Otherwise, the build/src/qt/CMakeFiles/bitcoin-qt.dir/link.txt contains -L/home/hebasto/.guix-profile/lib (on my machine),
Ok, so this isn't really guix specific then, other than it's currently only been seen in Guix (i.e I assume a problematic -L could appear outside of a Guix build)? Shouldn't this be worked around by patching Qt in depends?
Because Guix sets it to a value which does not work for us.
You mean doesn't work for Qt? I assume the exact same problem would happen to anyone (outside of Guix) setting CMAKE_PREFIX_PATH to a value Qt doesn't like?
There was a problem hiding this comment.
Reworked. The CMAKE_PREFIX_PATH environment variable is not touched anymore.
|
Guix build (both x86_64 and arm64): |
6bd8789 to
23b9456
Compare
| `# Required to ignore the CMAKE_PREFIX_PATH environment` \ | ||
| `# variable set by Guix, which works for native search paths,` \ | ||
| `# but not for cross-compiling.` \ | ||
| -DCMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH=OFF \ |
There was a problem hiding this comment.
If this is needed, can it be set ealier / in depends and then passed down as part of the configuration? I assume anything built with CMake in depends could have this same problem? Setting this at this point, would make it seem like our depends configuration is leaky. The toolchain file/configuration it produces should not be looking outside of depends for anything?
There was a problem hiding this comment.
That was that I considered first. However, CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH=OFF disables other facilities the user might be interested in, for example the <PackageName>_DIR variable. And, in other non-controlled by Guix cases, the user is the one who is responsible for the CMAKE_PREFIX_PATH environment variable.
In other words, I think nothing is wrong with our depends. But Guix just overuses the CMAKE_PREFIX_PATH environment variable.
There was a problem hiding this comment.
for example the _DIR variable.
Discussed this offline. Usage of <PackageName>_DIR variable. is basically just reintroducing ALLOW_HOST_PACKAGES, which is not something we need to support (in depends).
There was a problem hiding this comment.
Reworked per the discussion above.
23b9456 to
6ed7dd1
Compare
|
Updated Guix build: |
|
Guix builds (x86): |
c40dbbb test: Move `script_assets_tests` into its own suite (Hennadii Stepanov) Pull request description: This PR ensures that the `script_assets_tests` test case is explicitly reported as "Skipped" when it is not run, making it clearer when running the test suite with `ctest`: - on the master branch @ 9355578: ``` $ env -u DIR_UNIT_TEST_DATA ctest --test-dir build -j 16 -R "^script_" Internal ctest changing into directory: /home/hebasto/git/bitcoin/build Test project /home/hebasto/git/bitcoin/build Start 87: script_tests Start 83: script_p2sh_tests Start 85: script_segwit_tests Start 86: script_standard_tests Start 84: script_parse_tests 1/5 Test #84: script_parse_tests ............... Passed 0.11 sec 2/5 Test #86: script_standard_tests ............ Passed 0.11 sec 3/5 Test #85: script_segwit_tests .............. Passed 0.12 sec 4/5 Test #83: script_p2sh_tests ................ Passed 0.12 sec 5/5 Test #87: script_tests ..................... Passed 0.36 sec 100% tests passed, 0 tests failed out of 5 Total Test time (real) = 0.37 sec ``` - with this PR: ``` $ env -u DIR_UNIT_TEST_DATA ctest --test-dir build -j 16 -R "^script_" Internal ctest changing into directory: /home/hebasto/git/bitcoin/build Test project /home/hebasto/git/bitcoin/build Start 83: script_assets_tests Start 88: script_tests Start 84: script_p2sh_tests Start 86: script_segwit_tests Start 87: script_standard_tests Start 85: script_parse_tests 1/6 Test #85: script_parse_tests ............... Passed 0.11 sec 2/6 Test #83: script_assets_tests ..............***Skipped 0.12 sec 3/6 Test #86: script_segwit_tests .............. Passed 0.11 sec 4/6 Test #87: script_standard_tests ............ Passed 0.11 sec 5/6 Test #84: script_p2sh_tests ................ Passed 0.12 sec 6/6 Test #88: script_tests ..................... Passed 0.36 sec 100% tests passed, 0 tests failed out of 6 Total Test time (real) = 0.37 sec The following tests did not run: 83 - script_assets_tests (Skipped) $ env DIR_UNIT_TEST_DATA=/home/hebasto/git/bitcoin/qa-assets/unit_test_data ctest --test-dir build -j 16 -R "^script_" Internal ctest changing into directory: /home/hebasto/git/bitcoin/build Test project /home/hebasto/git/bitcoin/build Start 83: script_assets_tests Start 88: script_tests Start 84: script_p2sh_tests Start 86: script_segwit_tests Start 87: script_standard_tests Start 85: script_parse_tests 1/6 Test #85: script_parse_tests ............... Passed 0.11 sec 2/6 Test #87: script_standard_tests ............ Passed 0.11 sec 3/6 Test #86: script_segwit_tests .............. Passed 0.11 sec 4/6 Test #84: script_p2sh_tests ................ Passed 0.12 sec 5/6 Test #88: script_tests ..................... Passed 0.35 sec 6/6 Test #83: script_assets_tests .............. Passed 1.58 sec 100% tests passed, 0 tests failed out of 6 Total Test time (real) = 1.58 sec ``` ACKs for top commit: maflcko: re-ACK c40dbbb 👈 ajtowns: ACK c40dbbb achow101: ACK c40dbbb Tree-SHA512: 25713e1c3b507b6f2a5fecc7b1ea285a6642b906c248769238a58fc0df48489ac5f7606778f9e3653b407b7f1d06563e1554d04321303b350c80eb888500cc5d
Resolves the #86 (review).