Comments (11)
That means cat is blocked trying to do a fctl(F_SETLKW)
on the METALOG in your rootfs directory. Is your data drive formatted/mounted in a way that would stop that working? Did you kill a previous run and possibly leave that file still locked?
from cheribuild.
(specifically, /home/bharadwaj/datadrive/github/src/CHERI/output/rootfs-purecap128/METALOG
in your case)
from cheribuild.
Ah, you're building a sysroot, so a different output directory, but the METALOG /dev/null
also shows it's trying to lock that. You should find that echo foo | cat -l >> /dev/null
similarly hangs. Either your /dev/null
is broken or something else hasn't released that lock. (Yes, the lock is unnecessary in this very specific case, but it's not worth optimising for that)
from cheribuild.
I was wondering about the -l
option of the cat
command. It is not honored by the cat
command on Linux.
$ echo foo | cat -l >> /dev/null
cat: invalid option -- 'l'
Try 'cat --help' for more information.
$ cat -l >> ~/foo
cat: invalid option -- 'l'
Try 'cat --help' for more information.
Do you think it would help if I remove the -l
option from cat
command? If so, can you point me to the source location?
Thanks!
from cheribuild.
Correct, it's a BSDism. If you remove the -l
, it will work for building a sysroot, but break horribly when trying to assemble a rootfs for a disk image. That is not the right answer. @arichardson is cat meant to be a bootstrap tool?
from cheribuild.
@jrtc27 Yes, cat is bootstrapped from the CheriBSD tree. We could modify it to skip locking for /dev/null?
from cheribuild.
We could, but that's an upstream FreeBSD issue, and is just unnecessary serialisation. There is a more fundamental bug going on here, given this is meant to work and we have many people successfully using Linux to build CheriBSD.
from cheribuild.
FWIW, my cheribuild
checkout contains
diff --git a/pycheribuild/projects/cross/cheribsd.py b/pycheribuild/projects/cross/cheribsd.py
index deaa811c..942d384b 100644
--- a/pycheribuild/projects/cross/cheribsd.py
+++ b/pycheribuild/projects/cross/cheribsd.py
@@ -805,7 +805,7 @@ class BuildFreeBSD(BuildFreeBSDBase):
# By default also create a sysroot when installing world
installsysroot_args = install_world_args.copy()
# No need for the files in /usr/share and the METALOG file
- installsysroot_args.set(NO_SHARE=True, METALOG="/dev/null")
+ installsysroot_args.set(NO_SHARE=True)
installsysroot_args.set_env(DESTDIR=self.get_corresponding_sysroot())
if sysroot_only:
if not self.has_installsysroot_target:
because I ran into something similar in the past. Apparently the docker daemon has been known to lock /dev/null
(e.g., moby/moby#31182). Hilarious.
from cheribuild.
@nwf could you commit this? I only added the /dev/null to avoid creating a METALOG file in the sysroot.
from cheribuild.
FWIW, my
cheribuild
checkout containsdiff --git a/pycheribuild/projects/cross/cheribsd.py b/pycheribuild/projects/cross/cheribsd.py index deaa811c..942d384b 100644 --- a/pycheribuild/projects/cross/cheribsd.py +++ b/pycheribuild/projects/cross/cheribsd.py @@ -805,7 +805,7 @@ class BuildFreeBSD(BuildFreeBSDBase): # By default also create a sysroot when installing world installsysroot_args = install_world_args.copy() # No need for the files in /usr/share and the METALOG file - installsysroot_args.set(NO_SHARE=True, METALOG="/dev/null") + installsysroot_args.set(NO_SHARE=True) installsysroot_args.set_env(DESTDIR=self.get_corresponding_sysroot()) if sysroot_only: if not self.has_installsysroot_target:
because I ran into something similar in the past. Apparently the docker daemon has been known to lock
/dev/null
(e.g., moby/moby#31182). Hilarious.
That change worked for me. Just providing feedback, in case you find it helpful.
Thanks to @jrtc27, @arichardson and @nwf for the quick responses. Really appreciate it.
from cheribuild.
@arichardson: Done. Hopefully nobody noticed my tripping over the git UI again. (Sigh.)
from cheribuild.
Related Issues (20)
- Building cheribsd-morello-purecap on macOS (Aarch64) HOT 6
- Failing freebsd and cheribsd builds on macOS. pkg-config --exists libarchive HOT 1
- freebsd-aarch64 on macOS Ventura HOT 5
- Fails to build on CheriBSD 14.0 on Morello platform HOT 3
- Building -morello-purecap targets on a Morello system should suggest -native
- Build error - cheribuild.py cheribsd-aarch64 -d HOT 2
- Error in cross compilation HOT 7
- gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 checksum mismatch HOT 4
- About Rebuilding Images HOT 2
- Failed when build pkg-riscv64-purecap HOT 2
- Stuck synthesizing Cheri on AWS F1 Ubuntu 18.04
- How to enable caprevoke feature and build freeBSD with it? HOT 6
- Re-enable lib32 by default (and remove option?)
- Switch to new Morello ABI
- Being asked for a password to login as root on SSH HOT 3
- Switch parity of --cheribsd/caprevoke-kernel HOT 1
- Failed to invoke compiler in order to build my own code targeting RISC-V purecap on cheriBSD HOT 1
- How to enable caprevoke in cheribsd? HOT 2
- GMP mercurial host blocks certain IP ranges HOT 2
- Workflow of adding instruction in CHERI RISC-V HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cheribuild.