emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make bootstrap fails on Mac OS X


From: Nozomu Ando
Subject: make bootstrap fails on Mac OS X
Date: Thu, 17 Jul 2003 20:33:58 +0900

On Mac OS X 10.2.6, "make bootstrap" fails with the following error (only me???):

                :
        ./temacs --batch --load loadup bootstrap
        Loading loadup.el (source)...
                :
        0x995000 (sz:   0x4000)
        0x98f000 (sz:   0x6000)
        0x988000 (sz:   0x7000)
        0x984000 (sz:   0x4000)
        malloc_freezedry_recorder: too many regions
        --- Load Commands written to Output File ---
        Writing segment __PAGEZERO       at        0 -        0 (sz:        0)
        Writing segment __TEXT           at        0 - 0x238000 (sz: 0x238000)
        Writing segment __DATA           at 0x238000 - 0x324000 (sz:  0xec000)
                :
        Writing LC_UNIXTHREAD     command
        0 unused bytes follow Mach-O header
        65240 pure bytes used
        mv -f emacs bootstrap-emacs
                :
        (cd lisp; make  bootstrap EMACS=../src/bootstrap-emacs)
                :
        ../src/bootstrap-emacs -batch --no-site-file --multibyte \
                -l autoload --eval '(setq generated-autoload-file \
                "/work/emacs/lisp/loaddefs.el")' -f batch-update-autoloads $wins
        Fatal error (11).

I think the problem is that there are too many unexec_regions.
So I wrote some code for sorting and merging unexec_regions.
Emacs works fine for me with the following patch.
(But I am not sure the patch is correct...)

Regards,
Nozomu Ando
---
Index: src/unexmacosx.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/unexmacosx.c,v
retrieving revision 1.5
diff -u -r1.5 unexmacosx.c
--- src/unexmacosx.c    18 Feb 2003 15:58:00 -0000      1.5
+++ src/unexmacosx.c    17 Jul 2003 08:14:44 -0000
@@ -364,7 +364,7 @@
 }


-#define MAX_UNEXEC_REGIONS 30
+#define MAX_UNEXEC_REGIONS 200

 int num_unexec_regions;
 vm_range_t unexec_regions[MAX_UNEXEC_REGIONS];
@@ -383,6 +383,45 @@
     fprintf (stderr, "malloc_freezedry_recorder: too many regions\n");
 }

+static int
+unexec_regions_sort_compar (const void *a, const void *b)
+{
+  vm_address_t aa = ((vm_range_t *)a)->address;
+  vm_address_t bb = ((vm_range_t *)b)->address;
+  if (aa < bb)
+    return -1;
+  else if (aa > bb)
+    return 1;
+  else
+    return 0;
+}
+
+static void
+unexec_regions_merge ()
+{
+  int i, n;
+  vm_range_t r;
+
+ qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]),
+        &unexec_regions_sort_compar);
+  n = 0;
+  r = unexec_regions[0];
+  for (i = 1; i < num_unexec_regions; i++)
+    {
+      if (r.address + r.size == unexec_regions[i].address)
+       {
+         r.size += unexec_regions[i].size;
+       }
+      else
+       {
+         unexec_regions[n++] = r;
+         r = unexec_regions[i];
+       }
+    }
+  unexec_regions[n++] = r;
+  num_unexec_regions = n;
+}
+
 static kern_return_t
unexec_reader (task_t task, vm_address_t address, vm_size_t size, void **ptr)
 {
@@ -673,6 +712,7 @@
      the input file.
      */
   file_offset = scp->fileoff + scp->filesize;
+  unexec_regions_merge ();
   for (j = 0; j < num_unexec_regions; j++)
     {
       struct segment_command sc;
---


In GNU Emacs 21.3.50.1 (powerpc-apple-darwin6.6)
 of 2003-07-17 on titanium.nand.homeunix.net
configured using `configure '--without-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Recent input:
<return> l s <return> <escape> x e m a c s SPC p r
e SPC SPC <backspace> <backspace> <backspace> SPC C-g
<escape> x s e n d SPC SPC SPC C-g <escape> x C-g C-h
f p r e t e s t <return> <escape> x b u g <return>
C-h f b u g <return> <return> C-g C-g C-h a b u g <return>
C-x o C-s s e n d C-a C-v C-a C-x o C-a C-x 1 <escape>
x r e p o r t SPC e m a c s SPC b u SPC <return>

Recent messages:
Mark saved where search started
Updated /work/emacs/src/unexmacosx.c
Mark set
/work
Making completion list...
Quit [8 times]
Loading apropos...done
Type C-x 1 to remove help window.  C-M-v to scroll the help.
Mark saved where search started
Loading emacsbug...done





reply via email to

[Prev in Thread] Current Thread [Next in Thread]