[Openmcl-devel] Difficulty building current bleeding edge

Gary Byers gb at clozure.com
Sat Nov 26 00:21:13 PST 2005



On Fri, 25 Nov 2005, David Steuber wrote:

> (if (holidayp 'thanksgiving)
>   (fortmat t "Happy thanksgiving,~%")
>   (format t "Hi,~%"))
>

I'm out of town for the holiday, and have a poor net connection at
the moment.

> I'm having a problem compiling ccl-dev from 25 Nov.  It looks like make
> fails in lisp-kernel/darwinppc.  I'm still running 10.3.9 and Xcode
> 1.5, specifically:
>
> ld  -arch ppc -dynamic  -o ../../dppccl -e start -seg1addr 0x00004000
> -sectalign __TEXT __text 0x1000 -pagezero_size 0x4000 ppc-spjump.o
> ppc-spentry.o  ppc-subprims.o  imports.o pmcl-kernel.o gc.o bits.o
> ppc-exceptions.o thread_manager.o lisp-debug.o image.o memory.o
> ppc-asmutils.o  lispdcmd.o plprint.o plsym.o plbt.o ppc_print.o
> -lcrt1.o -lgcc -lSystem
> ld: Undefined symbols:
> ___builtin_clz

There's an inlined function definition - called something like
"count_leading_zeros" - defined in one of the kernel header files.
Until a week or two ago, it expanded into some inline assembler that
did a "cntlzw" or "cntlzd" on PPC; it seemed a little cleaner to just
use the GCC __builtin_clz intrinsic (or the 64-bit version of it.)  It
-would- be cleaner, if all versions of GCC supported it; apparently,
they don't.

This should be fixed for real (the GC needs to be able to find set
bits in a bit vector as quickly as it can), but the inlined version
is only defined if __GCC__ is.  A simple fix would be to change the
#ifdef __GCC__ that controls that definition to #if 0; that'll cause
an assembly-language version of "count_leading_zeros" to be used
instead.

> I've never seen a failure before building the lisp kernel and I missed
> seeing anything in the ChangeLog that would clue me in.  Any ideas?
>

The ChangeLog entry for 11-13 20:30 describes "lots-o-changes".  I think
that this was one of them.

> This is not urgent.  I back up dppccl and dppccl.image before I build
> from CVS.
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list