Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

make for emacs fails under OS X 10.5

24 views
Skip to first unread message

Steffen Heise

unread,
Oct 27, 2007, 6:10:11 PM10/27/07
to bug-gn...@gnu.org
make fails with the following error message:

Assertion failed: (filesize <= ranges->size), function
unexec_regions_recorder, file unexmacosx.c, line 454.
make[1]: *** [emacs] Abort trap
make[1]: *** Deleting file `emacs'
make: *** [src] Error 2

Steffen


YAMAMOTO Mitsuharu

unread,
Oct 28, 2007, 7:26:29 PM10/28/07
to Steffen Heise, bug-gn...@gnu.org

Could you try the following patch? I can't test it myself as I don't
have Leopard yet.

YAMAMOTO Mitsuharu
mitu...@math.s.chiba-u.ac.jp

Index: src/unexmacosx.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/unexmacosx.c,v
retrieving revision 1.22.2.1
diff -c -p -r1.22.2.1 unexmacosx.c
*** src/unexmacosx.c 25 Jul 2007 05:15:30 -0000 1.22.2.1
--- src/unexmacosx.c 28 Oct 2007 23:16:01 -0000
*************** unexec_regions_recorder (task_t task, vo
*** 443,457 ****

while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
{
! /* Subtract the size of trailing null pages from filesize. It
can be smaller than vmsize in segment commands. In such a
! case, trailing pages are initialized with zeros. */
! for (p = ranges->address + ranges->size; p > ranges->address;
! p -= sizeof (int))
! if (*(((int *) p)-1))
break;
! filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address);
! assert (filesize <= ranges->size);

unexec_regions[num_unexec_regions].filesize = filesize;
unexec_regions[num_unexec_regions++].range = *ranges;
--- 443,455 ----

while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
{
! /* Subtract the size of trailing null bytes from filesize. It
can be smaller than vmsize in segment commands. In such a
! case, trailing bytes are initialized with zeros. */
! for (p = ranges->address + ranges->size; p > ranges->address; p--)
! if (*(((char *) p)-1))
break;
! filesize = p - ranges->address;

unexec_regions[num_unexec_regions].filesize = filesize;
unexec_regions[num_unexec_regions++].range = *ranges;


Steffen Heise

unread,
Oct 28, 2007, 8:25:20 PM10/28/07
to YAMAMOTO Mitsuharu, bug-gn...@gnu.org
It compiles and runs, but there was an error at the end:

./emacs -q -batch -f list-load-path-shadows
make: *** [emacs] Bus error
mkdir -p /Users/heise/Downloads/emacs-22.1/src/../mac/Emacs.app/
Contents/MacOS/;
cd /Users/heise/Downloads/emacs-22.1/src/../mac/Emacs.app/Contents/
MacOS/; cp ../../../../src/emacs Emacs

Steffen

Steffen Heise

unread,
Oct 28, 2007, 8:35:30 PM10/28/07
to YAMAMOTO Mitsuharu, bug-gn...@gnu.org

emacs runs from the command line in the terminal, but not as regularly
with the graphical user interface.

make install fails, too.

cd lib-src; make all \
CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-fpascal-
strings -DMAC_OSX ' \
LDFLAGS='' MAKE='make'
make[1]: Nothing to be done for `all'.
cd src; make all \
CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-fpascal-
strings -DMAC_OSX ' \
LDFLAGS='' MAKE='make'
make[1]: Nothing to be done for `all'.
(export PARALLEL; PARALLEL=0; cd leim; make all \
CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-fpascal-
strings -DMAC_OSX ' \
LDFLAGS='' MAKE='make')
EMACSLOADPATH=/Users/heise/Downloads/emacs-22.1/leim/../lisp
LC_ALL=C ../src/emacs -batch --no-init-file --no-site-file --multibyte
-l /Users/heise/Downloads/emacs-22.1/leim/../lisp/international/titdic-
cnv \
-f batch-titdic-convert -dir quail /Users/heise/Downloads/
emacs-22.1/leim/CXTERM-DIC; \
echo "changed" > changed.tit
/bin/sh: ../src/emacs: Cannot allocate memory
EMACSLOADPATH=/Users/heise/Downloads/emacs-22.1/leim/../lisp
LC_ALL=C ../src/emacs -batch --no-init-file --no-site-file --multibyte
-f batch-byte-compile quail/CCDOSPY.el
/bin/sh: ../src/emacs: Cannot allocate memory
make[1]: *** [quail/CCDOSPY.elc] Error 126
make: *** [leim] Error 2

YAMAMOTO Mitsuharu

unread,
Oct 29, 2007, 7:17:48 PM10/29/07
to Steffen Heise, bug-gn...@gnu.org
This patch seems to work. I've tested it only on PPC as I don't have
multiple licenses for Leopard. Could you report the result if you
have Leopard on Intel Mac?

YAMAMOTO Mitsuharu
mitu...@math.s.chiba-u.ac.jp

Index: src/unexmacosx.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/unexmacosx.c,v
retrieving revision 1.22.2.1
diff -c -p -r1.22.2.1 unexmacosx.c
*** src/unexmacosx.c 25 Jul 2007 05:15:30 -0000 1.22.2.1

--- src/unexmacosx.c 29 Oct 2007 23:09:00 -0000


*************** unexec_regions_recorder (task_t task, vo
*** 443,457 ****

while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
{
! /* Subtract the size of trailing null pages from filesize. It
can be smaller than vmsize in segment commands. In such a
! case, trailing pages are initialized with zeros. */

! for (p = ranges->address + ranges->size; p > ranges->address;

! p -= sizeof (int))
! if (*(((int *) p)-1))

! break;


! filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address);
! assert (filesize <= ranges->size);

unexec_regions[num_unexec_regions].filesize = filesize;
unexec_regions[num_unexec_regions++].range = *ranges;
--- 443,455 ----

while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
{
! /* Subtract the size of trailing null bytes from filesize. It
can be smaller than vmsize in segment commands. In such a
! case, trailing bytes are initialized with zeros. */

! for (p = ranges->address + ranges->size; p > ranges->address; p--)
! if (*(((char *) p)-1))

! break;


! filesize = p - ranges->address;

unexec_regions[num_unexec_regions].filesize = filesize;
unexec_regions[num_unexec_regions++].range = *ranges;

*************** unexec_regions_merge ()
*** 503,513 ****
--- 501,519 ----
{
int i, n;
unexec_region_info r;
+ vm_size_t padsize;

qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]),
&unexec_regions_sort_compare);
n = 0;
r = unexec_regions[0];
+ padsize = r.range.address & (pagesize - 1);
+ if (padsize)
+ {
+ r.range.address -= padsize;
+ r.range.size += padsize;
+ r.filesize += padsize;
+ }
for (i = 1; i < num_unexec_regions; i++)
{
if (r.range.address + r.range.size == unexec_regions[i].range.address
*************** unexec_regions_merge ()
*** 520,525 ****
--- 526,542 ----
{
unexec_regions[n++] = r;
r = unexec_regions[i];
+ padsize = r.range.address & (pagesize - 1);
+ if (padsize)
+ {
+ if ((unexec_regions[n-1].range.address
+ + unexec_regions[n-1].range.size) == r.range.address)
+ unexec_regions[n-1].range.size -= padsize;
+
+ r.range.address -= padsize;
+ r.range.size += padsize;
+ r.filesize += padsize;
+ }
}
}
unexec_regions[n++] = r;
*************** print_load_command_name (int lc)
*** 562,567 ****
--- 579,589 ----
case LC_TWOLEVEL_HINTS:
printf ("LC_TWOLEVEL_HINTS");
break;
+ #ifdef LC_UUID
+ case LC_UUID:
+ printf ("LC_UUID ");
+ break;
+ #endif
default:
printf ("unknown ");
}


naan

unread,
Oct 30, 2007, 4:04:28 AM10/30/07
to
I tried this patch with my Intel Mac and it works well so far.

Thanks,

On Oct 29, 4:17 pm, YAMAMOTO Mitsuharu <mituh...@math.s.chiba-u.ac.jp>
wrote:


> This patch seems to work. I've tested it only on PPC as I don't have
> multiple licenses for Leopard. Could you report the result if you
> have Leopard on Intel Mac?
>
> YAMAMOTO Mitsuharu

> mituh...@math.s.chiba-u.ac.jp

Steffen Heise

unread,
Oct 30, 2007, 8:37:53 PM10/30/07
to YAMAMOTO Mitsuharu, bug-gn...@gnu.org
Everything seems to be working fine.

Thanks,
Steffen


On Oct 29, 2007, at 7:17 PM, YAMAMOTO Mitsuharu wrote:

> This patch seems to work. I've tested it only on PPC as I don't have
> multiple licenses for Leopard. Could you report the result if you
> have Leopard on Intel Mac?
>
> YAMAMOTO Mitsuharu

> mitu...@math.s.chiba-u.ac.jp

astro951

unread,
Oct 31, 2007, 12:13:54 AM10/31/07
to Bug-gn...@gnu.org

This patch works for me running Leopard on a mini Core Duo, Macbook Pro C2D,
and Mac Pro.

--
View this message in context: http://www.nabble.com/make-for-emacs-fails-under-OS-X-10.5-tf4705159.html#a13502507
Sent from the Emacs - Bugs mailing list archive at Nabble.com.

sle...@gmail.com

unread,
Nov 1, 2007, 7:49:54 AM11/1/07
to
On Oct 29, 4:17 pm, YAMAMOTO Mitsuharu <mituh...@math.s.chiba-u.ac.jp>
wrote:
> This patch seems to work. I've tested it only on PPC as I don't have
> multiple licenses for Leopard. Could you report the result if you
> have Leopard on Intel Mac?

Just to clarify, the patch (thank you Yamamoto Mitsuharu!) works great
for Leopard on Intel Macs (mine is a Core 2 Duo iMac) when applied to
GNU Emacs 22.1 release. The patch does allow GNU Emacs from CVS
(presently 23.0.50) to build (though configure doesn't properly set
HAVE_LIBRESOLV -- just add `-lresolv' to the temacs link rule in src/
Makefile). However, Emacs 23.0.50 freezes on any sort of input.
Similarly, the patch allows Emacs-app rc2a to build and run, but as
with 23.0.50, it seems unusable.

William Xu

unread,
Nov 2, 2007, 4:09:20 AM11/2/07
to bug-gn...@gnu.org
sle...@gmail.com writes:

> However, Emacs 23.0.50 freezes on any sort of input.

Yes, same here... Typing any key, it takes several seconds to respond
again. Barely usable.

There are also lots of deprecation warnings when `make'. Looks like
dramatic codes need updating..

--
William

Ted Zlatanov

unread,
Nov 2, 2007, 11:42:51 AM11/2/07
to
On Fri, 02 Nov 2007 17:09:20 +0900 William Xu <willi...@gmail.com> wrote:

WX> sle...@gmail.com writes:
>> However, Emacs 23.0.50 freezes on any sort of input.

WX> Yes, same here... Typing any key, it takes several seconds to respond
WX> again. Barely usable.

This has been reported to the emacs-devel mailing list repeatedly. It
was probably introduced with the Unicode merge in August. See the
emacs-devel archives or

http://www.nabble.com/23.0.50--MacOS-X-10.4%3A-very-slow-visuals%2C-multi-tty-patch-suspected-t4391080.html

Short answer: there's no solution yet.

Ted

William Xu

unread,
Nov 3, 2007, 12:46:57 AM11/3/07
to bug-gn...@gnu.org
Ted Zlatanov <t...@lifelogs.com> writes:

> This has been reported to the emacs-devel mailing list repeatedly. It
> was probably introduced with the Unicode merge in August.

Hmm, i'm running it happily now with:

,----[ emacs-version ]
| GNU Emacs 23.0.50.9 (powerpc-apple-darwin8.10.0, Carbon Version 1.6.0)
| of 2007-10-20 on enjoy-life
`----

I built it on osx 10.4.10, with option, `--prefix=$HOME --with-carbon
--without-x'.

And the other thing is that i disable the fink in the `configure' file
by applying nofink.patch from carbon emacs 22.1. (since i couldn't even
bootstrap emacs with fink, and i also don't understand why people refuse
to remove it)

So i guess the slow responsiveness is introduced either by recent cvs
changes(20071020 - now) or osx changes(10.4 -> 10.5).

Since I built cvs emacs regularly, looks like i could still run cvs
emacs built after 20071020, but i couldn't remember the exact revision
that introduced this problem. (And i have no osx 10.4 anymore..)

--
William

Ted Zlatanov

unread,
Nov 5, 2007, 2:14:34 PM11/5/07
to
On Sat, 03 Nov 2007 13:46:57 +0900 William Xu <willi...@gmail.com> wrote:

WX> Ted Zlatanov <t...@lifelogs.com> writes:
>> This has been reported to the emacs-devel mailing list repeatedly. It
>> was probably introduced with the Unicode merge in August.

WX> Hmm, i'm running it happily now with:

WX> ,----[ emacs-version ]
WX> | GNU Emacs 23.0.50.9 (powerpc-apple-darwin8.10.0, Carbon Version 1.6.0)
WX> | of 2007-10-20 on enjoy-life
WX> `----

WX> I built it on osx 10.4.10, with option, `--prefix=$HOME --with-carbon
WX> --without-x'.

