-
Notifications
You must be signed in to change notification settings - Fork 37
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
Building ImageMagick #7
Comments
Whoops forgot to include the PR dealing with this: |
For DevIL its: JuliaGL/DevIL.jl#1 |
I can only add useful info concerning two points:
|
Thanks a lot! |
Only at precompilation sounds wrong, yes. |
Images has finally figured out how to do this correctly (took me long enough...): It generates a
|
See also https://github.com/timholy/Images.jl/blob/ecd35f185912489a94e57f22852d8be974b6a9dd/src/ioformats/libmagickwand.jl#L26-L35. My
|
Isn't that exactly the issue, because |
Oh, crap. See JuliaImages/Images.jl@bf4b6bb |
I'm running into this: |
Aha! |
Responding to your bullets at the top:
I don't understand this point;
Right, they just get written to the deps.jl file. But if you
Shouldn't happen anymore. These lines seem to solve the problem:
Not sure, but I bet I didn't want to risk borking an
Which aspect? It's a pretty multifaceted issue. |
Yay, glad you figured it out! |
I meant, they're not guaranteed to be included into the |
that's exactly my point about |
Now that I got |
https://github.com/JuliaLang/BinDeps.jl/blob/b0d298380106c6dc67bfdcddd56333b7f4863a61/src/dependencies.jl#L783 If it's not happening, I'd call that a BinDeps bug.
Hmm. Does it work if you check out the |
(Note that branch passed AppVeyor) |
Interesting. |
But not a big surprise, since: @unix_only context("Reading from a stream (issue #312)") do
fn = joinpath(workdir, "2by2.png")
io = open(fn)
img = Images.imread(io, Images.ImageMagick)
close(io)
@fact isa(img, Images.Image) --> true
end |
git blame discovered this: JuliaImages/Images.jl#324 |
Any ideas what I'm missing? ENV["MAGICK_CONFIGURE_PATH"] = "C:\\Users\\Sim\\.julia\\v0.4\\ImageMagick\\deps\\usr\\lib\\x64"
ENV["MAGICK_CODER_MODULE_PATH"] = "C:\\Users\\Sim\\.julia\\v0.4\\ImageMagick\\deps\\usr\\lib\\x64"
using ImageMagick
load("test.png") Places I tried: |
Ah silly me... I should have thought more about why the test is actually disabled. |
concerning the ENV, I'll look into Images.jl a bit more, since it seems to pass on appveyor. |
Okay, so |
Yes, Images is precompilable, so it should work. The main trick is doing all the initialization inside the Link to @tkelman's comment? I'm not sure what you're referring to. |
In case it's not obvious, AppVeyor is precompiling Images. |
Can you set |
I'll abuse this thread to share with you what I just found out about: the |
Really, how do you see that? I can't see anything in the logs, and https://github.com/timholy/Images.jl/blob/teh/genesis/src/Images.jl#L1 quite clearly disables it. I've tried to set ENV wherever possible and |
that's the commit by @tkelman |
Oh, you're right. I keep forgetting, sorry. |
Okay here's the log from debug for setting the ENV before using ImageMagick and without : I need to get some coffee before I look into this^^ |
Gotta run, but one idea:
|
Oh what?! |
And without precompile, it doesn't matter if I call |
Check the Images PRs. The windows binaries that Images has been using do something with the registry that is not precompilable. If you're doing a new package here, you should try using the WinRPM build of imagemagick which is built differently. |
@SimonDanisch I'm having a little trouble following the conversation, but if you have questions about BinDeps or Homebrew or onload hooks etc, feel free to send them my way. |
@staticfloat thanks a lot =) |
Little mix up here, I meant @ihnorton, sorry about that. |
@staticfloat I'll still bug you with Homebrew and BinDeps question ;) |
This was only for ImageMagick, see JuliaIO/ImageMagick.jl#7
Okay that's what I mean with onload/preload being not included: @staticfloat is this expected behavior? If yes we can't put important statements into these hooks. |
Okay I think I know whats up. It gets accidentally installed by Images.jl. But should it really leave out the hooks in that case? |
It looks like what's happening is that, since provides( SystemPaths, "name.dll", libname, onload = initfunc ) |
Seems reasonable :) |
This was only for ImageMagick, see JuliaIO/ImageMagick.jl#7
Hi all,
I want to finally have a clean build for ImageMagick.
There seem to be a lot of issues when building ImageMagick.
It seems to me as if the current build system relies on a lot of uncertainties,.
E.g.:
__init__
, in an automatically generated include. Depending on where included and what Julia version you have,__init__
will be called at different points, which makes it hard to reason aboutonload
hooks are not guaranteed to get executed. Since there is no documentation its pretty opaque to me, but seems they don't get executed when the library is already present. But e.g. the variableENV["MAGICK_CODER_MODULE_PATH"]
should also be set even if ImageMagick is already present, as some of my experiments show. So putting this intoonload
is asking for trouble.ccall((:MagickQueryConfigureOption, libwand), Ptr{UInt8}, (Ptr{UInt8},), "LIB_VERSION_NUMBER")
segfaults on OSX wasn't really found out?! Build segfaults on OS X JuliaImages/Images.jl#188__init__
?From what I gathered we need these:
ENV["MAGICK_CODER_MODULE_PATH"]
andENV["MAGICK_CODER_MODULE_PATH"]
before calling any function fromImageMagick
sRGB
vsRGB
MagickWandGenesis
and the ENV variables must be called before getting the versionMagickWandGenesis
only needs to get called one time after the build?! And on OSX every time the module loads!? I don't know :DThen there is also this segfault with ImageMagick: JuliaLang/julia#13318
Because of all these issues, I started looking into polishing DevIL.jl a little more, as it is more lightweight and easier to setup compared to ImageMagick.
There I have problems with the Linux and OSX build. Any help would be appreciated:
https://travis-ci.org/JuliaGL/DevIL.jl
(Tests are successful, because they're still empty - builds are not.)
Here is an overview of DevIL's features: http://openil.sourceforge.net/features.php
It seems pretty capable and easy to integrate into FileIO.
Since I now allow for multiple IO libraries for the same formats, its also straight forward to have multiple libraries as a back up for some format.
Sorry for any misunderstandings. Everything is a little opaque to me and I don't have lots of time to do this :(
Best,
Simon
From the issues on Images.jl I conclude that this concerns: @timholy @lucasb-eyer @staticfloat @rsrock @jwmerrill
The text was updated successfully, but these errors were encountered: