[Ecls-list] MinGW build problems

Alexander Beisig Alexander.Beisig at informatik.stud.uni-erlangen.de
Sat May 19 20:35:24 UTC 2007


Hello,

while building the CVS version of ECL with MinGW (3.4.2) and MSYS, I
found some slash-related bugs in the function ecl-include-directory in
cmpmain.lsp that prevent ECL from compiling with MinGW.

Here's the code (starts at line 823):

(defun ecl-include-directory ()
   "Finds the directory in which the header files were installed."
   (cond ((and *ecl-include-directory*
	      (probe-file (merge-pathnames "ecl/config.h"
*ecl-include-directory*)))
	 *ecl-include-directory*)
	((probe-file "SYS:ecl;config.h")
	 (setf *ecl-include-directory* (namestring (translate-logical-pathname
"SYS:"))))
	((error "Unable to find include directory"))))

During make, *ecl-include-directory* is set to the build directory (by
configure I think) without the trailing slash.  This is actually
important, because *ecl-include-directory* is later passed as -I
argument to MinGW, and MinGW can't deal with include paths that end with
a slash.  However, the missing slash also means that merge-pathnames in
the first cond alternative doesn't work correctly and returns the wrong
path.  The second alternative, which sets a new value for
*ecl-include-directory*, will set the path with a trailing slash.  As
explained above, this breaks ECL's calls to MinGW.

There were also a few minor problems I ran into:  On my AMD X2 configure
wanted to build for x86_64-pc-mingw32 despite my Windows being 32-bit.
I fixed that by passing --build=x86-pc-mingw32 to configure.  I think it
would also be nice if there were an option to build and install ECL
without the documentation.  Since I didn't have the required texi2html,
make ran into problems while trying to generate the documentation.

-Alex





More information about the ecl-devel mailing list