[build] Add risc-v support to gitian #13665
pull ken2812221 wants to merge 2 commits into bitcoin:master from ken2812221:gitian-risc-v changing 12 files +72 −16-
ken2812221 commented at 4:08 am on July 15, 2018: contributorBased on ~#13660~ #13710 , add gitian tarball for RISC-V
-
fanquake added the label Build system on Jul 15, 2018
-
fanquake requested review from laanwj on Jul 16, 2018
-
DrahtBot added the label Needs rebase on Jul 16, 2018
-
ken2812221 force-pushed on Jul 16, 2018
-
laanwj commented at 2:26 pm on July 17, 2018: memberACK but only after we can compile with a compiler that doesn’t produce a broken
test_bitcoin
. If inlining is broken, who knows what other bugs are introduced. (see #13543 (comment) and following comments) Maybe Ubuntu will provide a newer version of gcc at some point. -
DrahtBot removed the label Needs rebase on Jul 17, 2018
-
ken2812221 force-pushed on Jul 18, 2018
-
ken2812221 commented at 8:16 pm on July 18, 2018: contributor@laanwj How about force it to use gcc-8?
-
laanwj commented at 2:09 pm on July 19, 2018: memberYes, that was what I meant. But how?
-
ken2812221 commented at 3:44 pm on July 19, 2018: contributorJust see what I do in the fourth commit.
-
laanwj commented at 4:38 pm on July 19, 2018: member
Didn’t know that a package for that was available! Can someone confirm that the resulting
test_bitcoin
runs without issues?Edit: interesting; I wonder if this is the only way to get the
-8
variant to be used. If there’s no update-alternatives incantation to update the symlinks. This would be more convenient for the build guide.Edit no, apparently the risc-v compiler packages do not provide alternatives
-
MarcoFalke added the label Needs gitian build on Jul 19, 2018
-
laanwj commented at 4:55 pm on July 19, 2018: memberConcept ACK
-
laanwj requested review from theuni on Jul 19, 2018
-
ken2812221 force-pushed on Jul 19, 2018
-
in contrib/gitian-descriptors/gitian-linux.yml:23 in 0b2248cdcf outdated
24+- "g++-riscv64-linux-gnu" 25+- "g++-8-riscv64-linux-gnu" 26+- "gcc-8-riscv64-linux-gnu" 27+- "binutils-riscv64-linux-gnu" 28+- "g++-8-multilib" 29+- "gcc-8-multilib"
theuni commented at 5:49 pm on July 19, 2018:I suspect that this will cause more glibc back-compat issues. That’s fine, of course, they just need to be accounted for.
ken2812221 commented at 6:16 pm on July 19, 2018:I’ve tested this.make -C src check-symbol
is happy about this in gitian build.in depends/packages/qt.mk:95 in 0b2248cdcf outdated
91@@ -92,6 +92,8 @@ $(package)_config_opts_linux += -no-opengl 92 $(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ 93 $(package)_config_opts_i686_linux = -xplatform linux-g++-32 94 $(package)_config_opts_x86_64_linux = -xplatform linux-g++-64 95+$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
theuni commented at 5:51 pm on July 19, 2018:This shouldn’t be needed after #13696 (comment).
ken2812221 commented at 6:17 pm on July 19, 2018:This is not my commit, just based on #13696in src/compat/glibc_compat.cpp:70 in 0b2248cdcf outdated
66@@ -67,6 +67,8 @@ __asm(".symver log2f_old,log2f@GLIBC_2.2.5"); 67 __asm(".symver log2f_old,log2f@GLIBC_2.4"); 68 #elif defined(__aarch64__) 69 __asm(".symver log2f_old,log2f@GLIBC_2.17"); 70+#elif defined(__riscv)
theuni commented at 5:52 pm on July 19, 2018:Is this necessary? We don’t have to support much back-compat for riscv, as its glibc support is pretty new anyway.
ken2812221 commented at 6:17 pm on July 19, 2018:This might not be necessary. But we should drop--enable-glibc-back-compat
flag when building for RISC-V
laanwj commented at 6:39 pm on July 19, 2018:I think he did this to appease the symbols check, the alternative would be to do a different symbols check per target platform.
ken2812221 commented at 6:45 pm on July 19, 2018:I did this so the linker would know whatlog2f_old
is.theuni commented at 5:55 pm on July 19, 2018: memberConcept ACK, but I don’t think it’s wise for us to be producing supported binaries for a platform that’s still going through teething issues with compilers. Especially since so few people are able to test.
I’m all for it for 0.18, but -1 from me for 0.17.
laanwj added this to the milestone 0.18.0 on Jul 20, 2018laanwj commented at 10:05 am on July 20, 2018: memberI’m all for it for 0.18, but -1 from me for 0.17.
Added appropriate milestone
DrahtBot removed the label Needs gitian build on Jul 21, 2018ken2812221 renamed this:
[build] Add risc-v support to gitian
[WIP][build] Add risc-v support to gitian
on Jul 22, 2018DrahtBot added the label Needs rebase on Jul 29, 2018ken2812221 force-pushed on Aug 6, 2018DrahtBot removed the label Needs rebase on Aug 6, 2018MarcoFalke deleted a comment on Aug 7, 2018MarcoFalke added the label Needs gitian build on Aug 7, 2018DrahtBot removed the label Needs gitian build on Aug 8, 2018MarcoFalke commented at 4:43 pm on August 8, 2018: membergitian linux failure:
0ERROR: Feature 'system-zlib' was enabled, but the pre-condition 'libs.zlib' failed. 1 2ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && libs.openssl' failed. 3 4ERROR: Feature 'xcb' was enabled, but the pre-condition 'libs.xcb' failed. 5 6ERROR: Feature 'system-freetype' was enabled, but the pre-condition 'features.freetype && libs.freetype' failed. 7 8ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.win32 && !config.darwin && features.system-freetype && libs.fontconfig' failed. 9funcs.mk:242: recipe for target '/home/ubuntu/build/bitcoin/depends/work/build/riscv64-linux-gnu/qt/5.9.6-c69c157d1d9/qtbase/.stamp_configured' failed 10make: *** [/home/ubuntu/build/bitcoin/depends/work/build/riscv64-linux-gnu/qt/5.9.6-c69c157d1d9/qtbase/.stamp_configured] Error 3 11make: Leaving directory '/home/ubuntu/build/bitcoin/depends'
[depends] Add riscv qt depends support for cross compiling bitcoin-qt 96dda8b058Add risc-v 64-bit to gitian c4aecd1d80ken2812221 force-pushed on Aug 8, 2018ken2812221 commented at 7:36 pm on August 8, 2018: contributor@MarcoFalke Sry, missing one line during rebasing #13710MarcoFalke deleted a comment on Aug 8, 2018MarcoFalke added the label Needs gitian build on Aug 8, 2018DrahtBot removed the label Needs gitian build on Aug 9, 2018ken2812221 commented at 5:37 am on August 9, 2018: contributor@MarcoFalke @DrahtBot fetch the wrong commit.MarcoFalke deleted a comment on Aug 9, 2018MarcoFalke added the label Needs gitian build on Aug 9, 2018DrahtBot removed the label Needs gitian build on Aug 10, 2018laanwj commented at 4:20 pm on August 15, 2018: memberWhat is the reason this is still WIP? would like to merge this early in the 0.18 cycle if possible. (going to test)ken2812221 commented at 4:31 pm on August 15, 2018: contributorlaanwj commented at 8:50 am on August 16, 2018: memberI’m not sure how worried we should be about exporting unnecessary symbols on RISC-V at this point, from what I gather everything is still extremely experimental, there aren’t even ready-to-use linux distribution images.
The “don’t export unnecessary symbols” check was, at the time, added to avoid collisions between statically-linked and dynamically-linked OpenSSL, back in the day that Qt was still linked dynamically. This is no longer an actual issue. Now it’s only a “nice” sanity and hygiene check, to avoid the overhead of huge unnecessary symbol tables in an executable.
So I don’t think that needs to hold back progress, seems like be something that is improved in a later PR, but I’ll leave it up to you.
ken2812221 renamed this:
[WIP][build] Add risc-v support to gitian
[build] Add risc-v support to gitian
on Aug 16, 2018ken2812221 commented at 10:52 am on August 16, 2018: contributor@laanwj Thanks for clarification. The export symbol things can be done in future PR. At least I can’t solve the problem for now, leave for someone who can work on improving this.MarcoFalke added the label Needs gitian build on Aug 16, 2018laanwj commented at 6:32 pm on August 16, 2018: memberACK c4aecd1d8 gitian build result tested on actual hardware (HiFive Unleashed=U540) w/ Fedora release 29 (Rawhide):
0# ./test_bitcoin 1Running 303 test cases... 2test/scheduler_tests.cpp(141): info: counter2++ 3test/scheduler_tests.cpp(141): info: counter2++ 4test/scheduler_tests.cpp(145): info: == 5test/scheduler_tests.cpp(145): info: i 6*** No errors detected
Also synced the beginning of the chain, I’ll keep this node running.
Going to merge this because I want to keep building for RISC-V on the 0.18 branch. If any issues come up we can revert this before the 0.18.0 release.
ken2812221 referenced this in commit 3c8d1ae153 on Aug 16, 2018laanwj merged this on Aug 16, 2018laanwj closed this on Aug 16, 2018
ken2812221 deleted the branch on Aug 16, 2018MarcoFalke removed the label Needs gitian build on Aug 17, 2018laanwj commented at 5:36 am on August 23, 2018: memberAlso synced the beginning of the chain, I’ll keep this node running.
This was successful! Synchronization of the full chain on the HiFive Unleashed board to a nbd partition took about 2-3 days. (had to restart at some point as there were problems with the SD card interface or driver, but there were zero issues with bitcoind)
MarcoFalke deleted a comment on Aug 23, 2018MarcoFalke deleted a comment on Aug 23, 2018Munkybooty referenced this in commit ca1010210a on Sep 8, 2021MarcoFalke locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me