• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bench/H10-Sep-2021-170,570166,543

boot/H10-Sep-2021-11,6289,371

cmake/H03-May-2022-1,8251,639

doc/H03-May-2022-28,62822,425

example/H10-Sep-2021-621437

ext/H03-May-2022-136,93597,011

lib/H10-Sep-2021-5,2184,026

package/H10-Sep-2021-162134

script/H03-May-2022-2,6682,202

sitelib/H10-Sep-2021-134,52995,111

src/H03-May-2022-213,846191,208

test/H10-Sep-2021-81,34067,017

unicode/H10-Sep-2021-74,15273,934

win/H03-May-2022-319268

COPYINGH A D10-Sep-202121.2 KiB428339

ChangeLogH A D10-Sep-202122.8 KiB767437

HACKINGH A D10-Sep-20213 KiB10972

README.mdH A D10-Sep-20216.5 KiB211140

cmake_uninstall.cmake.inH A D10-Sep-20212 KiB4946

dist.batH A D10-Sep-20212.4 KiB123103

dist.shH A D10-Sep-20212.9 KiB143111

pkg-plistH A D03-May-202251.8 KiB959958

rebase.sh.inH A D10-Sep-2021278 2113

run-test.scmH A D10-Sep-20214.6 KiB150124

README.md

