[Openmcl-devel] Building the ApplicationServices framework

Gary Byers gb at clozure.com
Fri Jun 27 05:32:47 PDT 2008


I don't know if it'll do much good to say "it works!" "no it doesn't"
back and forth, but here's a shorter transcript that seems to show
that things work for me.  Very generally, the transcript that you
sent suggested that something wasn't installed right.

;;; I have /usr/local/bin on my shell's search path, and it's
;;; therefore convenient for me to install ffigen in /usr/local.
;;; I'll remove it first, try to ensure that no other copies are
;;; installed, reinstall and reinvoke it.

;;; I need to be root (via sudo) to write to /usr/local, and I
;;; use tcsh.

[src/ccl-dev] gb at nasruddin> sudo tcsh
Password:
[src/ccl-dev] root at nasruddin> which h-to-ffi.sh
/usr/local/bin/h-to-ffi.sh

;;; The shell script that invokes the ffi translator is where I think
;;; it is.  Remove it (and the directory /usr/local/ffigen).

[src/ccl-dev] root at nasruddin> rm /usr/local/bin/h-to-ffi.sh
[src/ccl-dev] root at nasruddin> rm -rf /usr/local/ffigen/

;;; This is only necessary (if at all) with csh-based shells;
;;; it forces the shell to flush cached information about where
;;; executable programs are.

[src/ccl-dev] root at nasruddin> rehash

;;; And now 'which' can't find 'h-to-ffi.sh'.  Good; that means that
;;; I don't have another copy lurking around.

[src/ccl-dev] root at nasruddin> which h-to-ffi.sh
h-to-ffi.sh: Command not found.


;;; Extract the contents of the tar archive into /usr/local.

[src/ccl-dev] root at nasruddin> tar xvf ~/ffigen-apple-gcc-5465-x86-64-2007-11-06-00-00-59.tar.gz -C /usr/local
bin/
bin/h-to-ffi.sh
ffigen/
ffigen/bin/
ffigen/bin/ffigen
ffigen/include/
ffigen/include/arpa/
ffigen/include/arpa/nameser8_compat.h
ffigen/include/emmintrin.h
ffigen/include/float.h
ffigen/include/gcc/
ffigen/include/iso646.h
ffigen/include/limits.h
ffigen/include/mach-o/
ffigen/include/mach-o/swap.h
ffigen/include/mm3dnow.h
ffigen/include/mm_malloc.h
ffigen/include/mmintrin.h
ffigen/include/nameser8_compat.h
ffigen/include/pmm_malloc.h
ffigen/include/pmmintrin.h
ffigen/include/root/
ffigen/include/root/usr/
ffigen/include/root/usr/X11R6/
ffigen/include/root/usr/X11R6/include/
ffigen/include/root/usr/X11R6/include/X11/
ffigen/include/root/usr/X11R6/include/X11/Xos.h
ffigen/include/root/usr/X11R6/include/X11/Xos_r.h
ffigen/include/root/usr/X11R6/include/X11/Xosdefs.h
ffigen/include/stdarg.h
ffigen/include/stdbool.h
ffigen/include/stddef.h
ffigen/include/syslimits.h
ffigen/include/tgmath.h
ffigen/include/tmmintrin.h
ffigen/include/varargs.h
ffigen/include/X11
ffigen/include/xmmintrin.h

;;; Don't need to be root anymore.

[src/ccl-dev] root at nasruddin> exit
[src/ccl-dev] gb at nasruddin> cd darwin-x86-headers64/applicationservices/C
[applicationservices/C] gb at nasruddin> sh populate.sh
+++ /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h

That was pretty uneventful.

The handwavy answer to the questions "why doesn't it work for you, and
what do the errors mean?" is something like "it appears that the wrong
h-to-ffi.sh is getting executed, or the right version is invoking the
wrong ../ffigen/bin/ffigen, or something like that."

If that answer's incorrect, then I don't have a good guess of what
the correct answer would be; it's certainly behaving as if multiple
versions are getting in each other's way, or something.

(Prior to the release of Leopard in late October of last year, I
tried to cobble together an ffigen based on released Apple gcc
sources and ObjC 2.0 patches that Apple had committed to the gcc
svn tree.  It wasn't quite right, but Apple released the sources
for their Leopard-aware gcc soon after releasing Leopard, and
the "ffigen for Apple gcc 5465" was built ASAP after those sources
were available.  That version seems to do a good job of translating
everything that I've tried it on; I don't remember whether the
earlier cobbled-together version failed with the same kinds of
errors that you reported, but it looks like whatever's running
isn't even getting invoked with the right arguments.)




On Fri, 27 Jun 2008, Didier Verna wrote:

>
> [ my original reply is blocked because it's too large (I included a log
>  file), so here is the short version ]
>
> Gary Byers <gb at clozure.com> wrote:
>
>> I just built  ApplicationServices.ffi, using the apple-gcc-5465 based
>> ffigen and the enclosed
>>
>> ccl/darwin-x86-headers64/applicationservices/C/populate.sh
>>
>> script.
>
> Still no luck. Here's my own populate.sh (just FYI), and some errors I
> get with yours (the same as before).
>
>



More information about the Openmcl-devel mailing list