[Ecls-list] ecl 0.5 build issues on OS X/Solaris. plus questions & feature reqs

John B. Thiel jbthiel at pobox.com
Sun Jan 6 15:21:03 UTC 2002


On Sunday, January 6, 2002, at 01:55 AM, Juan Jose Garcia-Ripoll wrote:
>
> "John B. Thiel" wrote:
>> How close is the dynamic loading, on-the-fly compilation on OS X?  Is 
>> it
>> known how and technically possible to achieve this?  Is anybody working
>> on it?
>
> Last time I tried I got messages due to unresolved symbols. The method
> for loading shared libraries in Linux/FreeBSD is based on the fact that
> these systems allow one to load libraries with unresolved symbols which
> are resolved at run time by means of the executable that loaded it.
> Windows does not support this hack and as soon as the mechanism for
> loading Windows libraries works, the Mac OSX will have this feature too.

Sounds pretty close, this is good news.  I hope there will be a flag to 
enable automatic compilation of all functions while working in the 
interpreter.  I do not mind the extra compilation time.


>> * QUESTION: Is it supported to link .o files or libraries compiled from
>> original .c files, and call them from ECL?  If so, how? I did not find
>> this case in the documentation which seems more oriented to the model 
>> of
>> embedding C bodies, or calling lisp code from C.  For example, I tried
>> to build an image with
>>         fac.o compiled from fac.c via gcc, and
>>         fib.o compiled from fib.lsp via ecl -s ,  and
>>         ff.o from ff.lsp containing
>>                 (defentry fac (int) (int fac))
>>
>> The build step failed with:
>> ecl -eval '(c::build-program "ecl-fib" :lisp-files (quote ("ff.o"
>> "fib.o" "fac.o")))'
>
> The mistake is that fac.o is not a "lisp file", but rather an extra
> argument to the linker "ld". Therefore the right way would be to pass
> "fac.o" in :ld-flags.
>
> (c::build-program "ecl-fib" :lisp-files '("ff.o" "fib.o") :ld-flags
> '("fac.o"))
>
> That should work (I haven't checked it, though :).


Ok, that enabled linking, but I still cannot call the external 
function.  will start a new topic on this.


-jt





More information about the ecl-devel mailing list