1# Sagittarius Scheme System
2
3# What is this?
4
5This is a free Scheme implementation, supporting R6RS and R7RS
6specification.
7
8# How to build and install?
9
10Sagittarius uses CMake for its building infrastructure.  If you do not
11have it on your platform, please install it.
12
13 - [CMake(must be higher than 2.8.4)](http://www.cmake.org/)
14
15## Quick build/install (for Unix like environment)
16
17If your environment already has required libraries and just want to
18install to default location, run the following commands in the
19directory where all distributed files are expanded (c.f. By default
20it'd be `sagittarius-X.X.X`, `X.X.X` is the version you downloaded):
21
22    % cmake .
23    % make
24    % make install
25
26Following sections describes more details.
27
28## Preparation for Unix-like environment
29
30Sagittarius depends on the following libraries.
31
32 - [Boehm GC](http://www.hpl.hp.com/personal/Hans_Boehm/gc/)
33 - [zlib](http://www.zlib.net/)
34 - [libffi](https://sourceware.org/libffi/)
35
36If you are using Linux which supports `apt-get`, then you can simply
37execute the following command:
38
39    % apt-get install libgc-dev, zlib1g-dev libffi-dev
40
41### Manual installation of Boehm GC
42
43For Boehm GC, you need to install it with the option
44`--enable-threads=pthreads`.  If your CPU is not incredibly old, you
45can also specify the option `--enable-parallel-mark`.
46
47If you are too lazy to download the archive file of GC, CMake will
48download it for you.  Make sure to run the following commands from in
49GC directory:
50
51    % ./configure \
52          --enable-threads=pthreads   \
53          --enable-parallel-mark      \
54          --enable-large-config
55    % make
56    % make install
57
58Note: most of the Linux distributions already have Boehm GC in their
59package management system, such as `apt-get`.  I recommend to use it
60for security reason.
61
62## Building on Unix-like environment
63
64After installing CMake and dependent libraries, you are ready to build
65Sagittarius; type the following command:
66
67    % cmake .
68
69Note: The above command assumes you are in the source directory.
70
71It is possible to build Sagittarius in a directory that is not the top
72source directory of the distributed package (out-of-tree building);
73for example:
74
75    % mkdir build
76    % cd build
77    % cmake ${path to Sagittarius' source directory}
78    % make
79
80To run the tests, specify `test` target.
81
82    % make test
83
84To install Sagittarius non default location, you need to specify
85`CMAKE_INSTALL_PREFIX` variable.
86
87    % cmake . -DCMAKE_INSTALL_PREFIX=/path/to/install
88
89On some environment, there are 64 bits runtime specific directories
90such as `lib64`. To install Sagittarius runtime in the directory, then
91you can specify `LIB_DIR` variable as the following:
92
93    % cmake . -DLIB_DIR=lib64
94
95Then the runtime install directoy will be
96`CMAKE_INSTALL_PREFIX/LIB_DIR`.  There are also the variables to
97specify `bin`, `include` and `share` directories, and the directory
98for the `.pc` files; `BIN_DIR`, `INCLUDE_DIR` `SHARE_DIR`, and
99`PKGCONFIG_DIR`, respectively.
100
101Since 0.5.6, Sagittarius's REPL is renamed to `sagittarius` and legacy
102`sash` is kept as a symbolic link. If you don't need the symbolic link
103then you can put the `INSTALL_SYMLINK` option off as the following:
104
105    % cmake . -DINSTALL_SYMLINK=0
106
107After a successful compilation, it is possible to install Sagittarius
108to the location specified by `CMAKE_INSTALL_PREFIX` or default system
109location if it's not specified with the command:
110
111    % make install
112
113After installation, you might need to run `ldconfig` to run
114Sagittarius properly.
115
116Note: For some reason, you might want to build a 32-bit runtime on a
11764-bit platform.  The following command can be used for this purpose;
118
119    % cmake . \
120        -DCMAKE_CXX_COMPILER=${your 32 bit C++ compiler} \
121        -DCMAKE_C_COMPILER={your 32 bit C compiler}
122
123Make sure you have all the required 32-bit executables and libraries.
124
125## Building on Mac OS X
126
127Only with Homebrew is tested.
128
129Installing libffi, CMake, and Boehm GC.
130
131    $ brew install libffi cmake bdw-gc
132
133After installing dependent libraries, the rest of the process are the same
134as Unix-like environment.
135
136If `cmake` can't find `libffi`, then you can specify the location via
137`FFI_LIBRARY_DIR` option like the following.
138
139    $ cmake . -DFFI_LIBRARY_DIR=/usr/local/Cellar/libffi/3.0.13/lib
140
141Note: some Mac OS X environment may not be able to find `ar` command
142because `/usr/bin/gcc` is identical as `/usr/bin/clang`. In that case,
143export `CC` and `CXX` environment variable with proper GCC and G++
144command path respectively so that CMake can find the command.
145
146## Building on FreeBSD
147
148FreeBSD has multiple type of Boehm GC system libraries; `gc`,
149`gc-threaded` and `gc-redirect`. Sagittarius requires threaded runtime
150to make thread library works properly. The building process checks if
151`gc` has `GC_get_parallel()` function and if it doesn't then tries to
152use `gc-threaded` library. Please make sure your system has
153`gc-threaded` or `gc` built with multi thread option.
154
155NB: If you install `gc` without build option, then default is without
156thread support. In such a case, you need to install `gc-threaded` as
157well.
158
159## Building on Windows (non Cygwin environment)
160
161On Windows, you need to create an installer and Sagittarius is using
162innosetup for it.  Please install it.
163
164 - [Inno Setup](http://www.jrsoftware.org/)
165
166You need to install MSVC preferably Visual Studio 2010 or higher.  And
167if you use `cmake-gui`, it will be much easier.  Run `Visual Studio
168Command Prompt` and go to the directory which Sagittarius source codes
169are expanded.
170
171If you prefer to use `cmake` instead of `cmake-gui`, then the
172following command needs to be executed:
173
174    % cmake . -Denable_threads=ON -Denable_parallel_mark \
175         -G"NMake Makefiles"
176
177Specifying `-DDEBUG_VERSION=OFF` enables MSVC optimisations.
178
179The final commands are almost the same as in Unix-like environments.
180
181    % nmake
182    % nmake test
183
184After these commands, you move to the `win/` directory and double
185click the file `innosetup.iss`.  Go to [Build] - [Compile], then it
186will create the installer.  For more detail, please see Inno Setup's
187document.
188
189# Forums and bug reporting
190
191If you have any question, please ask on the following Google group:
192
193- [sagittarius-scheme](https://groups.google.com/forum/#!forum/sagittarius-scheme)
194
195If you find a bug, please report it on the project bug tracking board:
196
197- [Sagittarius Issues](https://bitbucket.org/ktakashi/sagittarius-scheme/issues)
198
199Or you can report it on Google group.
200
201# How to develop it?
202
203See HACKING file.
204
205<!-- end of file
206Local Variables:
207mode: markdown
208fill-column: 75
209End:
210-->
211