Crosscompiling ECL for Windows

Wolfgang Dautermann wolfgang at dautermann.at
Sat Sep 17 11:23:22 UTC 2016


On 2016-09-16 10:36, Daniel Kochmański wrote:
> That is defienetely ECL bug. I've created an issue on GitLab:
> 
> https://gitlab.com/embeddable-common-lisp/ecl/issues/288
> 
> there is some potential fix (I didn't include it, because of the comment
> in our own source code - this needs to be verified). If you could check,
> if the compilation finishes succesfully for you now with the mentioned
> diff applied, it would be great.

Thank you very much for the fast response. That seems to solve that issue.

Currently I try to compile with the following shell script:

-------------------------------------------------------
LANG=C
rm -rf build/
./configure ABI=32 CFLAGS=-m32 LDFLAGS=-m32 --disable-longdouble
--enable-libatomic=included --prefix=$(pwd)/ecl-host
make
make install
export ECL_TO_RUN=$(pwd)/ecl-host/bin/ecl
rm -rf build/
./configure --host=i686-w64-mingw32 --prefix=$(pwd)/ecl-win32
make
-------------------------------------------------------

(Adopted from the 'crosscompile for android' section. Do I need to set
--with-cross-config to something? There is only a file for android.)


The ecl-host builds well.
In the crosscompiled version, it seems that it runs the ecl for the
*target* system, which doesnt work at some point (I can provide the
complete build log, if necessary, that is just the end, where the error
occurs):

[...]
;;; Loading "Z:/home/dauti/ecl/src/cmp/cmpos-features.lsp"
File not found.

;;; Unable to execute program "i686-w64-mingw32-gcc";;; Condition;;;
Could not spawn subprocess to run "\"i686-w64-mingw32-gcc\"
\"--version\"".File not found.

;;; Unable to execute program "i686-w64-mingw32-gcc";;; Condition;;;
Could not spawn subprocess to run "\"i686-w64-mingw32-gcc\" \"-g\"
\"-O2\" \"-D_THREAD_SAFE\" \"-Dmingw32\" \"-E\"
\"C:/users/dauti/Temp/fa488.c\" \"-o\"
\"C:/users/dauti/Temp/fa488.i\"".;;; System features: NIL
;;; Loading "Z:/home/dauti/ecl/src/cmp/cmpmain.lsp"
;;; Loading "Z:/home/dauti/ecl/src/cmp/proclamations.lsp"
;;; Loading "Z:/home/dauti/ecl/src/cmp/sysfun.lsp"

;;;
;;; Now we are in shape to do something useful.
;;; End of bare.lsp
(compile-file "src:lsp;export.lsp" :output-file
#P"BUILD:LSP;EXPORT.O.NEWEST" :SYSTEM-P T :C-FILE T :DATA-FILE T :H-FILE T)
;;;
;;; Compiling SRC:LSP;EXPORT.LSP.;;; OPTIMIZE levels: Safety=2, Space=1,
Speed=1, Debug=1
;;;
;;; Compiling (DEFUN EVAL-FEATURE ...).
;;; Compiling (DEFUN DO-READ-FEATURE ...).
;;; Compiling (DEFUN SHARP-+-READER ...).
;;; Compiling (DEFUN SHARP---READER ...).
;;; End of Pass 1.;;; Emitting code for DOLIST.
;;; Emitting code for DOTIMES.
;;; Emitting code for DO/DO*-EXPAND.
;;; Emitting code for EVAL-FEATURE.
;;; Emitting code for DO-READ-FEATURE.
;;; Emitting code for SHARP-+-READER.
;;; Emitting code for SHARP---READER.
;;; Note:
;;;   Invoking external command:
;;;   i686-w64-mingw32-gcc -I. -I/home/dauti/ecl/build -DECL_API
-I/home/dauti/ecl/build/c -g -O2 -D_THREAD_SAFE -Dmingw32
-I/home/dauti/ecl/src/c -c Z:/home/dauti/ecl/build/lsp/export.c -o
Z:/home/dauti/ecl/build/lsp/export.o File not found.


Condition of type: SIMPLE-ERROR
Could not spawn subprocess to run "\"i686-w64-mingw32-gcc\" \"-I.\"
\"-I/home/dauti/ecl/build\" \"-DECL_API\" \"-I/home/dauti/ecl/build/c\"
\"-g\" \"-O2\" \"-D_THREAD_SAFE\" \"-Dmingw32\"
\"-I/home/dauti/ecl/src/c\" \"-c\"
\"Z:/home/dauti/ecl/build/lsp/export.c\" \"-o\"
\"Z:/home/dauti/ecl/build/lsp/export.o\"".
Available restarts:

1. (ABORT) ABORT

Top level in: #<process TOP-LEVEL>.


(Notice the Windows/Dos path with drive letters like
'Z:/home/dauti/ecl/build/lsp/export.o'.


The build *does* complete, if I copy ecl_min from the ecl-host build to
the build dir:
cp ./ecl-host/lib/ecl-16.1.2/ecl_min ./build/ecl_min.exe
cp ./ecl-host/lib/ecl-16.1.2/ecl_min ./build/ecl_min
after the first 'make' failed and build it (using 'make') a second time.
Have I just set a variable wrong (ECL_TO_RUN should be okay? Do I need
to set anything else?)


Best regards, Wolfgang




More information about the ecl-devel mailing list