Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

v0.7-rc3 /.dockerinit: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory #2203

Closed
maci0 opened this Issue Oct 14, 2013 · 15 comments

Comments

Projects
None yet
6 participants

maci0 commented Oct 14, 2013

sudo docker run -i -t ubuntu /bin/bash
 /.dockerinit: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory

the 'base' image works fine tho, centos and busybox work fine too
also see: https://aur.archlinux.org/packages/lxc-docker-git/

Member

tianon commented Oct 14, 2013

I think this is a manifestation of #2157?

Contributor

dudebout commented Oct 14, 2013

@tianon, I was about to come and make this connection. It seems that the code from #2157 has not been merged yet in 0.7rc3.

Collaborator

shykes commented Oct 14, 2013

Are you running an official build? The binaries released on docker.io are compiled statically, specifically to avoid this kind of error.

@solomonstre
@docker

On Mon, Oct 14, 2013 at 9:18 AM, Nicolas Dudebout
notifications@github.com wrote:

@tianon, I was about to come and make this connection. It seems that the code from #2157 has not been merged yet in 0.7rc3.

Reply to this email directly or view it on GitHub:
dotcloud#2203 (comment)

Contributor

dudebout commented Oct 14, 2013

@maci0 was trying to compile from git for Arch Linux

Contributor

creack commented Oct 14, 2013

@dudebout @maci0 This issue is indeed due to the compilation. If you are manually compiling, you need to do so via the Dockefile or with the correct flags:

go build -ldflags '-w -linkmode external -extldflags "-static -Wl,--unresolved-symbols=ignore-in-shared-libs"' -tags netgo -a

Note:

  • the dockerfile will has well "inject" the git commit and the version.
  • You need to have a static version of libdevmapper and libsqlite3 on your host (not required if you use the Dockerfile)

If you are having segfaults with the resulting binary, please remove -Wl,--unresolved-symbols=ignore-in-shared-libs from the flags and try again. You should have a compilation error regarding dl symbols. If you have something else like udev symbol missing, something is wrong with your libdevmapper.a

Contributor

dudebout commented Oct 14, 2013

@creack, what about the code in #2157 that removes sqlite from docker-init. It seems that this is the only problem we are facing.

Should the proper compilation flags when not using the Dockerfile (for example if trying to compile a first docker) be part of the documentation for packagers?

Member

tianon commented Oct 15, 2013

@maci0 FYI, #2217 was just created especially to help solve the root issue you're having here.

So instead of:

  go build -v -a github.com/dotcloud/docker/docker
  go build -v -a github.com/dotcloud/docker/docker-init

You should have (after that merges, of course):

  pushd docker
  ./hack/make.sh dynbinary
  popd

And later instead of:

  install -D -m 755 "$srcdir/docker" "$pkgdir/usr/bin/docker"
  install -D -m 755 "$srcdir/docker-init" "$pkgdir/usr/bin/docker-init"

You'll have something like:

  docker_ver="$(cat "$srcdir/VERSION")"
  install -D -m 755 "$srcdir/bundles/$docker_ver/dynbinary/docker-$docker_ver" "$pkgdir/usr/bin/docker"
  install -D -m 755 "$srcdir/bundles/$docker_ver/dynbinary/dockerinit-$docker_ver" "$pkgdir/usr/libexec/docker/dockerinit"

maci0 commented Oct 15, 2013

@creack a static sqlite3 is not available in archlinux

@tianon thanks man, ill wait until the changes are merged and then ill try again

maci0 commented Oct 21, 2013

@tianon

i just tried the 0.7.0-rc4 but it seems there is no dynbinary in hack/make/

Member

tianon commented Oct 21, 2013

Indeed, we had a lot of confusion on this with rc4, so my apologies. We're going to get out an rc5 this week that does include this (and 0.6.5 should include it as well this week).

@tianon tianon was assigned Oct 24, 2013

Contributor

dudebout commented Oct 24, 2013

@tianon this link http://test.docker.io/builds/Linux/x86_64/docker-latest pointed to 0.7.0-rc4 yesterday and it is pointing to 0.6.4-dev today. Is there a link for any 0.7 so that we can install a binary version without an AUFS dependency?

Member

tianon commented Oct 24, 2013

@dudebout here's a direct link to the static build of v0.7.0-rc4: http://test.docker.io/builds/Linux/x86_64/docker-0.7.0-rc4

Contributor

dudebout commented Oct 24, 2013

@tianon thank you. Is there any place where I can find "all" the available builds to be able to update my package description accordingly?

Member

tianon commented Oct 24, 2013

Unfortunately, this is the best we can do currently: https://test.docker.io/ubuntu/dists/docker/main/binary-amd64/Packages

That'll tell you all the versions that are available, and each should have a corresponding raw binary so you don't have to extract it from the deb file (which isn't all that bad of a solution either, if you prefer that).

Contributor

crosbymichael commented Nov 28, 2013

This issue has been resolved in the official release of 0.7 Thanks!

@tianon tianon was unassigned by maci0 Jul 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment