-
Notifications
You must be signed in to change notification settings - Fork 47
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
README.md does not document expat requirement on Ubuntu #304
Comments
Since you decided to build all the dependencies manually (without -d/--include-dependencies) so you could skip gdb, you missed out the RISC-V firmware one, bbl-baremetal-riscv64-purecap ( The GDB failure is more interesting, though. What error do you get? That's supposed to work, but it's possible the updated system packages in 22.04 break it. |
Thank you for the solution, though! |
This failed because there is no purecap version of GDB (purecap CheriBSD builds use a hybrid build of GDB). This failed because building GDB for a given architecture requires an existing CheriBSD build for that architecture, same as building any other program, you need the system headers and libraries. As the error message says, this failed because you don't have expat installed. I guess older versions of Ubuntu implicitly pulled it in with the list of dependencies documented in our README but it no longer is (libexpat is, but expat the program isn't). Install expat and it should work. However, gdb-native is not what you want; that's for building a GDB that runs natively on your x86 Ubuntu system, not inside CheriBSD. What you want is gdb-riscv64-hybrid-for-purecap-rootfs, which is what it says it is, a build of GDB that is itself a hybrid 64-bit RISC-V binary, but will be installed in your purecap rootfs, and thus disk image. Presumably that is also failing at the moment due to not having expat installed. |
I installed expat and it works well! I appreciate your kind explanation! |
The sdk targets aren't particularly useful, but they shouldn't fail like that. Does |
I need to build sdk to see assembly code, using I completely removed I need gdb to check assembly, but I don't need gdb-native. |
I don't know, I'd need to try and reproduce it. Contrary to what you might think, the sdk target itself doesn't really do anything other than depend on the various components of a full SDK. The llvm target will build Clang (and install it in the sdk directory), and the cheribsd-riscv64-purecap target will build a sysroot with the headers and libraries you need to build riscv64-purecap software (and itself depends on llvm in order to do that). Note you do need compiler flags to Clang to tell it that you want to build pure-capability CHERI-RISC-V binaries and where your CheriBSD sysroot is: |
Ok, the gdb-native issue is https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=aebc4aa2ece0363c16cab5a546df05220227ec31, current CHERI GDB is on an old enough branch that it doesn't have that fix for newer glibc. I've backported the fix and, at least for me, gdb-native now builds on Ubuntu 22.04. |
Thank you so much for your help! Now, both the comilation and |
I followed the insructions in ReadMe but I'm stuck in "run" command.
Googling couldn't solve my problem..
Question
Why Run command failed? Is this because I skipped build GDB?
I cannot get any useful information about my error on Google.
FYI, the error message is like below.
Environetment
What I did
The text was updated successfully, but these errors were encountered: