Subject: Re: bug#6401:

From: "Tim Daly Jr." <[email-masked]>
Date: Sun, 20 Nov 2011 18:33:50 -0800

I had the same problem.  Here's what seems to be going on:

charset.c is looking in Vdata_directory/charsets.

Vdata_directory gets set in callproc.c:

  char *data_dir = egetenv ("EMACSDATA");
...
  Vdata_directory
    = Ffile_name_as_directory (build_string (data_dir ? data_dir
					     : PATH_DATA));

I ran make from a shell buffer inside a carbon emacs process.  EMACSDATA, as well as several other such variables, are set:

$ env |grep ^EMACS
EMACSDATA=/Applications/Emacs.app/Contents/Resources/etc
EMACSPATH=/Applications/Emacs.app/Contents/MacOS/libexec:/Applications/Emacs.app/Contents/MacOS/bin
EMACS=t
EMACSLOADPATH=/Applications/Emacs.app/Contents/Resources/site-lisp:/Applications/Emacs.app/Contents/Resources/lisp:/Applications/Emacs.app/Contents/Resources/leim
EMACSDOC=/Applications/Emacs.app/Contents/Resources/etc

I unset EMACSDATA (and a few others, for the heck of it), and the build succeeded.

Cheers,
Tim