TricksterGuy / nin10kit

(Formerly brandontools) A set of tools for doing homebrew game development, includes look up table generators and and image to C exporter for Nintendo's Gameboy Advance, DS, and 3DS systems. In addition the GUI version of the program allows you to see what the image would look like on real hardware before exporting. Coming soon the ability to edit the bitmap/palette/tilemaps before exporting to the GBA.
Apache License 2.0
49 stars 3 forks source link

Unable to build on Arch #14

Open Eiyeron opened 8 years ago

Eiyeron commented 8 years ago

Hi.

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

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 commented 8 years ago

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 commented 8 years ago

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

TricksterGuy commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

TricksterGuy commented 8 years ago

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

Try compiling now.

TricksterGuy commented 8 years ago

I'm assuming this is resolved now.

Eiyeron commented 8 years ago

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 commented 8 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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

TricksterGuy commented 7 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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.