Closed xlucas closed 6 years ago
Hey
Sorry, this is probably due the changes made for https://github.com/therecipe/qt/issues/290 To create non-root owned files on the host.
Where GOPATH should not be /home/user/work:/media/sf_GOPATH0 but /media/sf_GOPATH0, right?
Yeah, no this is fine. /home/user/work
is also needed to get access to the real files, because your GOPATH (/media/sf_GOPATH0
) only contain stubs of therecipe/qt/{core,gui,widgets}...
The actual problem is that the files create in /home/user/work
are created with root ownership during the creation of the image. But when you now run docker as non-root by running qtsetup -docker
, you got no permission to create files in /home/user/work
.
edit: okay seems like https://github.com/therecipe/qt/commit/d40d963b11f43295122327888925576319ee40fa fixes it
Hi
I stumbled upon the same error. Is this already pushed to docker hub? I just updated my container/image a few minutes ago and i am still getting this error.
@phoenix147
Ah, sorry I just tested it on a fresh machine and it failed on the second run of qtsetup and/or qtdeploy. But it should be fixed now with: https://github.com/therecipe/qt/commit/c6cb74d45e468dce508f47aa87d51793d904a9ad
You will need to pull the new images and as well as c6cb74d45e468dce508f47aa87d51793d904a9ad.
@therecipe
Thanks. Its working for me now.
I will give it a try when possible. Thanks
Hi
Now this error appears:
https://paste.ofcode.org/32MzwLqcKVzsCxknKKuPzfn
I've checked the command alone:
docker run --rm -u 1000:1000 -v /home/kromanowski/go:/media/sf_GOPATH0 -e QT_STUB=true -e GOPATH=/media/sf_GOPATH0:/home/user/work -i therecipe/qt:linux /home/user/work/bin/qtsetup -debug generate linux
also with sudo and it generates the same error. Checked all just few minutes ago with latest commit and docker img.
Edit:
this error occurs on my Fedora env, but not on fresh Ubuntu. Seems i have to find it by myself.
Edit:
Ok, now I see it is a problem of selinux with docker.
Sollution:
chcon -Rt svirt_sandbox_file_t $GOPATH
Proposal: Maybe the authors should consider this sollution in future: https://stackoverflow.com/a/31334443
@krzysztofromanowski94 Thanks :)
Alternatively you probably could have run it like this as well:
docker run --rm -v /home/kromanowski/go:/media/sf_GOPATH0 -e QT_STUB=true -e GOPATH=/media/sf_GOPATH0:/home/user/work -i therecipe/qt:linux /home/user/work/bin/qtsetup -debug generate linux
even though all the files in github.com/therecipe/qt/{core,gui,widgets,...}
would have been owned by root then.
And I just figured that I probably should make this the default behavior, and then chown the files manually.
Hello,
I've just started following steps in the "minimal installation" section. It fails with the following log:
It pretty much sounds like this is caused by this :
Where
GOPATH
should not be/home/user/work:/media/sf_GOPATH0
but/media/sf_GOPATH0
, right?