Skip to content

Commit

Permalink
Merge branch 'master' into tk/fix-alpine-build
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Mar 30, 2018
2 parents 09ab7c3 + 359f39a commit 19dd3b9
Show file tree
Hide file tree
Showing 445 changed files with 10,108 additions and 5,662 deletions.
2 changes: 1 addition & 1 deletion DISTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ for result in eachrow(results)
b = result[:backport]
if (isna(a) && !isna(b)) || (isna(b) && !isna(a))
color = :yellow
elseif a != b && contains(b, "pass")
elseif a != b && occursin("pass", b)
color = :green
elseif a != b
color = :red
Expand Down
4 changes: 3 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ OPENBLAS_DYNAMIC_ARCH:=1
endif
OPENBLAS_USE_THREAD:=1

# Use libraries available on the system instead of building them
# Flags for using libraries available on the system instead of building them.
# Please read the notes around usage of SYSTEM flags in README.md
# Issues resulting from use of SYSTEM versions will generally not be accepted.
USE_SYSTEM_LLVM:=0
USE_SYSTEM_LIBUNWIND:=0
DISABLE_LIBUNWIND:=0
Expand Down
101 changes: 75 additions & 26 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ Language changes
* `global const` declarations may no longer appear inside functions ([#12010]).

* Uninitialized `BitArray` constructors of the form `BitArray[{N}](shape...)` have been
deprecated in favor of equivalents accepting `uninitialized` (an alias for
`Uninitialized()`) as their first argument, as in
`BitArray[{N}](uninitialized, shape...)`. For example, `BitVector(3)` is now
`BitVector(uninitialized, 3)`, `BitMatrix((2, 4))` is now
`BitMatrix(uninitialized, (2, 4))`, and `BitArray{3}(11, 13, 17)` is now
`BitArray{3}(uninitialized, 11, 14, 17)` ([#24785]).
deprecated in favor of equivalents accepting `undef` (an alias for
`UndefInitializer()`) as their first argument, as in
`BitArray[{N}](undef, shape...)`. For example, `BitVector(3)` is now
`BitVector(undef, 3)`, `BitMatrix((2, 4))` is now
`BitMatrix(undef, (2, 4))`, and `BitArray{3}(11, 13, 17)` is now
`BitArray{3}(undef, 11, 14, 17)` ([#24785]).

* Dispatch rules have been simplified:
method matching is now determined exclusively by subtyping;
Expand All @@ -151,6 +151,10 @@ Language changes
* In `for i in x`, `x` used to be evaluated in a new scope enclosing the `for` loop.
Now it is evaluated in the scope outside the `for` loop.

* In `for i in x, j in y`, all variables now have fresh bindings on each iteration of the
innermost loop. For example, an assignment to `i` will not be visible on the next `j`
loop iteration ([#330]).

* Variable bindings local to `while` loop bodies are now freshly allocated on each loop iteration,
matching the behavior of `for` loops.

Expand Down Expand Up @@ -421,9 +425,9 @@ This section lists changes that do not have deprecation warnings.
and higher-dimensional arrays instead of linear indices as was previously the case.
Use `LinearIndices(a)[findall(f, a)]` and similar constructs to compute linear indices.

* The `find*` functions which return scalars, i.e. `findnext`, `findprev`, `findfirst`,
* The `find*` functions, i.e. `findnext`, `findprev`, `findfirst`,
and `findlast`, as well as `indexin`, now return `nothing` when no match is found rather
than 0 ([#25472], [#25662]).
than `0` or `0:-1` ([#25472], [#25662], [#26149])

* The `Base.HasShape` iterator trait has gained a type parameter `N` indicating the
number of dimensions, which must correspond to the length of the tuple returned by
Expand Down Expand Up @@ -452,12 +456,23 @@ This section lists changes that do not have deprecation warnings.

* `indexin` now returns the first rather than the last matching index ([#25998]).

* `parse(::Type, ::Char)` now uses a default base of 10, like other number parsing
methods, instead of 36 ([#26576]).

Library improvements
--------------------

* The function `thisind(s::AbstractString, i::Integer)` returns the largest valid index
less or equal than `i` in the string `s` or `0` if no such index exists ([#24414]).

* `Char` is now a subtype of `AbstractChar`, and most of the functions that
take character arguments now accept any `AbstractChar` ([#26286]).

* `String(array)` now accepts an arbitrary `AbstractVector{UInt8}`. For `Vector`
inputs, it "steals" the memory buffer, leaving them with an empty buffer which
is guaranteed not to be shared with the `String` object. For other types of vectors
(in particular immutable vectors), a copy is made and the input is not truncated ([#26093]).

* `Irrational` is now a subtype of `AbstractIrrational` ([#24245]).

* Introduced the `empty` function, the functional pair to `empty!` which returns a new,
Expand Down Expand Up @@ -554,8 +569,8 @@ Library improvements

* `diagm` now accepts several diagonal index/vector `Pair`s ([#24047]).

* New function `equalto(x)`, which returns a function that compares its argument to `x`
using `isequal` ([#23812]).
* `isequal`, `==`, and `in` have one argument "curried" forms. For example `isequal(x)`
returns a function that compares its argument to `x` using `isequal` ([#26436]).

* `reinterpret` now works on any AbstractArray using the new `ReinterpretArray` type.
This supersedes the old behavior of reinterpret on Arrays. As a result, reinterpreting
Expand Down Expand Up @@ -659,11 +674,11 @@ Deprecated or removed

* Uninitialized `Array` constructors of the form
`Array[{T,N}](shape...)` have been deprecated in favor of equivalents
accepting `uninitialized` (an alias for `Uninitialized()`) as their first argument,
as in `Array[{T,N}](uninitialized, shape...)`. For example,
`Vector(3)` is now `Vector(uninitialized, 3)`, `Matrix{Int}((2, 4))` is now,
`Matrix{Int}(uninitialized, (2, 4))`, and `Array{Float32,3}(11, 13, 17)` is now
`Array{Float32,3}(uninitialized, 11, 13, 17)` ([#24781]).
accepting `undef` (an alias for `UndefInitializer()`) as their first argument,
as in `Array[{T,N}](undef, shape...)`. For example,
`Vector(3)` is now `Vector(undef, 3)`, `Matrix{Int}((2, 4))` is now,
`Matrix{Int}(undef, (2, 4))`, and `Array{Float32,3}(11, 13, 17)` is now
`Array{Float32,3}(undef, 11, 13, 17)` ([#24781]).

* `LinAlg.fillslots!` has been renamed `LinAlg.fillstored!` ([#25030]).

Expand All @@ -689,11 +704,11 @@ Deprecated or removed
output ([#12131]).

* Uninitialized `RowVector` constructors of the form `RowVector{T}(shape...)` have been
deprecated in favor of equivalents accepting `uninitialized` (an alias for
`Uninitialized()`) as their first argument, as in
`RowVector{T}(uninitialized, shape...)`. For example, `RowVector{Int}(3)` is now
`RowVector{Int}(uninitialized, 3)`, and `RowVector{Float32}((1, 4))` is now
`RowVector{Float32}(uninitialized, (1, 4))` ([#24786]).
deprecated in favor of equivalents accepting `undef` (an alias for
`UndefInitializer()`) as their first argument, as in
`RowVector{T}(undef, shape...)`. For example, `RowVector{Int}(3)` is now
`RowVector{Int}(undef, 3)`, and `RowVector{Float32}((1, 4))` is now
`RowVector{Float32}(undef, (1, 4))` ([#24786]).

* `writecsv(io, a; opts...)` has been deprecated in favor of
`writedlm(io, a, ','; opts...)` ([#23529]).
Expand Down Expand Up @@ -756,7 +771,7 @@ Deprecated or removed
in favor of `replace(s::AbstractString, pat => r; [count])` ([#25165]).
Moreover, `count` cannot be negative anymore (use `typemax(Int)` instead ([#22325]).

* `read(io, type, dims)` is deprecated to `read!(io, Array{type}(uninitialized, dims))` ([#21450]).
* `read(io, type, dims)` is deprecated to `read!(io, Array{type}(undef, dims))` ([#21450]).

* `read(::IO, ::Ref)` is now a method of `read!`, since it mutates its `Ref` argument ([#21592]).

Expand Down Expand Up @@ -902,6 +917,12 @@ Deprecated or removed
* `map` on dictionaries previously operated on `key=>value` pairs. This behavior is deprecated,
and in the future `map` will operate only on values ([#5794]).

* Previously, broadcast defaulted to treating its arguments as scalars if they were not
arrays. This behavior is deprecated, and in the future `broadcast` will default to
iterating over all its arguments. Wrap arguments you wish to be treated as scalars with
`Ref()` or a 1-tuple. Package developers can choose to allow a non-iterable type `T` to
always behave as a scalar by implementing `broadcastable(x::T) = Ref(x)` ([#26212]).

* Automatically broadcasted `+` and `-` for `array + scalar`, `scalar - array`, and so-on have
been deprecated due to inconsistency with linear algebra. Use `.+` and `.-` for these operations
instead ([#22880], [#22932]).
Expand Down Expand Up @@ -1019,8 +1040,11 @@ Deprecated or removed
`F.Q` instead of `F[:Q]` ([#25184]).

* `search` and `rsearch` have been deprecated in favor of `findfirst`/`findnext` and
`findlast`/`findprev` respectively, in combination with the new `equalto` and `occursin`
predicates for some methods ([#24673]
`findlast`/`findprev` respectively, in combination with curried `isequal` and `in`
predicates for some methods ([#24673]).

* `search(buf::IOBuffer, delim::UInt8)` has been deprecated in favor of either `occursin(delim, buf)`
(to test containment) or `readuntil(buf, delim)` (to read data up to `delim`) ([#26600]).

* `ismatch(regex, str)` has been deprecated in favor of `contains(str, regex)` ([#24673]).

Expand All @@ -1030,7 +1054,7 @@ Deprecated or removed
`similar(::Associative, ::Pair{K, V})` has been deprecated in favour of
`empty(::Associative, K, V)` ([#24390]).

* `findin(a, b)` has been deprecated in favor of `findall(occursin(b), a)` ([#24673]).
* `findin(a, b)` has been deprecated in favor of `findall(in(b), a)` ([#24673]).

* `module_name` has been deprecated in favor of a new, general `nameof` function. Similarly,
the unexported `Base.function_name` and `Base.datatype_name` have been deprecated in favor
Expand Down Expand Up @@ -1067,6 +1091,11 @@ Deprecated or removed
* The `remove_destination` keyword argument to `cp`, `mv`, and the unexported `cptree`
has been renamed to `force` ([#25979]).

* `contains` has been deprecated in favor of a more general `occursin` function, which
takes its arguments in reverse order from `contains` ([#26283]).

* `Regex` objects are no longer callable. Use `occursin` instead ([#26283]).

* The methods of `range` based on positional arguments have been deprecated in favor of
keyword arguments ([#25896]).

Expand All @@ -1090,7 +1119,14 @@ Deprecated or removed
* `DevNull`, `STDIN`, `STDOUT`, and `STDERR` have been renamed to `devnull`, `stdin`, `stdout`,
and `stderr`, respectively ([#25786]).

* `wait` and `fetch` on `Task` now resemble the interface of `Future`
* `wait` and `fetch` on `Task` now resemble the interface of `Future`.

* `showcompact(io, x...)` has been deprecated in favor of
`show(IOContext(io, :compact => true), x...)` ([#26080]).
Use `sprint(show, x..., context=:compact => true)` instead of `sprint(showcompact, x...)`.

* `isupper`, `islower`, `ucfirst` and `lcfirst` have been deprecated in favor of `isuppercase`,
`islowercase`, `uppercasefirst` and `lowercasefirst`, respectively ([#26442]).

Command-line option changes
---------------------------
Expand Down Expand Up @@ -1272,7 +1308,6 @@ Command-line option changes
[#23750]: https://github.com/JuliaLang/julia/issues/23750
[#23757]: https://github.com/JuliaLang/julia/issues/23757
[#23805]: https://github.com/JuliaLang/julia/issues/23805
[#23812]: https://github.com/JuliaLang/julia/issues/23812
[#23816]: https://github.com/JuliaLang/julia/issues/23816
[#23885]: https://github.com/JuliaLang/julia/issues/23885
[#23902]: https://github.com/JuliaLang/julia/issues/23902
Expand Down Expand Up @@ -1373,7 +1408,9 @@ Command-line option changes
[#25725]: https://github.com/JuliaLang/julia/issues/25725
[#25745]: https://github.com/JuliaLang/julia/issues/25745
[#25763]: https://github.com/JuliaLang/julia/issues/25763
[#25786]: https://github.com/JuliaLang/julia/issues/25786
[#25812]: https://github.com/JuliaLang/julia/issues/25812
[#25815]: https://github.com/JuliaLang/julia/issues/25815
[#25830]: https://github.com/JuliaLang/julia/issues/25830
[#25845]: https://github.com/JuliaLang/julia/issues/25845
[#25854]: https://github.com/JuliaLang/julia/issues/25854
Expand All @@ -1388,3 +1425,15 @@ Command-line option changes
[#25998]: https://github.com/JuliaLang/julia/issues/25998
[#26009]: https://github.com/JuliaLang/julia/issues/26009
[#26071]: https://github.com/JuliaLang/julia/issues/26071
[#26080]: https://github.com/JuliaLang/julia/issues/26080
[#26093]: https://github.com/JuliaLang/julia/issues/26093
[#26149]: https://github.com/JuliaLang/julia/issues/26149
[#26154]: https://github.com/JuliaLang/julia/issues/26154
[#26156]: https://github.com/JuliaLang/julia/issues/26156
[#26161]: https://github.com/JuliaLang/julia/issues/26161
[#26262]: https://github.com/JuliaLang/julia/issues/26262
[#26284]: https://github.com/JuliaLang/julia/issues/26284
[#26286]: https://github.com/JuliaLang/julia/issues/26286
[#26436]: https://github.com/JuliaLang/julia/issues/26436
[#26442]: https://github.com/JuliaLang/julia/issues/26442
[#26600]: https://github.com/JuliaLang/julia/issues/26600
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Julia is built and tested regularly on the following platforms:
All systems marked with ✓ for CI are tested using continuous integration for every commit.
Systems with ✓ for binaries have official binaries available on the [downloads](https://julialang.org/downloads) page and are tested regularly. The PTX backend needs a source build and the [CUDAnative.jl](https://github.com/JuliaGPU/CUDAnative.jl) package.
The systems listed here with neither CI nor official binaries are known to build and work, but ongoing support for those platforms is dependent on community efforts.
It's possible that Julia will build and work on other platforms too, and we're always looking to better our platform coverage.
It is possible that Julia will build and work on other platforms too, and we're always looking to better our platform coverage.
If you're using Julia on a platform not listed here, let us know!

## Source Download and Compilation
Expand Down Expand Up @@ -99,8 +99,13 @@ If you need to build Julia on a machine without internet access, use `make -C de

**Note:** The build process will fail badly if any of the build directory's parent directories have spaces or other shell meta-characters such as `$` or `:` in their names (this is due to a limitation in GNU make).

Once it is built, you can run the `julia` executable using its full path in the directory created above (the `julia` directory). To run julia from anywhere you can:
Once it is built, you can run the `julia` executable after you enter your julia directory and run

./julia

To run julia from anywhere you can:
- add an alias (in `bash`: `echo "alias julia='/path/to/install/folder/bin/julia'" >> ~/.bashrc && source ~/.bashrc`), or

- add a soft link to the `julia` executable in the `julia` directory to `/usr/local/bin` (or any suitable directory already in your path), or

- add the `julia` directory to your executable path for this shell session (in `bash`: `export PATH="$(pwd):$PATH"` ; in `csh` or `tcsh`:
Expand All @@ -114,7 +119,7 @@ Now you should be able to run Julia like this:

julia

If everything works correctly, you will see a Julia banner and an interactive prompt into which you can enter expressions for evaluation. (Errors related to libraries might be caused by old, incompatible libraries sitting around in your PATH. In this case, try moving the `julia` directory earlier in the PATH).
If everything works correctly, you will see a Julia banner and an interactive prompt into which you can enter expressions for evaluation. (Errors related to libraries might be caused by old, incompatible libraries sitting around in your PATH. In this case, try moving the `julia` directory earlier in the PATH). Note that most of the instructions above apply to unix systems.

Your first test of Julia determines whether your build is working properly. From the UNIX/Windows command prompt inside
the `julia` source directory, type `make testall`. You should see output that lists a series of running tests;
Expand Down Expand Up @@ -199,6 +204,7 @@ Julia does not install anything outside the directory it was cloned into. Julia
* GCC version 4.7 or later is required to build Julia.
* To use external shared libraries not in the system library search path, set `USE_SYSTEM_XXX=1` and `LDFLAGS=-Wl,-rpath,/path/to/dir/contains/libXXX.so` in `Make.user`.
* Instead of setting `LDFLAGS`, putting the library directory into the environment variable `LD_LIBRARY_PATH` (at both compile and run time) also works.
* The `USE_SYSTEM_*` flags should be used with caution. These are meant only for troubleshooting, porting, and packaging, where package maintainers work closely with the Julia developers to make sure that Julia is built correctly. Production use cases should use the officially provided binaries. Issues arising from the use of these flags will generally not be accepted.
* See also the [external dependencies](#required-build-tools-and-external-libraries).

#### Architecture Customization
Expand Down Expand Up @@ -250,7 +256,7 @@ The remaining build tools are available from the Ports Collection, and can be in
To build Julia, simply run `gmake`.
(Note that `gmake` must be used rather than `make`, since `make` on FreeBSD corresponds to the incompatible BSD Make rather than GNU Make.)

It's important to note that the `USE_SYSTEM_*` flags should be used with caution on FreeBSD.
As mentioned above, it is important to note that the `USE_SYSTEM_*` flags should be used with caution on FreeBSD.
This is because many system libraries, and even libraries from the Ports Collection, link to the system's `libgcc_s.so.1`,
or to another library which links to the system `libgcc_s`.
This library declares its GCC version to be 4.6, which is too old to build Julia, and conflicts with other libraries when linking.
Expand Down Expand Up @@ -350,7 +356,7 @@ Julia uses the following external libraries, which are automatically downloaded

### Notes for distribution package maintainers

Package maintainers will typically want to make use of system libraries where possible. Please refer to the above version requirements and additional notes below. A list of maintained Julia packages for various platforms is available at https://julialang.org/downloads/platform.html.
We understand that package maintainers will typically want to make use of system libraries where possible. Please refer to the above version requirements and additional notes below. It is strongly advised that package maintainers apply the patches included in the Julia repo for LLVM and other libraries, should they choose to use SYSTEM versions. A list of maintained Julia packages for various platforms is available at https://julialang.org/downloads/platform.html.

### System Provided Libraries

Expand All @@ -377,15 +383,7 @@ Julia uses a custom fork of libuv. It is a small dependency, and can be safely b

As a high-performance numerical language, Julia should be linked to a multi-threaded BLAS and LAPACK, such as OpenBLAS or ATLAS, which will provide much better performance than the reference `libblas` implementations which may be default on some systems.

### SuiteSparse

SuiteSparse is a special case, since it is typically only installed as a static library, while `USE_SYSTEM_SUITESPARSE=1` requires that it is a shared library. Running the script `contrib/repackage_system_suitesparse4.make` will copy your static system SuiteSparse installation into the shared library format required by Julia. `make USE_SYSTEM_SUITESPARSE=1` will then use the SuiteSparse that has been copied into Julia's directory, but will not build a new SuiteSparse library from scratch.

### Intel compilers and Math Kernel Library (MKL)

To build Julia using the Intel compilers (icc, icpc, ifort), and link against
the [MKL] BLAS and LAPACK libraries, first make sure you have a recent version
of the compiler suite (version 15 or later).
### Intel MKL

For a 64-bit architecture, the environment should be set up as follows:

Expand All @@ -394,8 +392,6 @@ For a 64-bit architecture, the environment should be set up as follows:

Add the following to the `Make.user` file:

USEICC = 1
USEIFC = 1
USE_INTEL_MKL = 1
USE_INTEL_LIBM = 1

Expand Down
Loading

0 comments on commit 19dd3b9

Please sign in to comment.