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

Tim Becker tim.becker@REDACTED
Sun Apr 6 12:26:27 CEST 2008


Hi,

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
problem.

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
  -D_THREAD_SAFE -D_REENTRANT -fPIC -fno-common -DHAVE_CONFIG_H -O2
-I/Users/tim/tools/erlang/otp_src_R12B-1/erts/emulator/beam
  -I/Users/tim/tools/erlang/otp_src_R12B-1/erts/emulator/sys/unix
-I/Users/tim/tools/erlang/otp_src_R12B-1/erts/include/internal
  -I/Users/tim/tools/erlang/otp_src_R12B-1/erts/include/internal/unix
-I/Users/tim/tools/erlang/otp_src_R12B-1/erts/include
-I/Users/tim/tools/erlang/otp_src_R12B-1/erts/include/unix
    egd_port_driver.c

  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
(http://www.erlang.org/pipermail/erlang-bugs/2007-December/000531.html),
you can add the line:

  CC_R_FLAG=-rpath

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
system.

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
help.

Thanks,
   -Tim



More information about the erlang-bugs mailing list