-
Notifications
You must be signed in to change notification settings - Fork 37
docker/build script fails to build klee #131
Comments
Thanks for this report (and the accompanying fixes). TL;DR: I'm confused about this problem and will need to try to reproduce it before I can fix it. The following is just me thinking aloud about what could be going on here. I haven't tried to use docker on the Mac since around the time that we switched to using docker - so I haven't seen this before. This is a slightly confusing error report from KLEE's test harness. At first glance, the failing "assert(f)" is the problem. int main(int argc, char** argv) {
...
FILE* f = fopen("/etc/mtab", "r");
assert(f);
...
} So the obvious possibility is that /etc/mtab cannot be opened read-only - which could conceivably be caused by not running with sudo. The other important line in this test is line 3 that includes the flag Since I don't see anything obviously wrong just by eyeballing the code, I'll need to take a closer look to see if it is a docker-on-Mac thing or whether the KLEE, uclibc, etc. versions that I am looking at (which, for convenience is just my LLVM11 branch) don't have a problem that show up on the main branch? |
PR #135 cleaned up a bunch of the docker build process. The main change was to decrease build time from several hours to about 15 minutes but I think it also 'fixed' this by the simple trick of not running the tests for KLEE so that the build would go through successfully on a Mac. |
After your excellent work on the docker build process, I thought I'd give it another shot. Your main branch seems to build images fine now, so this issue can probably be closed. I will keep an eye on this project, and try again once your LLVM 11 branch lands, because I'm getting
|
Hi @alsuren , may I know how did you resolve this issue? I encountered the same issue. Thanks! |
Hi @NEUZhangy , So this is a problem trying to use LLVM11? I think? that the state of LLVM11 at the moment is:
I think that the cause of this as that our #[test] support is a complete hack that takes advantage of the way that cargo test compiles and links code. My assumption is that more recent versions of cargo test have changed either the way that test functions are compiled or, perhaps, the test library that they are linked with. |
Hi @alastairreid, thanks for your kind reply, I resolved the issue and find the solution: |
Full output lives here: docker-build-output.txt and I have included a hopefully-relevant snippet below.
I don't have any experience with klee, so I haven't tried digging into this too deeply.
I did notice that we have UCLIBC_VERSION defined as
klee_uclibc_v1.2
indocker/mkimage
but it's not used anywhere. There are about 6 commits betweenhttps://github.com/klee/klee-uclibc.git
HEAD
andklee_uclibc_v1.2
, so my current theory is that it might be one of those.I had also removed the sudo around the docker calls, because my user already has permission to use docker (on macos). I'm currently doing a full-rebuild with sudo enabled and
git checkout UCLIBC_VERSION
indocker/klee/build_klee
. I will tell you how it goes.I do wonder whether it would be worthwhile publishing the relevant docker images somewhere. This would also help with #2 , and it's a workflow that people will be used to if they have used
cross
before.The text was updated successfully, but these errors were encountered: