unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Building on Mac (Intel) [patch]
@ 2006-02-06 14:16 David Reitter
  2006-02-06 16:19 ` Nozomu Ando
  0 siblings, 1 reply; 3+ messages in thread
From: David Reitter @ 2006-02-06 14:16 UTC (permalink / raw)


Building on Intel Macs works fine except for two issues.

The first one is minor and solved by the patch below. Building fails  
with --self-contained otherwise for obvious reasons.

The second issue I'm having is more problematic:
Building fails regularly due to what seems to be a problem with my  
site-load.el and dumping in the bootstrap phase. I usually get   
(during temacs -batch -l loadup bootstrap):

Writing LC_TWOLEVEL_HINTS command
Writing LC_UNIXTHREAD     command
unexec: not enough room for load commands for new __DATA segments
make[2]: *** [bootstrap-emacs] Error 1
make[1]: *** [bootstrap-build] Error 2

or, depending on how much is in site-load, this:

Writing segment __DATA           at 0xa6e000 - 0x1276000 (sz: 0x808000)
Writing segment __IMPORT         at 0x1276000 - 0x1279000 (sz:    
0xunexec: not enough room for load commands for new __DATA segments
3000)
Writing segment __LINKEDIT       at 0x1279000 - 0x1578438 (sz: 0x2ff438)

My SITELOAD_PURESIZE_EXTRA is set to 2000000. Increasing or  
decreasing the value doesn't help.

I can reproduce the problem with a minimal site-load.el as follows:

(load "emacs-lisp/debug")
(load "emacs-lisp/byte-opt")

... and calling "temacs ... bootstrap" directly.

Without either of the above site-load.el, things seem to work  
smoothly with about the following result:

56 unused bytes follow Mach-O header
75052 pure bytes used

So it looks to me like there is not enough pure space allocated  
during the bootstrap phase and SITELOAD_PURESIZE_EXTRA is ignored.  
Maybe PURESIZE_RATIO plays a role.

I have been using the full site-load.el without problems for hundreds  
of compiles with PPC OS X.

Any suggestions as to what to check next?

===

diff -c -r1.23 mac/make-package
*** mac/make-package        20 Oct 2005 15:49:36 -0000      1.23
--- mac/make-package        6 Feb 2006 08:58:45 -0000
***************
*** 325,331 ****
     fi
   fi

! compver=powerpc-apple-darwin`uname -r`

   if test "$self_contained" = "yes"; then
       # Move shared files down to Resources directory
--- 325,331 ----
     fi
   fi

! compver=`uname -p`-apple-`uname -s | tr A-Z a-z``uname -r`

   if test "$self_contained" = "yes"; then
       # Move shared files down to Resources directory

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building on Mac (Intel) [patch]
  2006-02-06 14:16 Building on Mac (Intel) [patch] David Reitter
@ 2006-02-06 16:19 ` Nozomu Ando
  2006-02-07 11:13   ` David Reitter
  0 siblings, 1 reply; 3+ messages in thread
From: Nozomu Ando @ 2006-02-06 16:19 UTC (permalink / raw)
  Cc: Emacs-Devel '

David Reitter <david.reitter@gmail.com> writes:
> unexec: not enough room for load commands for new __DATA segments

There are too many segments to dump. You should increase
 `-headerpad -Xlinker ' parameter of LD_SWITCH_SYSTEM_TEMACS
 in src/s/darwin.h

src/s/darwin.h says:

  /* The -headerpad option tells ld (see man page) to leave room at the
     end of the header for adding load commands.  Needed for dumping.
     0x690 is the total size of 30 segment load commands (at 56
     each).  */

Nozomu Ando

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building on Mac (Intel) [patch]
  2006-02-06 16:19 ` Nozomu Ando
@ 2006-02-07 11:13   ` David Reitter
  0 siblings, 0 replies; 3+ messages in thread
From: David Reitter @ 2006-02-07 11:13 UTC (permalink / raw)
  Cc: Steven Tamm, Nozomu Ando

On 6 Feb 2006, at 16:19, Nozomu Ando wrote:

> David Reitter <david.reitter@gmail.com> writes:
>> unexec: not enough room for load commands for new __DATA segments
>
> There are too many segments to dump. You should increase
>  `-headerpad -Xlinker ' parameter of LD_SWITCH_SYSTEM_TEMACS
>  in src/s/darwin.h

Fantastic, this did the trick. Thanks.
It compiles fine now with the below patch plus the patch that I  
posted earlier.

I haven't tested the resulting .app, but in a Terminal with -nw,  
things look normal. It's nice and fast.


diff -c -r1.25 darwin.h
*** src/s/darwin.h      13 Nov 2005 05:47:10 -0000      1.25
--- src/s/darwin.h      7 Feb 2006 11:07:00 -0000
***************
*** 274,282 ****

   /* The -headerpad option tells ld (see man page) to leave room at the
      end of the header for adding load commands.  Needed for dumping.
!    0x690 is the total size of 30 segment load commands (at 56
      each).  */
! #define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_CARBON -Xlinker - 
headerpad -Xlinker 690

   #define C_SWITCH_SYSTEM_TEMACS -Dtemacs

--- 274,282 ----

   /* The -headerpad option tells ld (see man page) to leave room at the
      end of the header for adding load commands.  Needed for dumping.
!    0x8C0 is the total size of 40 segment load commands (at 56
      each).  */
! #define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_CARBON -Xlinker - 
headerpad -Xlinker 8C0

   #define C_SWITCH_SYSTEM_TEMACS -Dtemacs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-07 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-06 14:16 Building on Mac (Intel) [patch] David Reitter
2006-02-06 16:19 ` Nozomu Ando
2006-02-07 11:13   ` David Reitter

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).