WX> And the other thing is that i disable the fink in the `configure' file
WX> by applying nofink.patch from carbon emacs 22.1. (since i couldn't even
WX> bootstrap emacs with fink, and i also don't understand why people refuse
WX> to remove it)

I use Darwin Ports, no Fink. gcc comes from the Apple dev tools.

I am still experiencing the problem, and I'm pretty sure it hasn't
changed since August when I first noticed it. Please try making a clean
build with any version between August and now, on OS X 10.4 or 10.5, and
you'll see the input problem. If you really are not having the input
problem with the build you mention above, maybe it doesn't occur on PPC
platforms (i386 here). I'm very curious about your build, because no
one else has reported success on MacOS as you have.

The last good build for me was
GNU Emacs 22.1.50.2 (i386-apple-darwin8.10.1, Carbon Version 1.6.0) of 2007-08-01 on tzz.local

and the last build I tried, which has the input problem:
GNU Emacs 23.0.50.1 (i386-apple-darwin9.0.0, Carbon Version 1.6.0) of 2007-08-01 on tzz.local

WX> So i guess the slow responsiveness is introduced either by recent cvs
WX> changes(20071020 - now) or osx changes(10.4 -> 10.5).

It's definitely not OS X 10.4 vs 10.5. I have observed the input
problem on both (10.4.10 and 10.5).

WX> Since I built cvs emacs regularly, looks like i could still run cvs
WX> emacs built after 20071020, but i couldn't remember the exact revision
WX> that introduced this problem. (And i have no osx 10.4 anymore..)

Ted

Ted Zlatanov

unread,
Nov 5, 2007, 4:09:47 PM11/5/07
to
On Mon, 05 Nov 2007 13:14:34 -0600 Ted Zlatanov <t...@lifelogs.com> wrote:

TZ> and the last build I tried, which has the input problem:
TZ> GNU Emacs 23.0.50.1 (i386-apple-darwin9.0.0, Carbon Version 1.6.0) of 2007-08-01 on tzz.local

That's 2007-11-05 for the date, sorry:

GNU Emacs 23.0.50.1 (i386-apple-darwin9.0.0, Carbon Version 1.6.0) of 2007-11-05 on tzz.local

Ted

William Xu

unread,
Nov 6, 2007, 3:27:43 AM11/6/07
to bug-gn...@gnu.org
Ted Zlatanov <t...@lifelogs.com> writes:

> If you really are not having the input
> problem with the build you mention above, maybe it doesn't occur on PPC
> platforms (i386 here). I'm very curious about your build, because no
> one else has reported success on MacOS as you have.

Yes, i have no input problem too. I saw people talking about the input
problem on some mailing list, which i actually didn't know what they were
talking about.

But i only started to build emacs on my ibook since Sep (i installed
debian on it previously). So i don't know much about its previous
status. Maybe my success is due to ppc platform.

Anyway, i just bought a new macbook..I'll have to struggle to make it
work on osx as you guys too...

--
William

Richard Stallman

unread,
Nov 6, 2007, 3:37:29 AM11/6/07
to Ted Zlatanov, bug-gn...@gnu.org
The last good build for me was
GNU Emacs 22.1.50.2 (i386-apple-darwin8.10.1, Carbon Version 1.6.0) of 2007-08-01 on tzz.local

Can you determine which change caused the problem?


Ted Zlatanov

unread,
Nov 6, 2007, 2:18:30 PM11/6/07
to
On Tue, 06 Nov 2007 03:37:29 -0500 Richard Stallman <r...@gnu.org> wrote:

RS> The last good build for me was
RS> GNU Emacs 22.1.50.2 (i386-apple-darwin8.10.1, Carbon Version 1.6.0) of 2007-08-01 on tzz.local

RS> Can you determine which change caused the problem?

I can't exactly, since the unicode branch was merged when the problem
started happening. This was discussed at length on the emacs-devel
mailing list, and there's a whole Carbon vs. Cocoa issue that's
complicating things (and making the Carbon port less desirable to
developers, apparently). I know little about MacOS, Carbon, or Cocoa,
so other than testing fixes I'm not very useful there. I hope to
eventually find the time to track what changed since August that's
causing the input problem.

Ted

Glenn Morris

unread,
Nov 6, 2007, 6:26:33 PM11/6/07
to Ted Zlatanov, bug-gn...@gnu.org
Ted Zlatanov wrote:

> I can't exactly, since the unicode branch was merged when the problem
> started happening.

You mean multi-tty.

For clarity: we are talking about the CVS trunk here, not the 22 branch.

> This was discussed at length on the emacs-devel mailing list,

Yes. The Mac Carbon port in the CVS trunk has known problems and is
effectively unsupported. Bug reports about it are not helpful, and
this is the wrong list for any discussion about it (or any other
problems in non-released versions of Emacs).


Ted Zlatanov

unread,
Nov 7, 2007, 12:28:25 AM11/7/07
to
On Tue, 06 Nov 2007 18:26:33 -0500 Glenn Morris <r...@gnu.org> wrote:

GM> Ted Zlatanov wrote:
>> I can't exactly, since the unicode branch was merged when the problem
>> started happening.

GM> You mean multi-tty.

GM> For clarity: we are talking about the CVS trunk here, not the 22 branch.

>> This was discussed at length on the emacs-devel mailing list,

GM> Yes. The Mac Carbon port in the CVS trunk has known problems and is
GM> effectively unsupported. Bug reports about it are not helpful, and
GM> this is the wrong list for any discussion about it (or any other
GM> problems in non-released versions of Emacs).

Sorry. William Xu and sle...@gmail.com brought up the CVS Carbon
issues, and I continued the discussion here instead of redirecting it.

Ted

0 new messages