[Ecls-list] ecls build under cygwin and shared libraries

Gregory Lampshire gregory_lampshire at hotmail.com
Tue Jan 1 10:31:22 UTC 2002


I have been fiddling with ecl under cygwin and the compilation facility.  In
order to get the compiler working, ecl needs to have the dynamic loading
facility working (unless you do the static link and exec generation
approach).

I built ecl under the normal static library process and produce executables,
etc. okay (with a small manual build and install of the Boehm  collector
which for some reason did not build correctly).  In addition, I added
ENABLE_DLOPEN since the cygwin platform supports this and I wanted the
compiled code to reflect this as well.

After translating *all* of the static libs into a giant dll via

gcc --Wl,--export-all-symbols --shared -o libecl.dll -Wl,--whole-archive
libgmp.a libgc.a libcmp.a libecl.a libclos.a
iblsp.a  -Wl,--no-whole-archive -Xlinker
"--out-implib=libecl.dll.a" -Xlinker "--output-def=libecl.def"

and changing the cmpcfg.lsp script as appropriate for the flags (any .so
extension created will need to link against the libecl.dll since Windows dll
are not allowed to have unresolved references in the dll files).  I also
added :dlopen to the *features* list.

However, the compile-file function is now broken and trace has not bee
helpful in helping me understand the issue.  Here's the output.  For some
reason, I am getting a reference to SI::OLDF which I have not been able to
find in the .def (for the dll) or in any of the source files.

$ ./ecl
ECL (Embeddable Common-Lisp) 0.5
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
 ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
> (compile-file "blah.lsp")
#<a FILE-ERROR>
Broken at NIL.
>> :q
> (trace compile-file)
(COMPILE-FILE)
> (compile-file "blah.lsp")
1> (COMPILE-FILE "blah.lsp")
The variable SI::OLDF is unbound.
Broken at COMPILE-FILE.
>> (quit)
Bye.


$ ecl-static
ECL (Embeddable Common-Lisp) 0.5
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
 ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
> oldf
The variable OLDF is unbound.
Top level.
>> :q
> SI::OLDF
The variable SI::OLDF is unbound.
Top level.
>> :q
> (quit)
Bye.



Any thoughts that could help point out some problems here?



cheers,
gregory





More information about the ecl-devel mailing list