Skip to content
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

Unable to build on Arch #14

Open
Eiyeron opened this issue Jun 19, 2016 · 18 comments
Open

Unable to build on Arch #14

Eiyeron opened this issue Jun 19, 2016 · 18 comments

Comments

@Eiyeron
Copy link

Eiyeron commented Jun 19, 2016

Hi.

Trying to install this toolkit, I faced more than one issues :

  • The installer is specific to Debian-based systems
  • Using Arch's libraries to compile your project outputs this kind of errors :
libshared_files.a(magick_interface.cpp.o): In function `ToMagickColor(Color const&)':
magick_interface.cpp:(.text+0x13c): undefined reference to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)'
libshared_files.a(magick_interface.cpp.o): In function `ToMagick(Image32Bpp const&)':
magick_interface.cpp:(.text+0x45b): undefined reference to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)'
magick_interface.cpp:(.text+0x556): undefined reference to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)'
libshared_files.a(magick_interface.cpp.o): In function `ToMagick(Image16Bpp const&)':
magick_interface.cpp:(.text+0x69b): undefined reference to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)'
magick_interface.cpp:(.text+0x7b0): undefined reference to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)'
libshared_files.a(magick_interface.cpp.o):magick_interface.cpp:(.text+0x8fb): more undefined references to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)' follow

(Trying right now with no parallelism)
Edit : Nope.

@TricksterGuy
Copy link
Owner

Ahh yes iirc arch has ImageMagick 7

You will need to compile imagemagick (version < 7) on arch. Magick++ the API I use is drastically changed on ImageMagick7 and breaks some files.

I have a pending issue to fix this see #11 but since debian is lagging behind it hasn't been a high priority issue for me to fix.

@TricksterGuy
Copy link
Owner

And I will have this fixed today. I recall only one file needs to be updated.

@TricksterGuy
Copy link
Owner

So I have closed #11

I have a build of nin10kit that was linked to ImageMagick7, and I ran it against most of my tests and the behavior has not changed.

You can try to recompile under arch again, if it works then this is resolved

@Eiyeron
Copy link
Author

Eiyeron commented Jun 20, 2016

The verison in the official repos is 6.9.4.6-2, I'm trying with the lastest git version. I'll edit with the result.

@TricksterGuy
Copy link
Owner

I'm compiling it now with 6.9.4.9 found a compiler error am fixing it now

@TricksterGuy
Copy link
Owner

And commit 3c0694f should fix this. At least on Linux Mint which is what I do development on.

Try compiling now.

@TricksterGuy
Copy link
Owner

I'm assuming this is resolved now.

@Eiyeron
Copy link
Author

Eiyeron commented Jun 29, 2016

Well, sorry, couldn't make it work in the end, no way to make it find the headers. So yeah, sorry I don't think I'm going to be able to compile it for now (that and miscallenous priorities busied me quite a lot these last days). Good luck and have a nice day.

@TricksterGuy TricksterGuy reopened this Jun 29, 2016
@TricksterGuy
Copy link
Owner

Hmm okay, I may just install Arch just to test it out, the main users of this program are using ubuntu. but Arch support is nice to have.

And yeah if CMAKE doesn't automagically detect where ImageMagick is installed it can be a little work to get it to find it.

@abrahimladha
Copy link

Tried compiling it under Arch today with 6.9.8.3-1 with the same errors. I compiled IM 7.05 straight from git and then it couldn't find Magick++.h. I may consider just reversing the deb you have provided and trying to install it that way.

@cgokmen
Copy link
Contributor

cgokmen commented Mar 28, 2017

I may have a solution for you which involves a minor edit to the CMakeLists file that I did.

sudo pacman -S git gcc cmake make pkg-config wxgtk imagemagick &&
git clone https://github.com/skyman/nin10kit.git &&
cd nin10kit &&
mkdir -p build &&
cd build &&
cmake ..

This makes CMake use pkg-config instead of its own ImageMagick finder function to find it, maybe that will work.

@TricksterGuy
Copy link
Owner

I have 0 time to look at this until friday.

If you find the fix, I'd be happy to accept a pull request for it.

@abrahimladha
Copy link

@Skyman Your pull request didn't end up working for me, which is interesting. I also tried replacing my gcc-multilib with just gcc but that didn't do anything either. Does cmake use the Magick++-config utility?

@TricksterGuy
Copy link
Owner

FindImageMagick.cmake should have that answer (or was it FindMagick.cmake) anyway start there.

@TricksterGuy
Copy link
Owner

also in the meantime just find a friend on ubuntu and ask him to export stuff for you

I really wished I could make a website so no one would have to go through the trouble of installing said program, but I'm not a front end guy and have 0 skill in making websites lol.

@johnyburd
Copy link

johnyburd commented Apr 3, 2018

I just ran into this same issue on arch, I'm using Magick 6 with the exact same error. It seems like it's some sort of namespace issue because cmake finds my /usr/include/ImageMagick-6/Magick++/Color.h file, but the error lists Color::Color twice.

@TricksterGuy
Copy link
Owner

I'm not going out of my way to fix this at this time, as I currently do not have an arch linux setup nor do I have the time to acquire one.

Since you are a GT student you will have to either A) try to fix this yourself or B) follow the advice I have given above and find a friend using Ubuntu.

Given that, the Magic++k libraries are behind a namespace as Magick::Color. There is also a Color class in shared/color.hpp I doubt your error is the same as OP's since it is not referring to Magick++'s Color class, but the one I have defined.

@johnyburd
Copy link

I believe it is the same error; I was just cut and pasting it confusing ways to try and show what I was saying. Regardless, I will let you know if I find the solution.

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

No branches or pull requests

5 participants