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

VideoIO tests fail to find zlib1.2.9 when loading ImageMagick.jl on Travis #130

Open
kmsquire opened this Issue Aug 22, 2018 · 19 comments

Comments

Projects
None yet
6 participants
@kmsquire

kmsquire commented Aug 22, 2018

It might be that I need to install something else in Travis, but I'm wondering if anyone has any hints here? It worked fine when testing against v0.6.3.

Fatal error:
ERROR: LoadError: LoadError: InitError: error compiling __init__: could not load library "/home/travis/.julia/packages/ImageMagick/W81WA/deps/usr/lib/libMagickWand-6.Q16.so"
/lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/travis/.julia/packages/ImageMagick/W81WA/deps/usr/lib/libpng16.so.16)

See: See https://travis-ci.org/kmsquire/VideoIO.jl/jobs/418942394#L1206

@SimonDanisch

This comment has been minimized.

Member

SimonDanisch commented Aug 22, 2018

libz.so.1 - that looks a lot like JuliaLang/julia#22828

@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

@vtjnash, can you give suggestions on the proper fix here, or point to some docs on the matter? Thanks!

@vtjnash

This comment has been minimized.

vtjnash commented Aug 22, 2018

@vchuravy IIRC, you were working on changing our zlib version. Can you remind me, what was the end state of that?

@vchuravy

This comment has been minimized.

vchuravy commented Aug 22, 2018

We removed ZLib as a dependency from Julia/LLVM.

@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

@vtjnash, @vchuravy, sorry I bothered you--this seems to be an issue how libpng is being built here.

@SimonDanisch, In the deps directory, you're building zlib v1.2.11, but, the version of libpng installed by ImageMagick was (per the error message) linked with zlib v1.2.9.

I think you need to update https://github.com/SimonDanisch/LibpngBuilder to build with the same version of zlib.

Presumably, then, it will use the version installed in the same directory under ImageMagick (/home/travis/.julia/packages/ImageMagick/W81WA/deps/usr/lib/)

@SimonDanisch

This comment has been minimized.

Member

SimonDanisch commented Aug 22, 2018

Hm that's weird, since zlibbuilder has always just offered 1.2.11 as far as I can tell!

@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

Could it be that libpngbuilder isn't using the output of zlibbuilder, but is instead using, e.g., a system zlib?

@SimonDanisch

This comment has been minimized.

Member

SimonDanisch commented Aug 22, 2018

-- Found ZLIB: /workspace/destdir/lib/libz.so (found version "1.2.11")

that's the output of the configure of libpngbuilder

@SimonDanisch

This comment has been minimized.

Member

SimonDanisch commented Aug 22, 2018

well, considering that travis tests run fine for imagemagick, could this be some problem introduced by ffmpeg in VideoIO?

@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

-- Found ZLIB: /workspace/destdir/lib/libz.so (found version "1.2.11")
that's the output of the configure of libpngbuilder

Interesting. If run ldd on https://github.com/SimonDanisch/LibpngBuilder/releases/download/1.0.0/libpng.v1.6.31.i686-linux-gnu.tar.gz, I get the same error as in VideoIO.jl's logs:

# ldd libpng16.so.16.31.0
./libpng16.so.16.31.0: /usr/lib32/libz.so.1: version `ZLIB_1.2.9' not found (required by ./libpng16.so.16.31.0)
	linux-gate.so.1 (0xf7755000)
	libz.so.1 => /usr/lib32/libz.so.1 (0xf76f1000)
	libm.so.6 => /lib32/libm.so.6 (0xf769c000)
	libc.so.6 => /lib32/libc.so.6 (0xf74e5000)
	/lib/ld-linux.so.2 (0xf7756000)
@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

And if I make https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.i686-linux-gnu.tar.gz available, then the error goes away!

So, the problem is probably that the library search path isn't configured to find zlib in /home/travis/.julia/packages/ImageMagick/W81WA/deps/usr/lib/ when ImageMagick is installed under VideoIO.

@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

... any thoughts on how to fix that?

@kmsquire

This comment has been minimized.

kmsquire commented Aug 22, 2018

(Moving this issue to BinaryBuilder)

@kmsquire kmsquire closed this Aug 22, 2018

@kmsquire

This comment has been minimized.

kmsquire commented Aug 23, 2018

After exploring a bit more, it seems that the problem is likely related to MikeInnes/Requires.jl#52 . Thanks for the feedback here, and sorry for the noise!

@kmsquire

This comment has been minimized.

kmsquire commented Aug 23, 2018

After exploring a bit more, it seems that the problem is likely related to MikeInnes/Requires.jl#52 .

Okay, that doesn't seem to be it. :-( Will explore some more.

@kmsquire

This comment has been minimized.

kmsquire commented Aug 24, 2018

Okay, I think I figured out the issue. VideoIO is not using BinaryBuilder, and is instead depending on detecting and using system-installed versions of ffmpeg or libav. Those libraries are linked against the system libz, so if they are loaded, then the library loader attempts to resolve any future references to libz against the system libz, causing the error above.

@kmsquire kmsquire reopened this Aug 24, 2018

@kmsquire kmsquire closed this Aug 24, 2018

@SimonDanisch

This comment has been minimized.

Member

SimonDanisch commented Sep 1, 2018

Hm, I actually have the same issue with ImageMagick on ubuntu only in the Makie tests... ImageMagick alone passes tests.

What's weird is, that it only happens if I actually run ]test Makie - if I just include the runtest, I don't get the problem ... So must be something about the code loading of Pkg + together with the new isolated environment that Pkg3 creates for running the tests (that's what Pkg3 does, right?).

@staticfloat, @StefanKarpinski @KristofferC, any idea what could lead to this?
Looks a bit like ImageMagick only gets partially build leaving out the dependency of e.g. zlib - which makes it try to pick it up from the path, or something like this?!

Visual Regression: Error During Test at /home/s/.julia/packages/Makie/YPDAk/test/runtests.jl:110
  Got exception outside of a @test
  InitError: error compiling __init__: could not load library "/home/s/.julia/packages/ImageMagick/d5KBL/deps/usr/lib/libMagickWand-6.Q16.so"
  /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/s/.julia/packages/ImageMagick/d5KBL/deps/usr/lib/libpng16.so.16)
  during initialization of module ImageMagick

@SimonDanisch SimonDanisch reopened this Sep 1, 2018

@timholy

This comment has been minimized.

Contributor

timholy commented Sep 4, 2018

This just cropped up in JuliaImages/ImageView.jl#156. Can we build zlib statically into ImageMagick?

@bjarthur

This comment has been minimized.

Contributor

bjarthur commented Sep 18, 2018

the hack of importing ImageMagick before using another package which relies on it (in my case Images) works for me.

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