OS X 10.6 (Snow Leopard) build issues

1 view
Skip to first unread message

ddp

unread,
Nov 16, 2009, 7:44:08 AM11/16/09
to Jazz Scheme
Hi,

New user here. I'm trying to build Jazz from git on 10.6.2 with
Gambit 4.5.3 and Xcode 3.2.1 (gcc 4.2.1). The first issue is that
Gambit builds itself 32-bit by default though it defaults to producing
64-bit binaries. So without doing anything, you blow up in your first
link step trying to link 64-bit binaries against a 32-bit
libgambit.a. I rebuilt Gambit 64-bit mode to solve that:

bash$ CFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure --
enable-single-host --prefix=/usr/local/gambit

Alternatively you can add an "-m32" in the linker-options definition
in kernel/runtime/build.scm if you need to use 32-bit Gambit.

But wait, there's more... So now I'm stuck here:

% make
make kernel
; creating ./bin...
; creating ./bin/build...
; creating ./bin/build/products...
; creating ./bin/build/products/kernel...
; creating ./bin/build/kernel...
; creating ./bin/build/kernel/syntax...
; creating ./bin/build/kernel/runtime...
; generating ./bin/.configuration...
; generating ./bin/build/kernel/_architecture.scm...
; compiling ./bin/build/kernel/_architecture...
; compiling ./kernel/syntax/header...
; compiling ./kernel/syntax/macros...
; compiling ./kernel/syntax/expansion...
; compiling ./kernel/syntax/features...
; compiling ./kernel/syntax/declares...
; compiling ./kernel/syntax/primitives...
; compiling ./kernel/syntax/syntax...
; compiling ./kernel/syntax/runtime...
; compiling ./kernel/runtime/base...
; compiling ./kernel/runtime/common...
; compiling ./kernel/runtime/build...
; compiling ./kernel/runtime/settings...
; compiling ./kernel/runtime/install...
; compiling ./kernel/runtime/digest...
; compiling ./kernel/runtime/unit...
; compiling ./kernel/runtime/setup...
; generating ./bin/build/products/kernel/_product.scm...
; generating ./bin/build/products/kernel/_main.scm...
; compiling ./bin/build/products/kernel/_product...
; compiling ./bin/build/products/kernel/_main...
; creating link file...
; linking executable...
make core
; compiling core/base/_base...
; compiling core/base/syntax/_syntax...
; compiling core/base/syntax/macros...
; compiling core/base/runtime/_runtime...
; compiling core/base/runtime/boolean...
; compiling core/base/runtime/keyword...
; compiling core/base/runtime/list...
; compiling core/base/runtime/exception...
; compiling core/base/runtime/error...
; compiling core/base/runtime/reader...
; compiling core/base/runtime/serial...
; compiling core/base/runtime/string...
; compiling core/base/runtime/symbol...
; compiling core/base/runtime/syntax...
; compiling core/base/runtime/unspecified...
; compiling core/base/runtime/vector...
; compiling core/class/_class...
; compiling core/class/syntax/_syntax...
; compiling core/class/syntax/error...
; compiling core/class/syntax/object...
; compiling core/class/syntax/class...
; compiling core/class/syntax/define-class...
; compiling core/class/syntax/define-method-expander...
; compiling core/class/syntax/define-method...
; compiling core/class/syntax/classes...
; compiling core/class/runtime/_runtime...
; compiling core/class/runtime/runtime...
; compiling core/class/runtime/output-hook...
; compiling core/class/runtime/output...
; compiling core/exception/_exception...
; compiling core/exception/syntax/classes...
; compiling core/exception/runtime/exception...
; compiling core/exception/runtime/error...
; compiling core/generic/_generic...
; compiling core/generic/syntax/_syntax...
; compiling core/generic/syntax/expander...
; compiling core/generic/syntax/generic...
; compiling core/generic/syntax/specific...
; compiling core/generic/runtime/_runtime...
; compiling core/generic/runtime/specific...
; compiling core/generic/runtime/generic...
; compiling core/module/_module...
; compiling core/module/syntax/_syntax...
; compiling core/module/syntax/classes...
; compiling core/module/syntax/dialect-syntax...
; compiling core/module/syntax/dialect...
; compiling core/module/syntax/walker...

It's been compiling walker for a good 45 minutes now. I'm skeptical
that it's ever going to finish. Is this perhaps a known gcc bug?
Apple also ships gcc 4.0.1 (again, this is 4.2.1). Any opinion on
that or any other workaround would be appreciated...

Thanks!

Derrell

ddp

unread,
Nov 16, 2009, 8:07:59 AM11/16/09
to Jazz Scheme
A follow-up to my last post.

I tried falling back to gcc-4.0 and that seems to fix it though
gcc-4.0 does not default to x86_64 and thus I had to rebuild Gambit 32-
bit. However with that done, it's well past walker now. So I
conclude this is a bug in gcc-4.2.1.

Derrell

Guillaume Cartier

unread,
Nov 17, 2009, 11:12:37 AM11/17/09
to jazzs...@googlegroups.com
Indeed. GCC 4.2.x has severe problems handling large files.


A couple points :


First, we reduced walker.scm's size from 240K down to 185K. This should help a bit in all cases but compile times will still be pretty high.


Second, a test was added in the Jazz kernel to automatically disable SINGLE_HOST when using GCC version 4.2.x. This should solve the problem and make it so you can still build Gambit using --enable-single-host and only Jazz's files will have it disabled. Simples tests showed that for Jedi, not have SINGLE_HOST only had about a 5% performance impact so barely noticeable.


Finally, Jazz's build system supports turning on or off Gambit's debugging support in compiled code as they can have a big impact on compilation times.

By default it uses those flags to fully support debugging : debug-environments?: #t debug-location?: #t

By default they should stay turned on so new users have full debugging support. But for seasoned users, I suggest having 2 build configurations : one with those 2 debug flags set to #f and used to run Jedi and one with debugging info and also possibly optimize?: #f for running your Jazz applications with full debugging support.

Personally I have a setup with 2 Jazz git repositories :

- jazz : built without any debugging info and only containing stable Jazz code from the public repository
- jazz_dev : containing all my Jazz changes with full debugging info and optimize?: #f

With this setup, I usually run Jedi from the jazz repo and use it to remotely debug projects using the jazz_dev kernels. More on that setup later as I plan on making that setup into a standard profile included with jazz.


Timings results on Snow Leopard to compile walker.scm:

with SINGLE_HOST : 1h30
with SINGLE_HOST disabled : 3mn
with SINGLE_HOST disabled and no debugging info: 10s !!! so 490x faster


A full rebuild of jedi with SINGLE_HOST disabled and no debugging info is about 11mn.


Guillaume



Derrell

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Jazz Scheme" group.
To post to this group, send email to jazzs...@googlegroups.com
To unsubscribe from this group, send email to jazzscheme+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jazzscheme?hl=en
-~----------~----~----~----~------~----~------~--~---



Reply all
Reply to author
Forward
0 new messages