You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-22Lines changed: 40 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,45 @@
1
-
# PRE-ALPHA SOFTWARE
1
+
# BETA SOFTWARE
2
2
3
-
The code monkeys are still hard at work tinkering to develop the best possible binary building solution for [Julia](https://julialang.org). Please **do not use this software** for any real work until this notice is removed. This software is provided AS-IS with no warranty, implied or otherwise, and is not even guaranteed to be fit for a particular purpose.
3
+
Though most of the design work has been completed, the code monkeys are still hard at work tinkering to develop the best possible binary building solution for [Julia](https://julialang.org). Feel free to use this software, but please note
4
+
that there may be bugs and issues still being worked out. This software is provided AS-IS with no warranty, implied or otherwise, and is not even guaranteed to be fit for a particular purpose.
5
+
6
+
The primary target platform of this package is Linux.
7
+
Windows is currently not supported. Please note that although preliminary OS X
8
+
support exists, it is experimental and recommended only to those wanting to help
that builds the binary for all platforms. These tarballs are then suitable for
23
+
installation using `BinaryProvider.jl`. Currently we recommend creating a
24
+
separate GitHub repository for the `build_tarballs.jl` script and using that
25
+
repository's `GitHub Releases` page to host the binaries.
26
+
27
+
The contents of the `build_tarballs.jl` file is relatively straightforward,
28
+
but getting it right can be a little tricky. To ease the burden of creating
29
+
said file, you may use the BinaryBuilder wizard:
30
+
31
+
```
32
+
using BinaryBuilder
33
+
BinaryBuilder.run_wizard()
34
+
```
35
+
36
+
The wizard will take you through creating the `build_tarballs.jl` file and help
37
+
you deploy the result to GitHub with Travis and GitHub releases set up properly.
38
+
Once you complete the wizard and your repository is created on GitHub, create
39
+
a new release on the `GitHub Releases` page and Travis will automatically add
40
+
binaries for all platforms, as well as a build.jl file that you can use in your
41
+
julia package to import the binaries you have just built.
42
+
11
43
# Philosophy
12
44
13
45
Building binary packages is a pain. `BinaryBuilder` is here to make your life easier. `BinaryBuilder` follows a philosophy that is similar to that of building [Julia](https://julialang.org) itself; when you want something done right, you do it yourself.
@@ -18,28 +50,14 @@ We do not use system package managers.
18
50
19
51
We do not provide multiple ways to install a dependency. It's download and unpack tarball, or nothing.
20
52
21
-
# Implementation
22
-
23
-
`BinaryBuilder.jl` utilizes a cross-compilation environment built into a [Docker](https://www.docker.com) image to compile binary objects for multiple operating systems and architectures. The Dockerfiles for creating this cross-compilation environment are hosted in [the `staticfloat/julia-docker` repository](https://github.com/staticfloat/julia-docker/blob/master/crossbuild/crossbuild-x64.harbor). The docker image contains cross-compilation toolchains stored in `/opt/<target triplet>`, see [`target_envs()`](https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/76a3073753bd017aaf522ed068ea29418f1059c0/src/DockerRunner.jl#L108-L133) for an example of what kinds of environment variables are defined in order to run the proper tools for a particular cross-compilation task.
24
-
25
-
A build is represented by a [`Dependency` object](https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/76a3073753bd017aaf522ed068ea29418f1059c0/src/Dependency.jl#L17-L36), which is used to bundle together all the build steps required to actually build an object, perform the build, write out logs for each step, and finally package it all up as a nice big tarball. At the end of a `build()`, a series of audit steps are run, checking for common problems such as missing libraries. These checks typically do not stop a build, but you should pay attention to them, as they do their best to be helpful. Occasionally, an error can be automatically fixed. If you set the `autofix` parameter to `build()` to be `true`, this will be attempted.
26
-
27
-
# Usage example
53
+
All packages are cross compiled. If a package does not support cross compilation, fix the package.
28
54
29
-
Usage is as simple as defining a `Dependency`, `build()`'ing it, then packaging it up. Example:
30
-
31
-
```julia
32
-
prefix =Prefix("/source_code")
33
-
cd("/source_code") do
34
-
libfoo =LibraryProduct(prefix, "libfoo")
35
-
steps = [`make clean`, `make install`]
36
-
dep =Dependency("foo", [libfoo], steps, :linux64, prefix)
For a full example, see [`build_libfoo_tarballs.jl` in the test directory](test/build_libfoo_tarballs.jl). For a more in-depth example, see [the NettleBuilder repository](https://github.com/staticfloat/NettleBuilder).
57
+
`BinaryBuilder.jl` utilizes a cross-compilation environment exposed as a Linux container.
58
+
On Linux this makes use of a light-weight custom container engine, on OS X (and
59
+
Windows in the future), we use qemu and hardware accelerated virtualization to
60
+
provide the environment. The environment contains cross-compilation toolchains stored in `/opt/<target triplet>`. See [`target_envs()`](https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/76a3073753bd017aaf522ed068ea29418f1059c0/src/DockerRunner.jl#L108-L133) for an example of what kinds of environment variables are defined in order to run the proper tools for a particular cross-compilation task.
0 commit comments