[erlang-bugs] R12-1 Build on MacOS (again, workaround)

Tim Becker <>
Sun Apr 6 12:26:27 CEST 2008


The fact that R12-1 doesn't build properly on Mac (Tiger/Leopard)
seems to be pretty well known by now, I'd like to summarize, though
and offer a workaround for the benefit of others running into this

The problem apparently has to do with link the gd imaging library that
the percept profiling tool uses. The suggested workaround:

./configure --without-gd

doesn't work, unfortunately. The build system will still try to make
percept, but will fail because it doesn't find the gd headers:

  gcc -c -o ../priv/obj/i386-apple-darwin9.2.0/egd_port_driver.o -g
-O2 -I/Users/tim/tools/erlang/otp_src_R12B-1/erts/i386-apple-darwin9.2.0
 -no-cpp-precomp    -DUSE_THREADS

  In file included from egd_port_driver.c:19:
  egd_image.h:22:16: error: gd.h: No such file or directory
  egd_image.h:23:21: error: gdfontt.h: No such file or directory

Oh the joy of autotools. Two solutions that do work:

* as was suggested by Aleix here
you can add the line:


to ./lib/percept/c_src/Makefile.in (preferable somewhere towards the top ;-)

* If you don't want to muck about with makefiles, a less gentle
solution to disable building percept is `rm -rf lib/percept`  the rest
of the build isn't affected by it and at least you'll have a running

I'm not sure if the fact that --without-gd doesn't work as expected is
indicative of other problems in the build system. I'm not very well
versed in autotools, unfortunately, so I'm afraid I can't be of much


More information about the erlang-bugs mailing list