INSTALL 2.71 KB
Newer Older
1
You will find detailed installation instructions in the ECL manual
Tomek Kurcz's avatar
Tomek Kurcz committed
2
       https://common-lisp.net/project/ecl/static/manual/pr01s06.html
3
If you do not have access to the online version, follow the following recipies.
4 5

* Unix and similar platforms.
6 7 8 9 10 11 12
1. Type
   ./configure --help
   to get a list of the flags with which ECL can be configured.
2. Enter
   ./configure ...
   where "..." is the set of flags you have chosen.
3. Use "make" followed by "make install" to build and install ECL.
13 14

* Windows with Visual Studio C++ 2008
15 16 17 18 19 20
1. Enter the msvc directory
2. Read the file Makefile to find the configuration options. They
   typically have the form ECL_UNICODE=1, ECL_THREADS=1, etc
3. Enter
   nmake ...
   followed by zero or more of those options
21 22 23 24
  4. Use "nmake install" to create a directory called "package" with ECL in it.
  5. Move that directory wherever you need.

* Cross-compile for the android platform (from the UNIX machine)
25 26
1. Build the host ECL
   #+BEGIN_SRC shell-script
27 28
     ./configure ABI=32 CFLAGS="-m32 -g -O2" LDFLAGS="-m32 -g -O2"\
                 --prefix=`pwd`/ecl-android-host --disable-longdouble
29 30 31 32
     make -j9
     make install
     rm -r build
     export ECL_TO_RUN=`pwd`/ecl-android-host/bin/ecl
33
   #+END_SRC
34 35
2. Configure the toolchain (requires android-ndk version 15 or higher, known to work with version 17c)
   and export the necessary paths:
36
   #+BEGIN_SRC shell-script
37
     export NDK_PATH=/opt/android-ndk
38 39 40 41 42
     export ANDROID_API=23
     export TOOLCHAIN_PATH=`pwd`/android-toolchain
     ${NDK_PATH}/build/tools/make_standalone_toolchain.py --arch arm --install-dir ${TOOLCHAIN_PATH} --api ${ANDROID_API}
     export SYSROOT=${TOOLCHAIN_PATH}/sysroot
     export PATH=${TOOLCHAIN_PATH}/bin:$PATH
43 44 45
  #+END_SRC
3. Build and install the target library
   #+BEGIN_SRC shell-script
46 47 48 49
     # boehm GC is not compatible with ld.gold linker, force use of ld.bfd
     export LDFLAGS="--sysroot=${SYSROOT} -D__ANDROID_API__=${ANDROID_API} -fuse-ld=bfd"
     export CPPFLAGS="--sysroot=${SYSROOT} -D__ANDROID_API__=${ANDROID_API} -isystem ${SYSROOT}/usr/include/arm-linux-androideabi"
     export CC=arm-linux-androideabi-clang
50 51
     ./configure --host=arm-linux-androideabi \
                 --prefix=`pwd`/ecl-android \
52
                 --with-cross-config=`pwd`/src/util/android-arm.cross_config
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
     make -j9
     make install
   #+END_SRC
4. Library and assets in the ecl-android directory are ready to run on
   the Android system.

** Building ecl-android on Darwin (OSX)
If your host platform is darwin, then the host compiler should be
built with the Apple's GCC (not the GCC from Macports). Using the
MacPort command:
#+BEGIN_SRC shell-script
  sudo port select --set gcc none
#+END_SRC
   
Hint provided by Pascal J. Bourguignon.