Skip to content

Commit

Permalink
Updated README.windows.md to include Arch Linux cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
papamarkou committed Jun 5, 2013
1 parent 627d1cc commit f5f0d62
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 additions & 2 deletions README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ Running julia can be done in two ways:
Cross-Compile
-------------

If you prefer to cross-compile, the following steps should get you started:
If you prefer to cross-compile, the following steps should get you started.

First, you will need to ensure your system has the required dependencies. Note that I build on an Ubuntu system, so the `make dist` may not be fully functional on other systems. On Ubuntu 12.04, the following command will install the required build dependencies.
### Building on Ubuntu

First, you will need to ensure your system has the required dependencies. On Ubuntu 12.04, the following command will install the required build dependencies.

```
apt-get install \
Expand Down Expand Up @@ -115,6 +117,52 @@ Finally, the build and install process:

If you are building for 64-bit windows. The steps are essentially the same. Just replace i686 in XC_HOST with x86_64.

### Building on Arch Linux

First the required dependencies will be installed:

1. Install the following packages from the official Arch repository:
`sudo pacman -S cloog gcc-ada libmpc p7zip ppl subversion zlib`
2. The rest of the prerequisites consist of the mingw-w64 packages, which are available in the AUR Arch repository. They must be installed exactly in the order they are given or else their installation will fail. The `yaourt` package manager is used for illustration purposes; you may instead follow the [Arch instructions for installing packages from AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages) or may use your preferred package manager. To start with, install `mingw-w64-binutils` via the command
`yaourt -S mingw-w64-binutils`
3. `yaourt -S mingw-w64-headers-svn`
4. `yaourt -S mingw-w64-headers-bootstrap`
5. `yaourt -S mingw-w64-gcc-base`
6. `yaourt -S mingw-w64-crt-svn`
7. Remove `mingw-w64-headers-bootstrap` without removing its dependent mingw-w64 installed packages by using the command
`yaourt -Rdd mingw-w64-headers-bootstrap`
8. `yaourt -S mingw-w64-winpthreads`
9. Remove `mingw-w64-gcc-base` without removing its installed mingw-w64 dependencies:
`yaourt -Rdd mingw-w64-gcc-base`
10. Complete the installation of the required `mingw-w64` packages:
`yaourt -S mingw-w64-gcc`

The build and install process of Julia is the same as in steps 1-7 of Ubuntu except that the following changes need to be made before executing the 7 steps:

1. Add `OPENBLAS_BUILD_OPTS += HOSTCC=gcc` in `deps/Makefile` after the definition of the `OPENBLAS_BUILD_OPTS` environment variable.
2. In `src/Mafefile` replace `./flisp/flisp` with `$(call spawn,./flisp/flisp)`. More specifically replace the lines

```
julia_flisp.boot.inc: julia_flisp.boot flisp/libflisp.a
$(QUIET_FLISP) ./flisp/flisp ./bin2hex.scm < $< > $@
julia_flisp.boot: julia-parser.scm julia-syntax.scm \
match.scm utils.scm jlfrontend.scm mk_julia_flisp_boot.scm flisp/libflisp.a
$(QUIET_FLISP) ./flisp/flisp ./mk_julia_flisp_boot.scm
```
with

```
julia_flisp.boot.inc: julia_flisp.boot flisp/libflisp.a
$(QUIET_FLISP) $(call spawn,./flisp/flisp) ./bin2hex.scm < $< > $@
julia_flisp.boot: julia-parser.scm julia-syntax.scm \
match.scm utils.scm jlfrontend.scm mk_julia_flisp_boot.scm flisp/libflisp.a
$(QUIET_FLISP) $(call spawn,./flisp/flisp) ./mk_julia_flisp_boot.scm
```

Finally, after completing the Julia cross-compilation by executing the 7 Julia build and installation steps described in the Ubuntu section and after moving the julia-* directory/zipfile to the target machine, add the `julia-*/lib` and `julia-*/lib/julia` directories to your Windows `PATH` environment variable.

Important Build Errata
----------------------

Expand Down

0 comments on commit f5f0d62

Please sign in to comment.