-
Notifications
You must be signed in to change notification settings - Fork 32
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
Build fails on Ubuntu 16.04 #63
Comments
@okor were you able to get around this? |
@UmeshSingla Nope, I took a different approach since my use case was experimental anyways. |
Did someone found a solution? |
I was getting "fatal error: wand/MagickWand.h: No such file or directory" on ubuntu and just before giving up forever, I was able to get around it by installing ImageMagick from source (ImageMagick-7.0.7 ) based on the instructions in the prerequisite page and then doing the linker step (sudo ldconfig /usr/local/lib) and tests from actual instructions page making sure cmdline really works. Then restarting the imgmin build process from scratch seemed to actually finish. |
@Enalmada is that still working for you? it doesn't seem to be working for me. this is what i am doing, please let me know if you are doing something different:
also tried these steps for just imgmin and it doesn't work either
|
Well I went through my steps again from scratch and it didn't work so there must have been something mysterious I did during my frantic trying that I forgot about. Here are more precisely the steps I was following using AWS EC2 Ubuntu Server 16.04 LTS (HVM). I was installing imgmin as a prereq for thumbor auto plugin so something in those gist steps may have helped. First make sure your ImageMagick is really installed and working by doing "make check" after installing it. (I just ran mine and got 79 pass and 7 fail...I don't remember any fail before which is concerning but hopefully in things imgmin doesn't care about). I may have figured out a hack:
Sucks this is so hard to install...but it seems I did get it going again finally using first the steps in the gist I posted and then the hacked steps above (copy some baseconfig file and then make install using somee C_INCLUDE_PATH and PKG_CONFIG_PATH prefix). I am just guessing that the real problem might be imgmin needs imgmagick 6 instead of 7 and installing the latest is a bad idea...my hack above seems to work around that but it would be better if someone could update imgmin to build with 7. Or perhaps we all just need to install the last version of imgmagick 6. Hopefully this helps.... |
@Enalmada on my end it fails because of this one make[3]: Entering directory '/root/imgmin/src/apache2' So the error must be into that line but i still have to debug it i don't really understand what they are doing here. |
@gdarko Unfortunately I never saw that error, only a MagickWand.h and magick-baseconfig.h not found errors. Note that I was starting with AWS EC2 Ubuntu Server 16.04 LTS (HVM), following the gist for some other image libraries, then the C_INCLUDE/PKG hack to get around the not found errors. I see an open ticket with a similar looking issue: #21. It looks like there might be some solutions talked about/linked to the ticket. It is a long shot but you could try uninstalling apache before trying to build. Otherwise I would just have to say I am pretty confident anyone can get imgmin working on a vanilla AWS EC2 Ubuntu with the hack above but it would be nice if someone with build experience could update the scripts so the hack isn't required (which I assume is updating them to reference a newer imagemagick and beyond my abilities). |
@Enalmada even with your suggestion I get
The thing is, the location of MagickWand.h has changed.
|
@bagipriyank Do you have a /usr/include/ImageMagick-6/wand/MagickWand.h? If not, I have no idea where that comes from but perhaps try "sudo apt-get install libmagickcore-dev libmagickwand-dev"...I got it from either that, being already installed in EC2 Ubuntu, imgmin prereq doc steps, or was put down by some line in the gist I followed before trying to install imgmin. So if all else fails, you may need to try EC2 Ubuntu and follow the gist steps I posted in comment above to get it. Once you get it, the C_INCLUDE_PATH part of this "sudo C_INCLUDE_PATH=/usr/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ make" should work around it. (Yes, the location has changed in 7 which I believe is the very root of this ticket so you gotta get /usr/include/ImageMagick-6 installed so you can hack the C_INCLUDE_PATH as a workaround until someone who knows what they are doing can change the script to use the location you posted). You might be able to copy ImageMagick-7/MagickWand to ImageMagick-7/wand....and use ImageMagick-7/ in C_INCLUDE_PATH but that is just guessing. |
that worked. thanks @Enalmada. I had to do |
@bagipriyank That is great news. So it seems libmagickcore-dev is probably what does it specifically since i see the libmagickwand-dev in the imgmin prereq already....I updated my comment steps. I hope others that want to use imgmin on ubuntu can get it working too now. I was lucky enough to stumble upon some stackoverflow with a C_INCLUDE_PATH hack about something unrelated and tried it out right before I gave up forever on imgmin. |
Similar to this issue from early 2015 #51 on Ubuntu 16.04, following the build instructions precisely (apt installs ImageMagick v6.8.9) building imgmin fails. Also worth noting I had to manually export
MAGICK_CONFIG=/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config
or config/make would fail to find the config and would result in an error like--cflags: command not found
since the MAGICK_CONFIG default value falls back to an empty string.The error details:
I'm using Docker, phusion/baseimage:0.9.19 which is ubuntu 16.04. Here's a minimal Dockerfile that will reproduce the issue:
You can build the image with
docker build -t thumbor .
when in a dir with the Dockerfile above.It will fail but you can still shell in with
docker run -t -i thumbor /sbin/my_init -- bash -l
. After you shell in you'd probably want to rerun imgmin build step (it fails so it won't be in the image) withcd /root && wget https://github.com/rflynn/imgmin/archive/v1.1.tar.gz && \ tar xf v1.1.tar.gz && \ cd imgmin-1.1 && \ export MAGICK_CONFIG=/usr/bin/GraphicsMagickWand-config && autoreconf -fi && \ ./configure && \ make && \ make install
Would appreciate any help. Thanks.
The text was updated successfully, but these errors were encountered: