Crosscompiling ECL for Windows

Wolfgang Dautermann wolfgang at dautermann.at
Sat Sep 24 09:57:17 UTC 2016


On 2016-09-20 14:46, Daniel Kochmański wrote:
> Cross compilation isn't well support at this point,
> but we try to improve that.

Hi,
(sorry for the late answer)

Thank you. I found some further issues.

> What host are you building on? ("Z:/" looks very strange if its
> Linux). I doubt that the target binary would run on different operating
> system at all, it must be something else imho.

I am building on a Linux host. But thats was the issue. The compiliation
process *did* run the (crosscompiled) binaries using the Linux Kernel
feature 'binfmt_misc' (recognize the format and execute it in a user
space emulator ("wine"))

When I did a 'chmod 000 /usr/bin/wine', it did produce a 'cross_config'
file, which I could save and use with the parameter --with-cross-config
(I am attaching the produced file here, if it is correct, perhaps it can
be included in the source? I did change ECL_NEWLINE and commmented out
ECL_TO_RUN because I want to use my self compiled ecl version.). What
does ECL_WORKING_ENVIRON mean?

But this only works, if 'wine' is not available.

ECL seems to test, if a produced executable can be executed - and if
this works, it assumes that one is not crosscompiling, right?
Suggestion: If the parameter --with-cross-config is used, one wants to
crosscompile, that should not be tested then.

Then the build works. 'make install' fails then with:

/usr/bin/install -c c/dpp.exe /home/dauti/ecl/ecl-mingw-root
/usr/bin/install: cannot stat 'c/dpp.exe': No such file or directory
Makefile:156: recipe for target 'install' failed

That file (dpp.exe) is not produced during the compiliation.


I did install ecl ignoring errors (make -k install) but the compiled
FAS-files (build/*.fas) did not seem to get installed too, but that may
be because of the errors before.

I then tried to build Maxima with the crosscompiled ecl (using wine, I
do that with CLISP and SBCL too). That produced then a internal error -
but that may be because the installation was not done correctly or
perhaps a issue in 'wine'. Or some values of the cross-config files are
wrong?:

;;; Compiling
Z:/home/dauti/maxima-code/crosscompile-windows/build/maxima-prefix/src/maxima/src/maxima-package.lisp.;;;
OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=2
;;;
;;; End of Pass 1.;;; Internal error:
;;;   ** Detected access to an invalid or protected memory address.


Best regards, Wolfgang

-------------- next part --------------
###
### YOU ARE TRYING TO CROSS COMPILE ECL.
### PLEASE FOLLOW THESE INSTRUCTIONS:
###
### 1) Vital information cannot be determined at configuration time
### because we are not able to run test programs. A file called
###		
### has been created, that you will have to fill out. Please do
### it before invoking "configure" again.

### 1.1) Direction of growth of the stack
ECL_STACK_DIR=down

### 1.2) Choose an integer datatype which is large enough to host a pointer
CL_FIXNUM_TYPE=int
CL_FIXNUM_BITS=32
CL_FIXNUM_MAX=536870911L
CL_FIXNUM_MIN=-536870912L
CL_INT_BITS=32
CL_LONG_BITS=32

### 1.3) Order of bytes within a word
ECL_BIGENDIAN=no

### 1.4) What characters signal an end of line. May be LF (Linefeed or \n)
###      CR (Carriage return or \r), and CRLF (CR followed by LF).
ECL_NEWLINE=CRLF

### 1.5) Can we guess how many characters are available for reading from
###      the FILE structure?
###          0 = no
###          1 = (f)->_IO_read_end - (f)->_IO_read_ptr
###          2 = (f)->_r
###          3 = (f)->_cnt
ECL_FILE_CNT=0

###
### 1.6) Other integer types (set to 'no' to disable)
###
ECL_STDINT_HEADER="#include <stdint.h>"
ECL_UINT8_T=uint8_t
ECL_UINT16_T=uint16_t
ECL_UINT32_T=uint32_t
ECL_UINT64_T=no
ECL_INT8_T=int8_t
ECL_INT16_T=int16_t
ECL_INT32_T=int32_t
ECL_INT64_T=no
ECL_LONG_LONG_BITS=no

###
### 1.7) Other features (set to 'no' to disable)
###
ECL_WORKING_ENVIRON=yes

### 2) To cross-compile ECL so that it runs on the system
###		i686-w64-mingw32
### you need to first compile ECL on the system in which you are building
### the cross-compiled files, that is
###		x86_64-unknown-linux-gnu
### By default we assume that ECL can be accessed from some directory in
### the path.
#ECL_TO_RUN=/usr/bin/ecl


More information about the ecl-devel mailing list