How to build 32bit version on OS X?
How to build 32bit version on OS X?
Hi:
I need a 32bit version ImageMagick on OS X, but I found there's only x86_64 version on the download page. My OS X is 10.11.3. Xcode is 7.2.1,
So I tried to use Homebrew to install, with "brew install imagemagick", also I tried to use "brew install imagemagick --build-from-source",
It always install the x86_64 version.
Then I tried to build it from source code, I download the imagemagick-6.9.3-0.tar.xz from the website, but when I run ./configure, I got this error,
coders/msl.c:101:12: fatal error: 'libxml/parser.h' file not found
# include <libxml/parser.h>
^
1 error generated.
Then I tried to modify the home-brew 's ruby script, because the brew install it from source successful, here is the script
https://github.com/Homebrew/homebrew/bl ... emagick.rb
First I tried to set --host=i386-apple-darwin, it still make x86_64 version, I add --target=i386-apple-darwin, and --build=i386-apple-darwin,
it's still not work,
Then I read here http://www.imagemagick.org/script/advan ... lation.php, find this option --enable-osx-universal-binary, add it and
try again, I got a error,
checking size of long double... configure: error: in `/Library/Caches/Homebrew/ImageMagick-6.9.3-0':
configure: error: cannot compute sizeof (long double)
See `config.log' for more details,
About this option I searched on the discusses, I found this viewtopic.php?t=22406, but there's no answer.
Also I tried add CFLAGS=-m32, it still not work, and come with this error
checking for libltdl...
checking ltdl.h usability... yes
checking ltdl.h presence... yes
checking for ltdl.h... yes
checking for lt_dlinit in -lltdl... no
checking if libltdl package is complete... no -- some components failed test
configure: error: in `/private/tmp/imagemagick20160224-33062-1hzq8r/ImageMagick-6.9.3-0':
configure: error: libltdl is required for modules build
See `config.log' for more details
Please anyone can help me? I just want a 32bit imagemagick,
I need a 32bit version ImageMagick on OS X, but I found there's only x86_64 version on the download page. My OS X is 10.11.3. Xcode is 7.2.1,
So I tried to use Homebrew to install, with "brew install imagemagick", also I tried to use "brew install imagemagick --build-from-source",
It always install the x86_64 version.
Then I tried to build it from source code, I download the imagemagick-6.9.3-0.tar.xz from the website, but when I run ./configure, I got this error,
coders/msl.c:101:12: fatal error: 'libxml/parser.h' file not found
# include <libxml/parser.h>
^
1 error generated.
Then I tried to modify the home-brew 's ruby script, because the brew install it from source successful, here is the script
https://github.com/Homebrew/homebrew/bl ... emagick.rb
First I tried to set --host=i386-apple-darwin, it still make x86_64 version, I add --target=i386-apple-darwin, and --build=i386-apple-darwin,
it's still not work,
Then I read here http://www.imagemagick.org/script/advan ... lation.php, find this option --enable-osx-universal-binary, add it and
try again, I got a error,
checking size of long double... configure: error: in `/Library/Caches/Homebrew/ImageMagick-6.9.3-0':
configure: error: cannot compute sizeof (long double)
See `config.log' for more details,
About this option I searched on the discusses, I found this viewtopic.php?t=22406, but there's no answer.
Also I tried add CFLAGS=-m32, it still not work, and come with this error
checking for libltdl...
checking ltdl.h usability... yes
checking ltdl.h presence... yes
checking for ltdl.h... yes
checking for lt_dlinit in -lltdl... no
checking if libltdl package is complete... no -- some components failed test
configure: error: in `/private/tmp/imagemagick20160224-33062-1hzq8r/ImageMagick-6.9.3-0':
configure: error: libltdl is required for modules build
See `config.log' for more details
Please anyone can help me? I just want a 32bit imagemagick,
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to build 32bit version on OS X?
This is how I build IM on my Mac. I install all delegates from MacPorts, then install IM for whatever Q level and with/without HDRI from source. Works fine for me. See viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202
Change quantum-depth to 32 (though I mostly just use Q16 or Q16 HDRI). The Q16 HDRI gives you floating point accuracy. Q32 is 32-bit int and will not preserve fractional or negative values.
Change quantum-depth to 32 (though I mostly just use Q16 or Q16 HDRI). The Q16 HDRI gives you floating point accuracy. Q32 is 32-bit int and will not preserve fractional or negative values.
Re: How to build 32bit version on OS X?
fmw42 wrote:This is how I build IM on my Mac. I install all delegates from MacPorts, then install IM for whatever Q level and with/without HDRI from source. Works fine for me. See viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202
Change quantum-depth to 32 (though I mostly just use Q16 or Q16 HDRI). The Q16 HDRI gives you floating point accuracy. Q32 is 32-bit int and will not preserve fractional or negative values.
Thank you for your replay, I'm sorry, maybe I didn't ask the question clear, I want to build a i386 version, so the IM library can be used in 32bit program,
Not the Color Space. Any ideas?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to build 32bit version on OS X?
My notes have nothing to do with colorspace.
What I have provided is the mechanism to compile IM as any Q level. IM produces images that are restricted to positive integer values depending upon how IM is compiled. For Q8 (range 0 to 255), Q16 (range 0 to 65535), Q32 range 0 to 32-bit integer. If you need negative values or floating point values, then you should build IM as Q16 HDRI. These are the bit level ranges of any given channel (not of the whole RGB(A) image). If you build as Q16 or Q32, you can always specify -depth 8 in your command line to limit the output per channel graylevel range to 8 bits rather than 16 or 32 bits.
Depending upon what Q level you want, you need to change the ./configure command to specify --with-quantum-depth=16 (for Q16) or use 8 or 32 in place of 16. If you want HDRI Q16, then add --enable-hdri
Sorry, I do not know anything about i386 vs x86 or 32-bit vs 64-bit Mac versions.
What I have provided is the mechanism to compile IM as any Q level. IM produces images that are restricted to positive integer values depending upon how IM is compiled. For Q8 (range 0 to 255), Q16 (range 0 to 65535), Q32 range 0 to 32-bit integer. If you need negative values or floating point values, then you should build IM as Q16 HDRI. These are the bit level ranges of any given channel (not of the whole RGB(A) image). If you build as Q16 or Q32, you can always specify -depth 8 in your command line to limit the output per channel graylevel range to 8 bits rather than 16 or 32 bits.
Depending upon what Q level you want, you need to change the ./configure command to specify --with-quantum-depth=16 (for Q16) or use 8 or 32 in place of 16. If you want HDRI Q16, then add --enable-hdri
Sorry, I do not know anything about i386 vs x86 or 32-bit vs 64-bit Mac versions.
Re: How to build 32bit version on OS X?
Thank you for your reply, How about "cross compile"? In 32-bit program, all the binary should be 32-bit, just like on the download page, it provide both ImageMagick-6.9.3-5.x86_64.rpm (64-bit)and ImageMagick-6.9.3-5.i386.rpm (32-bit), but for Mac, there's only ImageMagick-x86_64-apple-darwin15.2.0.tar.gz, I need a i386 version.fmw42 wrote:My notes have nothing to do with colorspace.
What I have provided is the mechanism to compile IM as any Q level. IM produces images that are restricted to positive integer values depending upon how IM is compiled. For Q8 (range 0 to 255), Q16 (range 0 to 65535), Q32 range 0 to 32-bit integer. If you need negative values or floating point values, then you should build IM as Q16 HDRI. These are the bit level ranges of any given channel (not of the whole RGB(A) image). If you build as Q16 or Q32, you can always specify -depth 8 in your command line to limit the output per channel graylevel range to 8 bits rather than 16 or 32 bits.
Depending upon what Q level you want, you need to change the ./configure command to specify --with-quantum-depth=16 (for Q16) or use 8 or 32 in place of 16. If you want HDRI Q16, then add --enable-hdri
Sorry, I do not know anything about i386 vs x86 or 32-bit vs 64-bit Mac versions.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to build 32bit version on OS X?
Sorry, I do not know how to do that. I suspect there is some command that needs to be supplied to the ./configure that will do that. One of the IM developers would have to provide that information. Unfortunately, IM does not provide both as binaries, so you will have to compile from source. See http://www.imagemagick.org/script/insta ... e.php#unix and http://www.imagemagick.org/script/advan ... php#macosx
Re: How to build 32bit version on OS X?
Yes, those two documents I have read, and I wrote the steps what I have done before, you can check it, Unfortunately, it doesn't work.fmw42 wrote:Sorry, I do not know how to do that. I suspect there is some command that needs to be supplied to the ./configure that will do that. One of the IM developers would have to provide that information. Unfortunately, IM does not provide both as binaries, so you will have to compile from source. See http://www.imagemagick.org/script/insta ... e.php#unix and http://www.imagemagick.org/script/advan ... php#macosx
So I asked here. Hope someone can help me.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to build 32bit version on OS X?
I expect that one of the IM developers can point you in the right direction.
Re: How to build 32bit version on OS X?
Thanks again, and anyone can help me?fmw42 wrote:I expect that one of the IM developers can point you in the right direction.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to build 32bit version on OS X?
From ./configure, it seems you get i386 only if both host is *darwin* or *-macos10*, and enable_osx_universal_binary is set (./configure option "--enable-osx-universal-binary").
But I'm not an expert on configure or Macs.
But I'm not an expert on configure or Macs.
snibgo's IM pages: im.snibgo.com
Re: How to build 32bit version on OS X?
Yes, but if I set enable_osx_universal_binary it will get a error.snibgo wrote:From ./configure, it seems you get i386 only if both host is *darwin* or *-macos10*, and enable_osx_universal_binary is set (./configure option "--enable-osx-universal-binary").
But I'm not an expert on configure or Macs.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to build 32bit version on OS X?
Perhaps the OP should provide his full ./configure command.
Re: How to build 32bit version on OS X?
Anyone else can help me?
-
- Posts: 1
- Joined: 2016-09-28T04:40:42-07:00
- Authentication code: 1151
Re: How to build 32bit version on OS X?
For what it's worth in case anyone else stumbles into this topic looking for help, I managed to get this working with the following configure command:
./configure --with-quantum-depth=16 --disable-dependency-tracking --without-perl CFLAGS="-arch i386" LDFLAGS="-arch i386" --enable-hdri=no --with-jpeg=yes --with-tiff=yes
However, having tried to modify the Homebrew script to use the same configure arguments did not work - in the end I just downloaded and built manually.
./configure --with-quantum-depth=16 --disable-dependency-tracking --without-perl CFLAGS="-arch i386" LDFLAGS="-arch i386" --enable-hdri=no --with-jpeg=yes --with-tiff=yes
However, having tried to modify the Homebrew script to use the same configure arguments did not work - in the end I just downloaded and built manually.