I'm making a plugin for a graphic system and need to embed ImageMagick in to it. I only need Convert and it to be able to save TIFF, JPEG, PNG and GIF.
I found the Convert for Windows that worked perfectly but I need the same standalone executable for Mac.
I've seen that it needs to be compiled but how do I set it up to do this? Or is there any available somewhere to download?
Thanks
Jan
Compile standalone convert for Mac OSX
Re: Compile standalone convert for Mac OSX
I have tried to compile a standalone Convert but ending up with this error:
In the log I find this:
Thanks
Jan
I have done this after this post: viewtopic.php?f=1&t=13145&start=15#p123535checking whether the C compiler works... no
configure: error: in `/Users/xxxxx/Desktop/ImageMagick-7.0.2-6':
configure: error: C compiler cannot create executables
In the log I find this:
Appreciate any help.configure:5118: checking for C compiler version
configure:5127: gcc --version >&5
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
configure:5138: $? = 0
configure:5127: gcc -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
configure:5138: $? = 0
configure:5127: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:5138: $? = 1
configure:5127: gcc -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:5138: $? = 1
configure:5158: checking whether the C compiler works
configure:5180: gcc -l/libTIFF/include -L/libTIFF/lib conftest.c >&5
ld: library not found for -l/libTIFF/include
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:5184: $? = 1
configure:5222: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "ImageMagick"
| #define PACKAGE_TARNAME "ImageMagick"
| #define PACKAGE_VERSION "7.0.2-6"
| #define PACKAGE_STRING "ImageMagick 7.0.2-6"
| #define PACKAGE_BUGREPORT "https://github.com/ImageMagick/ImageMagick/issues"
| #define PACKAGE_URL "http://www.imagemagick.org"
| #define PACKAGE "ImageMagick"
| #define VERSION "7.0.2-6"
| #define MAGICK_TARGET_CPU x86_64
| #define MAGICK_TARGET_VENDOR apple
| #define MAGICK_TARGET_OS darwin14.5.0
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:5227: error: in `/Users/jannes/Desktop/ImageMagick-7.0.2-6':
configure:5229: error: C compiler cannot create executables
See `config.log' for more details
Thanks
Jan
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Compile standalone convert for Mac OSX
Perhaps the problem is a missing libTIFF library.jansuhr wrote:configure:5180: gcc -l/libTIFF/include -L/libTIFF/lib conftest.c >&5
ld: library not found for -l/libTIFF/include
snibgo's IM pages: im.snibgo.com
Re: Compile standalone convert for Mac OSX
Yes there is a problem with that. The folder "libTIFF/include" is there and also "libTIFF/lib" but the file "contest.c" isn't. The libTIFF is created with this command: ./configure --enable-static --disable-shared --prefix=/libTIFF
If I remove the libTIFF stuff from the command it starts working but ends with another error: cannot compute sizeof (long double)
Jan
If I remove the libTIFF stuff from the command it starts working but ends with another error: cannot compute sizeof (long double)
Jan
Re: Compile standalone convert for Mac OSX
If I run the compiler with this line it do compile, ./configure --enable-delegate-build --enable-static --disable-shared --disable-installed --prefix=/imagick and I get a full ImageMagick installation with a lot of files and folders.
How do I get it to compile just standalone executables like it is in the Windows version available here: http://www.imagemagick.org/download/bin ... 16-x86.zip
How do I get it to compile just standalone executables like it is in the Windows version available here: http://www.imagemagick.org/download/bin ... 16-x86.zip
Re: Compile standalone convert for Mac OSX
Has anyone been able to crack this yet? I need convert for my app as well.
Re: Compile standalone convert for Mac OSX
I have a programmer that will try to solve this but he is very busy and can't take it on until a month or so.
Jan
Jan
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Compile standalone convert for Mac OSX
Have you searched the Users and Developers forum to see if anyone has posted a method to compile for Mac as standalone. This question has been asked before. Sorry I do not know the answer.
Re: Compile standalone convert for Mac OSX
I have done some research here:
http://blog.schdbr.de/imagemagic-osx-st ... ble-build/
TL;DR: Use homebrew,
brew edit imagemagick
in def install:
--disable-shared to disallow shared libs
brew install imagemagick --without-modules --with-zero-configuration
gave me what I wanted (including freetype)
Delegates (built-in): bzlib freetype jng jpeg lzma png tiff xml zlib
Pro tip: Mac Photoshop comes with a static convert included (Those sneaky guys):
"/Applications/Adobe Photoshop CC 2015/Adobe Photoshop CC 2015.app/Contents/MacOS/convert"
http://blog.schdbr.de/imagemagic-osx-st ... ble-build/
TL;DR: Use homebrew,
brew edit imagemagick
in def install:
--disable-shared to disallow shared libs
brew install imagemagick --without-modules --with-zero-configuration
gave me what I wanted (including freetype)
Delegates (built-in): bzlib freetype jng jpeg lzma png tiff xml zlib
Pro tip: Mac Photoshop comes with a static convert included (Those sneaky guys):
"/Applications/Adobe Photoshop CC 2015/Adobe Photoshop CC 2015.app/Contents/MacOS/convert"