-
Notifications
You must be signed in to change notification settings - Fork 64
Conversation
An alternative would be to use the https://github.com/bitcoin-core/bitcoin-devwiki/wiki |
The wiki can be edited by everyone; I considered that, but found that too scary as long as it encourages downloading something. |
Good point. Approach ACK |
Concept ACK, thanks for writing this up. I will read through shortly, and actually install / test in a day or two. |
tar -zxvf qemu-riscv64-libs.tar.gz | ||
``` | ||
|
||
(TODO: get this files directly from the packages instead of from wumpus' server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some distributions might even already have a package that provides these, for cross-architecture. e.g. https://wiki.debian.org/RISC-V mentions:
$ sudo dpkg --add-architecture riscv64
$ sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
$ sudo sh -c "cat >/etc/ld.so.conf.d/riscv64-linux-gnu.conf <<EOF
/usr/local/lib/riscv64-linux-gnu
/lib/riscv64-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/riscv64-linux-gnu/lib/
EOF
"
$ sudo ln -s /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib
I haven't tried this.
The advantage would be that it allows for "does it work on $DISTRO" (e.g. the specific libc libm etc versions) testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few general comments. Setup and compiling QEMU on debian:buster works as expected. Having issues with shared libraries when running bitcoind
, will investigate soon.
Dependencies for debian: | ||
|
||
```bash | ||
apt install libglib2.0-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's probably assumed, but could add clang
, git
, make
& wget
here if testing on a slim/minimal install.
```bash | ||
mkdir -p /usr/gnemul | ||
cd /usr/gnemul | ||
wget https://dev.visucore.com/bitcoin/qemu-riscv64-libs.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whilst we are still downloading from wumpus
's server, should we atleast have a sha256sum
to check against?
RISC-V shared libraries | ||
------------------------ | ||
|
||
As bitcoin doesn't distribute fully static executables you need part of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/bitcoin/Bitcoin Core
|
||
This is efficient for testing because it makes it unnecessary to install a whole VM. | ||
|
||
It also makes it possible to control extactly what libraries are available to prevent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/extactly/exactly
Launching bitcoin | ||
------------------ | ||
|
||
After this, bitcoin, or the unit tests, can be launched as normal with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/bitcoin/bitcoind
libgcc_s.so.1 -> libgcc_s-9-20190503.so.1 | ||
libc.so.6 -> libc-2.29.9000.so | ||
|
||
To make them available you could download the archive of previous section and do: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/of/from the
Closing due to inactivity |
I'm fine with closing inactive PRs (though in this case a reminder would have been helpful too, I just forgot about this). But why do you delete my branch too? |
Also there are two older PRs open, which have been inactive for longer, and you didn't close those. |
Yeah, please don't delete branches. I recently almost lost a WIP branch that I didn't have on a new computer (though fortunately it was still on Github). It also make it easier for others to take over if the branch is still there. Though weirdly Github still shows the changed files, so nothing is really lost in this case. |
Sorry for closing without warning, reopened for now. (Branches that were in a pull request can be restored on GitHub) |
|
||
Many distributions don't provide packages for a qemu that supports RISC-V | ||
as upstream support for this has been merged somewhat recently. Here are some steps | ||
to build one from source. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is available on cosmic
and newer, right?
I don't have motivation to work on this anymore, so closing. Anyone interested in picking this up, feel free. |
(don't know if this is the right place, I usually use gists for things like this, this is an experiment in actually using the
docs
repo)