File: INSTALL

package info (click to toggle)
ecl 21.2.1%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,604 kB
  • sloc: ansic: 146,375; lisp: 67,950; xml: 8,221; asm: 5,551; sh: 3,239; makefile: 1,968; cpp: 190; java: 116
file content (112 lines) | stat: -rw-r--r-- 4,498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
You will find detailed installation instructions in the ECL manual
       https://common-lisp.net/project/ecl/static/manual/Building-ECL.html
If you do not have access to the online version, follow the following recipies.

* Unix and similar platforms.
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.

* Windows with Visual Studio C++ 2008
1. Open the Visual Studio x86 or x64 native tools command prompt
2. Enter the msvc directory
3. Read the file Makefile to find the configuration options. They
   typically have the form ECL_UNICODE=1, ECL_THREADS=1, etc
4. Enter
   nmake ...
   followed by zero or more of those options
5. Use "nmake install" to create a directory called "package" with ECL in it.
6. Move that directory wherever you need.

* Cross-compile for the android platform (from the UNIX machine)
1. Build the host ECL
   #+BEGIN_SRC shell-script
     # C99 complex numbers are not fully supported on Android
     ./configure ABI=32 CFLAGS="-m32 -g -O2" LDFLAGS="-m32 -g -O2"\
                 --prefix=`pwd`/ecl-android-host --disable-c99complex
     make -j9
     make install
     rm -r build
     export ECL_TO_RUN=`pwd`/ecl-android-host/bin/ecl
   #+END_SRC
2. Configure the toolchain (requires android-ndk version 15 or higher, known to work with version 17c)
   and export the necessary paths:
   #+BEGIN_SRC shell-script
     export NDK_PATH=/opt/android-ndk
     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
  #+END_SRC
3. Build and install the target library
   #+BEGIN_SRC shell-script
     # 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
     ./configure --host=arm-linux-androideabi \
                 --prefix=`pwd`/ecl-android \
                 --disable-c99complex \
                 --with-cross-config=`pwd`/src/util/android-arm.cross_config
     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.


* Cross-compile for the iOS platform (needs Xcode 11 or higher)
1. Build the host ECL
   #+BEGIN_SRC shell-script
     ./configure --prefix=`pwd`/ecl-iOS-host --disable-c99complex
     make -j9
     make install
     rm -r build
     export ECL_TO_RUN=`pwd`/ecl-iOS-host/bin/ecl
   #+END_SRC
2. Configure the toolchain
   #+BEGIN_SRC shell-script
     export IOS_VERSION_MIN="8.0"
     export IOS_SDK_DIR="`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/"

     export CC="clang"
     export CXX="clang++"

     export CFLAGS="-arch arm64 -miphoneos-version-min=${IOS_VERSION_MIN} -isysroot ${IOS_SDK_DIR}"
     export CFLAGS="$CFLAGS -pipe -Wno-trigraphs -Wreturn-type -Wunused-variable"
     export CFLAGS="$CFLAGS -fpascal-strings -fasm-blocks -fmessage-length=0 -fvisibility=hidden"
     export CFLAGS="$CFLAGS -O2 -DNO_ASM"

     export LD="ld"
     export LDFLAGS="-arch arm64 -pipe -std=c99 -gdwarf-2 -isysroot ${IOS_SDK_DIR}"
     export LIBS="-framework Foundation"
   #+END_SRC
3. Build and install the target library
   #+BEGIN_SRC shell-script
     export CFLAGS="$CFLAGS -DGC_DISABLE_INCREMENTAL -DECL_RWLOCK"
     export CXXFLAGS="$CFLAGS"
     ./configure --host=aarch64-apple-darwin \
                 --prefix=`pwd`/ecl-iOS \
                 --disable-c99complex \
                 --disable-shared \
                 --with-cross-config=`pwd`/src/util/iOS-arm64.cross_config
     make -j9
     make install
   #+END_SRC
4. Library and assets in the ecl-iOS directory are ready to run on
   the iOS system.