Build IM on OS X Mountain Lion with FreeType and without X11

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Marc Rochkind
Posts: 10
Joined: 2013-02-01T15:14:21-07:00
Authentication code: 6789

Build IM on OS X Mountain Lion with FreeType and without X11

Post by Marc Rochkind »

No combination of options to configure seems to work. I've installed FreeType as a binary, and also built it from source. No matter what I've tried, and I've tried many different combinations of options, configure always reports this:

FreeType --with-freetype=yes no

Has anyone actually succeeded in doing this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by fmw42 »

type

convert -list configure

Look at the line starting with DELEGATES. Does it show freetype?

What version of IM are you using? Did you reinstall IM afterwards?

I am on Mac OSX Snow Leopard and use MacPorts to install all my delegates. Then I install IM manually from source and it works fine.

See
viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202
Marc Rochkind
Posts: 10
Joined: 2013-02-01T15:14:21-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by Marc Rochkind »

FreeType is definitely NOT on the list of delegates. That's exactly the problem!

I'm trying to build IM 6.8.2.

I did install FreeType using MacPorts. When that didn't work, I built it from source. Neither approach got IM's configure to think it was there. Maybe there are some additional configure options that might help it along? I'm doing this:

./configure --prefix=/opt --with-quantum-depth=16 \
--with-x=no \
--without-perl CC=clang --with-freetype=yes

I'm not quite sure what you meant about reinstall IM. Do you mean install the one I built?

It's possible that this works OK with Snow Leopard. There have been many changes with Mountain Lion, which is two releases newer. For one thing, X11 is no longer installed automatically, although I do have it installed (XQuartz). But, as I said, I'm trying to build without X.

Thanks for getting back to me...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by fmw42 »

I simply meant that once you install a delegate library, you generally need to re-install IM afterwards. It was not clear that you had done that.
Marc Rochkind
Posts: 10
Joined: 2013-02-01T15:14:21-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by Marc Rochkind »

I understand. But I was building IM from source. So the sequence was:

1. Install FreeType.
2. configure IM
3. make IM
4. install IM

However, my problems are in step #2. The output of configure (and the log) shows me that it did not include FreeType. And, making, installing, and running confirms that.

After all of this, I replaced #1 with building FreeType from source, and then went on to step #2.
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by yvonne »

I have the same issue :(. Anyone has an idea on how to resolve this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by fmw42 »

Did you verify that Freetype was actually installed correctly. Some delegate libraries need other supporting delegate libraries. If they are not installed first, then Freetype may not properly install. Thus IM would say it cannot use it and config would show "no"

I run on Mac OSX Snow Leopard and have not had any issues. But I install all my delegates from MacPorts and then manually install IM from source so I can keep up with it. See my post at viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202

You might try just installing IM from MacPorts.
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by yvonne »

thanks for your comments. Freetype has no external dependencies. As the user who started the thread, I tried with freetype installed by macport and freetype I built from source. No luck either way :(
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by yvonne »

I tried on Linux. Did not work either :(. hm.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by fmw42 »

The other question would be where did Freetype get installed. If not where IM expects it to be, then it won't recognize that it is there.

If you installed it from MacPorts it will be in /opt. If you install IM from source it will be in /usr/local/bin (or /usr/bin). You would have to tell ./configure where to look for anything installed by MacPorts. See my configure command in the link I gave above.
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by yvonne »

hm. Solid no. here is what's in config.log:


grep -w freetype *.log
$ ./configure CFLAGS=-g CPPFLAGS=-I/opt/local/include -I/opt/local/include/freetype2 LDFLAGS=-L/opt/local/lib --prefix=/Users/yvonnehli/development/core/mod_dims/pkgs/build --with-modules --enable-shared --disable-installed --enable-delegate-build --without-tiff --with-quantum-depth=8 --without-xml --without-lcms --without-x --with-freetype=yes --without-dps --without-magick-plus-plus --without-perl --with-threads
FreeType --with-freetype=yes no
CONFIGURE_ARGS='./configure '\''CFLAGS=-g'\'' '\''CPPFLAGS=-I/opt/local/include -I/opt/local/include/freetype2'\'' '\''LDFLAGS=-L/opt/local/lib'\'' '\''--prefix=/Users/yvonnehli/development/core/mod_dims/pkgs/build'\'' '\''--with-modules'\'' '\''--enable-shared'\'' '\''--disable-installed'\'' '\''--enable-delegate-build'\'' '\''--without-tiff'\'' '\''--with-quantum-depth=8'\'' '\''--without-xml'\'' '\''--without-lcms'\'' '\''--without-x'\'' '\''--with-freetype=yes'\'' '\''--without-dps'\'' '\''--without-magick-plus-plus'\'' '\''--without-perl'\'' '\''--with-threads'\'''


Anything wrong?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by fmw42 »

I am no expert on configuration, and it looks ok to me, but have tried simplifying it and letting it go to the default location.

This seemed to work for me:


./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --with-gslib --without-wmf \
--disable-silent-rules --disable-dependency-tracking --disable-openmp --without-pango \
--with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-lqr

Make yours as simple as possible and see if it installs. I did not even mention Freetype in my configure command and it installed it.

My only other thought would be something odd with the current Freetype install from MacPorts.
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by yvonne »

did this:
./configure \
CPPFLAGS='-I/opt/local/include' \
LDFLAGS='-L/opt/local/lib' \
--prefix=$(BUILD_ROOT) \
--with-modules \
--enable-shared \
--disable-installed \
--enable-delegate-build \
--without-tiff \
--with-quantum-depth=8 \
--without-xml \
--without-lcms \
--without-x \
--without-dps \
--without-magick-plus-plus \
--without-perl \
--with-threads;

and got:
grep -i freetype config.log
configure:29177: checking for FREETYPE
FreeType --with-freetype=yes no
ac_cv_env_FREETYPE_CFLAGS_set=
ac_cv_env_FREETYPE_CFLAGS_value=
ac_cv_env_FREETYPE_LIBS_set=
ac_cv_env_FREETYPE_LIBS_value=
FREETYPE_CFLAGS=''
FREETYPE_DELEGATE_FALSE=''
FREETYPE_DELEGATE_TRUE='#'
FREETYPE_LIBS=''

what to do? Really need to get it to work. And thank you so much for your help.
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by yvonne »

by the way, does IM looks for freetype under its root like it does for jpeg & png?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Build IM on OS X Mountain Lion with FreeType and without

Post by fmw42 »

I really do not know. But perhaps try leaving off all the --without in case Freetype needs something there.
Also to disable multithreading don't use -with threads, but try --without OpenMP
Post Reply