diff --git a/.travis.yml b/.travis.yml index f1137de6d3c50..e396552fa720e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,48 @@ language: cpp -os: - - linux - - osx -env: - - ARCH="i686" - - ARCH="x86_64" +sudo: false matrix: - exclude: - - os: osx + include: + - os: linux env: ARCH="i686" + compiler: "g++-5 -m32" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - bar + - time + - binutils + - gcc-5 + - g++-5 + - gcc-5-multilib + - g++-5-multilib + - make:i386 + - libssl-dev:i386 + - gfortran-5 + - gfortran-5-multilib + - os: linux + env: ARCH="x86_64" + compiler: "g++-5 -m64" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - bar + - time + - g++-5 + - gfortran-5 + - os: osx + env: ARCH="x86_64" +cache: + directories: + - $TRAVIS_BUILD_DIR/deps/srccache + - $TRAVIS_BUILD_DIR/deps/build +branches: + only: + - master + - /release-.*/ notifications: email: false irc: @@ -22,51 +56,59 @@ notifications: - http://julia.mit.edu:8000/travis-hook before_install: - make check-whitespace + - JULIA_SYSIMG_BUILD_FLAGS="--output-ji ../usr/lib/julia/sys.ji" - if [ `uname` = "Linux" ]; then - sudo apt-get install jq -y; contrib/travis_fastfail.sh || exit 1; - BUILDOPTS="-j3 USEGCC=1 LLVM_CONFIG=llvm-config-3.3 VERBOSE=1 USE_BLAS64=0 FORCE_ASSERTIONS=1 STAGE2_DEPS=utf8proc"; - for lib in LLVM SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR LIBUNWIND OPENLIBM; do - export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; - done; - sudo add-apt-repository ppa:staticfloat/julia-deps -y; - sudo apt-get update -qq -y; - if [ "$ARCH" = "i686" ]; then - sudo apt-get remove libblas3gf liblapack3gf libarmadillo2 -y; - sudo apt-get install binutils:i386 -y; - sudo apt-get install gcc:i386 g++:i386 make:i386 cpp:i386 g++-4.6:i386 gcc-4.6:i386 libssl-dev:i386 patchelf:i386 gfortran:i386 llvm-3.3-dev:i386 libsuitesparse-dev:i386 libopenblas-dev:i386 libopenblas-base:i386 libblas-dev:i386 liblapack-dev:i386 liblapack3:i386 libarpack2-dev:i386 libarpack2:i386 libfftw3-dev:i386 libgmp-dev:i386 libpcre3-dev:i386 libunwind7-dev:i386 libopenlibm-dev:i386 libmpfr-dev:i386 -y; - else - sudo apt-get install patchelf gfortran llvm-3.3-dev libsuitesparse-dev libopenblas-dev liblapack-dev libarpack2-dev libfftw3-dev libgmp-dev libpcre3-dev libunwind7-dev libopenlibm-dev libmpfr-dev -y; - fi; + mkdir -p $HOME/bin; + ln -s /usr/bin/gcc-5 $HOME/bin/gcc; + ln -s /usr/bin/g++-5 $HOME/bin/g++; + ln -s /usr/bin/gfortran-5 $HOME/bin/gfortran; + ln -s /usr/bin/gcc-5 $HOME/bin/x86_64-linux-gnu-gcc; + ln -s /usr/bin/g++-5 $HOME/bin/x86_64-linux-gnu-g++; + gcc --version; + BUILDOPTS="-j3 VERBOSE=1 FORCE_ASSERTIONS=1"; + echo "override ARCH=$ARCH" >> Make.user; + TESTSTORUN="all"; elif [ `uname` = "Darwin" ]; then - brew tap staticfloat/julia; - brew rm --force $(brew deps --HEAD julia); brew update; - brew install -v jq; + brew install -v jq bar; contrib/travis_fastfail.sh || exit 1; + brew tap staticfloat/julia; + brew rm --force $(brew deps --HEAD julia); brew install -v --only-dependencies --HEAD julia; - BUILDOPTS="-j3 USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm33-julia)/bin/llvm-config-3.3 VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1 STAGE2_DEPS=utf8proc"; + BUILDOPTS="-j3 USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm37-julia)/bin/llvm-config-3.7.1 LLVM_SIZE=$(brew --prefix llvm37-julia)/bin/llvm-size-3.7.1"; + BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1 STAGE2_DEPS=utf8proc"; BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas"; for lib in LLVM SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND LIBGIT2; do export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; done; + export CXXFLAGS=-DUSE_ORCJIT; export LDFLAGS="-L$(brew --prefix openblas-julia)/lib -L$(brew --prefix suite-sparse-julia)/lib"; export DYLD_FALLBACK_LIBRARY_PATH="/usr/local/lib:/lib:/usr/lib:$(brew --prefix openblas-julia)/lib:$(brew --prefix suite-sparse-julia)/lib:$(brew --prefix arpack-julia)/lib"; make $BUILDOPTS -C contrib -f repackage_system_suitesparse4.make; - fi + JULIA_SYSIMG_BUILD_FLAGS="$JULIA_SYSIMG_BUILD_FLAGS --compile=all"; + COMPILE_MODE="--compile=min"; + TESTSTORUN="core ccall mmap llvmcall threads"; fi # TODO: turn this back to "all" once it's fast enough to not time out + - git clone -q git://git.kitenet.net/moreutils script: + - make -C moreutils mispipe - make $BUILDOPTS -C base version_git.jl.phony - - git clone -q git://git.kitenet.net/moreutils - - make $BUILDOPTS NO_GIT=1 JULIA_SYSIMG_BUILD_FLAGS="--output-ji ../usr/lib/julia/sys.ji" prefix=/tmp/julia install | moreutils/ts -s "%.s" + - moreutils/mispipe "make $BUILDOPTS NO_GIT=1 -C deps" bar > deps.log || cat deps.log + - make $BUILDOPTS NO_GIT=1 JULIA_SYSIMG_BUILD_FLAGS="$JULIA_SYSIMG_BUILD_FLAGS" prefix=/tmp/julia install | moreutils/ts -s "%.s" + - make $BUILDOPTS NO_GIT=1 build-stats + - du -sk /tmp/julia/* - if [ `uname` = "Darwin" ]; then for name in suitesparseconfig spqr umfpack colamd cholmod amd suitesparse_wrapper; do install -pm755 usr/lib/lib${name}*.dylib* /tmp/julia/lib/julia/; done; fi - cd .. && mv julia julia2 - - cp /tmp/julia/lib/julia/sys.ji local.ji && /tmp/julia/bin/julia -J local.ji -e 'true' && /tmp/julia/bin/julia-debug -J local.ji -e 'true' && rm local.ji + - cp /tmp/julia/lib/julia/sys.ji local.ji && /tmp/julia/bin/julia -J local.ji -e 'true' && + /tmp/julia/bin/julia-debug -J local.ji -e 'true' && rm local.ji - /tmp/julia/bin/julia -e 'versioninfo()' - - export JULIA_CPU_CORES=2 && cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia --check-bounds=yes runtests.jl all && /tmp/julia/bin/julia --check-bounds=yes runtests.jl pkg - - cd - && mv julia2 julia - - sudo dmesg - - echo "Ready for packaging..." + - export JULIA_CPU_CORES=2 && export JULIA_TEST_MAXRSS_MB=600 && cd /tmp/julia/share/julia/test && + /tmp/julia/bin/julia --check-bounds=yes $COMPILE_MODE runtests.jl $TESTSTORUN && + /tmp/julia/bin/julia --check-bounds=yes $COMPILE_MODE runtests.jl libgit2-online pkg + - cd `dirname $TRAVIS_BUILD_DIR` && mv julia2 julia && rm -rf julia/deps/build/julia-env +# uncomment the following if failures are suspected to be due to the out-of-memory killer +# - dmesg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 75c03a5ec63f0..a2566628ba333 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,20 @@ # Notes for Julia Contributors -Hi! Thanks for checking out Julia. If you have questions or problems, the [Julia dev list](https://groups.google.com/forum/?fromgroups#!forum/julia-dev) is a good place to post them, but you should check out the [online Julia docs](http://docs.Julialang.org/en/latest/) first. If you have changes you'd like to contribute, you'll need a [free GitHub account](https://github.com/signup/free). (If you're reading this on GitHub, you probably already have one.) You'll also want a working copy of Julia, built from source (you can still contribute with a binary install, but it's harder and not really recommended). In list form, here's what to do to become a contributor: +Hi! If you are new to the Julia community: welcome, and thanks for trying Julia. Please be sure to respect our [community standards](http://julialang.org/community/standards/) in all interactions. -* Join the [dev list](https://groups.google.com/forum/?fromgroups#!forum/julia-dev). +## Learning Julia + +[The learning page](http://julialang.org/learning/) has a great list of resources for new and experienced users alike. [This tutorial video](https://www.youtube.com/watch?v=vWkgEddb4-A) is one recommended starting point, as is the "[Invitation to Julia](https://www.youtube.com/watch?v=gQ1y5NUD_RI)" workshop video from JuliaCon 2015 ([slide materials here](https://github.com/dpsanders/invitation_to_julia)). The [Julia documentation](http://docs.Julialang.org/en/latest/) covers the language and core library features, and is [searchable](http://docs.Julialang.org/en/latest/search/). (note: Javascript required). + +## Before filing an issue + +- Reporting a potential bug? Please read the "[How to file a bug report](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report)" section to make sure that all necessary information is included. + +- Contributing code? Be sure to review the [contributor checklist](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#contributor-checklist) for helpful tips on the tools we use to build Julia. + +- Library feature requests are generally not accepted on this issue tracker. New libraries should be developed as [packages](http://docs.julialang.org/en/release-0.4/manual/packages/#package-development). Please email the [julia-users](https://groups.google.com/forum/#!forum/julia-users) mailing list to discuss library ideas. Doing so will often lead to pointers to existing projects and bring together collaborators with common interests. + +## Contributor Checklist * Create a [GitHub account](https://github.com/signup/free). @@ -10,13 +22,15 @@ Hi! Thanks for checking out Julia. If you have questions or problems, the [Julia * Build the software and libraries (the first time takes a while, but it's fast after that). Detailed build instructions are in the [README](https://github.com/JuliaLang/julia/tree/master/README.md). Julia depends on several external packages; most are automatically downloaded and installed, but are less frequently updated than Julia itself. -* Keep Julia current. Julia is a fast-moving target, and many details of the language are still settling out. Keep your repository up-to-date and rebase your work in progress frequently. +* Keep Julia current. Julia is a fast-moving target, and many details of the language are still settling out. Keep the repository up-to-date and rebase work-in-progress frequently to make merges simpler. * Learn to use [git](http://git-scm.com), the version control system used by GitHub and the Julia project. Try a tutorial such as the one [provided by GitHub](http://try.GitHub.io/levels/1/challenges/1). -* Respect our [community standards](http://julialang.org/community/standards/). +* Review discussions on the [dev mailing list](https://groups.google.com/forum/?fromgroups#!forum/julia-dev). + +* For more detailed tips, read the [submission guide](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#submitting-contributions) below. -* Relax and have fun. +* Relax and have fun! ## How to file a bug report @@ -34,11 +48,11 @@ A useful bug report filed as a GitHub issue provides information about how to re 3. When filing a bug report, provide where possible: - The full error message, including the backtrace. - A minimal working example, i.e. the smallest chunk of code that triggers the error. Ideally, this should be code that can be pasted into a REPL or run from a source file. If the code is larger than (say) 50 lines, consider putting it in a [gist](https://gist.github.com). - - The version of Julia you are using as provided by the `versioninfo()` command. Occasionally, the longer output produced by `versioninfo(true)` may be useful also, especially if the issue is related to a specific package. + - The version of Julia as provided by the `versioninfo()` command. Occasionally, the longer output produced by `versioninfo(true)` may be useful also, especially if the issue is related to a specific package. -4. When pasting code blocks or output, put triple backquotes (\`\`\`) around the text so GitHub will format it nicely. You can format code statements by surrounding it in single backquotes (\`). Be aware that the `@` sign tags users on GitHub, so references to macros should always be in single backquotes. See [GitHub's guide on Markdown](https://guides.github.com/features/mastering-markdown/) for more formatting tricks. +4. When pasting code blocks or output, put triple backquotes (\`\`\`) around the text so GitHub will format it nicely. Code statements should be surrounded by single backquotes (\`). Be aware that the `@` sign tags users on GitHub, so references to macros should always be in single backquotes. See [GitHub's guide on Markdown](https://guides.github.com/features/mastering-markdown/) for more formatting tricks. -## Submitting your contributions +## Submitting contributions ### Contributing a Julia package @@ -58,7 +72,7 @@ There are never enough tests. Track [code coverage at Coveralls](https://coveral 4. Run `make test-all` to rebuild Julia and run your new test(s). If you had to fix a bug or add functionality in `base`, this will ensure that your test passes and that you have not introduced extraneous whitespace. -5. Submit the test as a pull request. +5. Submit the test as a pull request (PR). * Code for the buildbot configuration is maintained at: https://github.com/staticfloat/julia-buildbot * You can see the current buildbot setup at: http://buildbot.e.ip.saba.us:8010/builders @@ -85,20 +99,23 @@ from Julia's root directory. Sometimes errors only show up in one of them, so if Existing docstrings now live primarily in `base/docs/helpdb.jl`. It is a goal over time to move the docstrings inline to their respective method definitions. If you want to edit the body of a method docstring, run the `doc/genstdlib.jl` script to regenerate the restructured text files **after** you have already rebuilt Julia. +(From the top-level source directory, you can do this with `make julia-genstdlib`.) If you want to edit an existing docstring signature, you **first** have to change the signature in the `doc/stdlib` `..function` or `..data` definition (not the auto-generated content) and *then* edit the helpdb.jl or inline method docstrings. The existing signatures in the `doc/stdlib/*.rst` files are pattern matched to base docstrings and the new content overwrites the content in `doc/stdlib/`. The signature definitions **must** be in sync or else the pattern match will fail and documentation will be lost in the result. -To add entirely new methods to the `stdlib` documentation, first add the signature in the appropriate `rst/stdlib/*.rst` file before writing the docstring, rebuilding Julia, and re-running `doc/genstdlib.jl`. +To add entirely new methods to the `stdlib` documentation, first add the signature in the appropriate `doc/stdlib/*.rst` file before writing the docstring, rebuilding Julia, and re-running `doc/genstdlib.jl`. It is encouraged to write all new docstrings in Markdown markup. If you need to write a more complicated docstring that contains cross-references or citations it can be written in a restructured text codeblock. Many of the existing docstrings are currently restructured text codeblocks and these will be transitioned to Markdown over time. RST codeblocks are delineated with the triple-quote (\`\`\`rst \`\`\`) Makdown codeblock syntax. The content of the codeblock is spliced directly into the final restructured text document unmodified. +For new functionality and other substantial changes, add a brief summary to `NEWS.md`. The news item should cross reference the pull request (PR) parenthetically, in the form `([#pr])`; after adding this, run `./julia doc/NEWS-update.jl` from the `julia` directory to update the cross-reference links. To add the PR reference number, first create the PR, then push an additional commit updating `NEWS.md` with the PR reference number. + ### Contributing to core functionality or base libraries *By contributing code to Julia, you are agreeing to release it under the [MIT License](https://github.com/JuliaLang/julia/tree/master/LICENSE.md).* -The Julia community uses [GitHub issues](https://github.com/JuliaLang/julia/issues) to track and discuss problems, feature requests, and pull requests. You can make pull requests for incomplete features to get code review. The convention is to prefix the pull request title with "WIP:" for Work In Progress, or "RFC:" for Request for Comments when work is completed and ready for merging. This will prevent accidental merging of work that is in progress. +The Julia community uses [GitHub issues](https://github.com/JuliaLang/julia/issues) to track and discuss problems, feature requests, and pull requests (PR). You can make pull requests for incomplete features to get code review. The convention is to prefix the pull request title with "WIP:" for Work In Progress, or "RFC:" for Request for Comments when work is completed and ready for merging. This will prevent accidental merging of work that is in progress. Note: These instructions are for adding to or improving functionality in the base library. Before getting started, it can be helpful to discuss the proposed changes or additions on the mailing list or in a GitHub issue---it's possible your proposed change belongs in a package rather than the core language. Also, keep in mind that changing stuff in the base can potentially break a lot of things. Finally, because of the time required to build Julia, note that it's usually faster to develop your code in stand-alone files, get it working, and then migrate it into the base libraries. @@ -135,6 +152,8 @@ Make sure that [Travis](http://www.travis-ci.org) greenlights the pull request w - try to adhere to a 92 character line length limit - use upper camel case convention for modules, type names - use lower case with underscores for method names + - it is generally preferred to use ASCII operators and identifiers over + Unicode equivalents whenever possible #### General Formatting Guidelines For C code contributions @@ -162,10 +181,6 @@ Make sure that [Travis](http://www.travis-ci.org) greenlights the pull request w - To remove whitespace relative to the `master` branch, run `git rebase --whitespace=fix master`. -## Getting help - -While getting familiar with Julia, remember to check out [the docs](http://docs.Julialang.org/en/latest/), keeping in mind that they are [searchable](http://docs.Julialang.org/en/latest/search/). (If you use a script blocker then you'll have to unblock that page.) The [source code](https://github.com/JuliaLang/julia) is an excellent source of examples (and it's mostly pretty approachable). If you're still stumped, post something on [the dev list](https://groups.google.com/forum/?fromgroups#!forum/julia-dev), but you may want to search the archives first to see if there's already been a discussion about what you're stuck on. - ## Resources * Julia diff --git a/LICENSE.md b/LICENSE.md index d1b76975eeac8..1f00b208885a3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -3,7 +3,7 @@ of the compiler (the contents of src/), most of the standard library (base/), and some utilities (most of the rest of the files in this repository). See below for exceptions. -> Copyright (c) 2009-2015: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, +> Copyright (c) 2009-2016: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, > and other contributors: > > https://github.com/JuliaLang/julia/contributors @@ -29,8 +29,9 @@ for exceptions. Julia includes code from the following projects, which have their own licenses: - [LDC](https://github.com/ldc-developers/ldc/blob/master/LICENSE) (for ccall/cfunction ABI definitions) [BSD-3]. The portion of code that Julia uses from LDC is [BSD-3] licensed. +- [LLVM](http://llvm.org/releases/3.7.0/LICENSE.TXT) (for parts of src/jitlayers.cpp and src/disasm.cpp) [BSD-3, effectively] - [MUSL](http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for getopt implementations on Windows) [MIT] -- [NetBSD](http://www.netbsd.org/about/redistribution.html) (for setjmp/longjmp implementations on Windows) [BSD-3] +- [NetBSD](http://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3] The Julia language links to the following external libraries, which have their own licenses: @@ -38,7 +39,7 @@ own licenses: - [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3] - [LIBUNWIND](http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master) [MIT] - [LIBUV](https://github.com/joyent/libuv/blob/master/LICENSE) [MIT] -- [LLVM](http://llvm.org/releases/3.3/LICENSE.TXT) [BSD-3, effectively] +- [LLVM](http://llvm.org/releases/3.7.0/LICENSE.TXT) [BSD-3, effectively] - [UTF8PROC](https://github.com/JuliaLang/libmojibake) [MIT] @@ -83,7 +84,9 @@ Julia's build process uses the following external tools: Julia bundles the following external programs and libraries on some platforms: - [7-Zip](http://www.7-zip.org/license.txt) -- [BUSYBOX](https://github.com/rmyorston/busybox-w32/blob/master/LICENSE) - [GIT](http://git-scm.com/about/free-and-open-source) - [ZLIB](http://zlib.net/zlib_license.html) - [LIBEXPAT](http://expat.cvs.sourceforge.net/viewvc/expat/expat/README) +- [OPENSSL](https://github.com/openssl/openssl/blob/master/LICENSE) + +On some platforms, distributions of Julia contain SSL certificate authority certificates, released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License). diff --git a/Make.inc b/Make.inc index 4b4a4cf4b365a..6d8ca1580a49f 100644 --- a/Make.inc +++ b/Make.inc @@ -2,43 +2,45 @@ ## Note: ## It is generally preferable to change these options, for -## your local machine, in a file named `Make.user` in this directory +## your local machine, in a file named `Make.user` in the toplevel +## and build directories # OPENBLAS build options -OPENBLAS_TARGET_ARCH= -OPENBLAS_SYMBOLSUFFIX= +OPENBLAS_TARGET_ARCH:= +OPENBLAS_SYMBOLSUFFIX:= +OPENBLAS_LIBNAMESUFFIX:= # If OPENBLAS_TARGET_ARCH is set, we default to disabling OPENBLAS_DYNAMIC_ARCH ifneq ($(OPENBLAS_TARGET_ARCH),) -OPENBLAS_DYNAMIC_ARCH=0 +OPENBLAS_DYNAMIC_ARCH:=0 else -OPENBLAS_DYNAMIC_ARCH=1 +OPENBLAS_DYNAMIC_ARCH:=1 endif -OPENBLAS_USE_THREAD=1 +OPENBLAS_USE_THREAD:=1 # Use libraries available on the system instead of building them -USE_SYSTEM_LLVM=0 -USE_SYSTEM_LIBUNWIND=0 -USE_SYSTEM_PCRE=0 -USE_SYSTEM_LIBM=0 -USE_SYSTEM_OPENLIBM=0 -UNTRUSTED_SYSTEM_LIBM=0 -USE_SYSTEM_OPENSPECFUN=0 -USE_SYSTEM_DSFMT=0 -USE_SYSTEM_BLAS=0 -USE_SYSTEM_LAPACK=0 -USE_SYSTEM_FFTW=0 -USE_SYSTEM_GMP=0 -USE_SYSTEM_MPFR=0 -USE_SYSTEM_ARPACK=0 -USE_SYSTEM_SUITESPARSE=0 -USE_SYSTEM_LIBUV=0 -USE_SYSTEM_UTF8PROC=0 -USE_SYSTEM_LIBGIT2=0 -USE_SYSTEM_PATCHELF=0 +USE_SYSTEM_LLVM:=0 +USE_SYSTEM_LIBUNWIND:=0 +USE_SYSTEM_PCRE:=0 +USE_SYSTEM_LIBM:=0 +USE_SYSTEM_OPENLIBM:=0 +UNTRUSTED_SYSTEM_LIBM:=0 +USE_SYSTEM_OPENSPECFUN:=0 +USE_SYSTEM_DSFMT:=0 +USE_SYSTEM_BLAS:=0 +USE_SYSTEM_LAPACK:=0 +USE_SYSTEM_FFTW:=0 +USE_SYSTEM_GMP:=0 +USE_SYSTEM_MPFR:=0 +USE_SYSTEM_ARPACK:=0 +USE_SYSTEM_SUITESPARSE:=0 +USE_SYSTEM_LIBUV:=0 +USE_SYSTEM_UTF8PROC:=0 +USE_SYSTEM_LIBGIT2:=0 +USE_SYSTEM_PATCHELF:=0 # Link to the LLVM shared library -USE_LLVM_SHLIB = 0 +USE_LLVM_SHLIB := 0 ## Settings for various Intel tools # Set to 1 to use MKL @@ -55,42 +57,79 @@ USEIFC ?= 0 ifeq ($(USE_MKL), 1) $(warning "The julia make variable USE_MKL has been renamed to USE_INTEL_MKL") -USE_INTEL_MKL = 1 +USE_INTEL_MKL := 1 endif +# Set to 1 to enable profiling with OProfile +USE_OPROFILE_JITEVENTS ?= 0 + # libc++ is standard on OS X 10.9, but not for earlier releases -USE_LIBCPP = 0 +USE_LIBCPP := 0 # assume we don't have LIBSSP support in our compiler, will enable later if likely true -HAVE_SSP = 0 +HAVE_SSP := 0 # GC debugging options -WITH_GC_VERIFY = 0 -WITH_GC_DEBUG_ENV = 0 +WITH_GC_VERIFY := 0 +WITH_GC_DEBUG_ENV := 0 # Prevent picking up $ARCH from the environment variables -ARCH= +ARCH:= + +# pick up BUILDROOT from O= if it isn't already set (from recursive make) +ifeq ($(BUILDROOT),) +ifeq ("$(origin O)", "command line") + BUILDROOT := $(abspath $O) + BUILDDIR := $(abspath $(BUILDROOT)/$(shell $(JULIAHOME)/contrib/relative_path.sh $(JULIAHOME) $(SRCDIR))) + $(info $(shell printf '\033[32;1mBuilding into $(BUILDROOT)\033[0m')) # use printf to expand the escape sequences +else + BUILDROOT:=$(JULIAHOME) +endif +endif +export BUILDROOT +unexport O + +# Make sure the user didn't try to specify a path that will confuse the shell / make +METACHARACTERS := ][?*{}() $$%:;&|!\#,\\`\": +ifneq (,$(findstring ',$(value BUILDROOT))) +$(error cowardly refusing to build into directory with a single-quote in the path) +endif +ifneq (,$(findstring ',$(value JULIAHOME))) +$(error cowardly refusing to build from source directory with a single-quote in the path) +endif +ifneq (,$(shell echo '$(value BUILDROOT)' | grep '[$(METACHARACTERS)]')) +$(error cowardly refusing to build into directory with a shell-metacharacter in the path\ + (got: $(value BUILDROOT))) +endif +ifneq (,$(shell echo '$(value JULIAHOME)' | grep '[$(METACHARACTERS)]')) +$(error cowardly refusing to build from source directory with a shell-metacharacter in the path\ + (got: $(value JULIAHOME))) +endif # we include twice to pickup user definitions better +# include from JULIAHOME first so that BUILDROOT can override ifeq (exists, $(shell [ -e $(JULIAHOME)/Make.user ] && echo exists )) include $(JULIAHOME)/Make.user endif +ifeq (exists, $(shell [ -e $(BUILDROOT)/Make.user ] && echo exists )) +include $(BUILDROOT)/Make.user +endif # disable automatic Makefile rules .SUFFIXES: # find out if git repository is available ifeq ($(shell [ -e $(JULIAHOME)/.git ] && echo true || echo "Warning: git information unavailable; versioning information limited" >&2), true) -NO_GIT = 0 +NO_GIT := 0 else -NO_GIT = 1 +NO_GIT := 1 endif -JULIA_VERSION = $(shell cat $(JULIAHOME)/VERSION) +JULIA_VERSION := $(shell cat $(JULIAHOME)/VERSION) ifneq ($(NO_GIT), 1) -JULIA_COMMIT = $(shell git rev-parse --short=10 HEAD) +JULIA_COMMIT := $(shell git rev-parse --short=10 HEAD) else -JULIA_COMMIT = $(JULIA_VERSION) +JULIA_COMMIT := $(JULIA_VERSION) endif # Whether to use GPL libraries or not. @@ -98,67 +137,70 @@ USE_GPL_LIBS ?= 1 # Directories where said libraries get installed to prefix ?= $(abspath julia-$(JULIA_COMMIT)) -bindir = $(prefix)/bin -libdir = $(prefix)/lib -private_libdir = $(libdir)/julia -libexecdir = $(prefix)/libexec -datarootdir = $(prefix)/share -docdir = $(datarootdir)/doc/julia -mandir = $(datarootdir)/man -man1dir = $(mandir)/man1 -includedir = $(prefix)/include -sysconfdir = $(prefix)/etc +bindir := $(prefix)/bin +libdir := $(prefix)/lib +libexecdir := $(prefix)/libexec +datarootdir := $(prefix)/share +docdir := $(datarootdir)/doc/julia +mandir := $(datarootdir)/man +man1dir := $(mandir)/man1 +includedir := $(prefix)/include +sysconfdir := $(prefix)/etc # Directories where things get built into -build_prefix = $(JULIAHOME)/usr -build_staging = $(build_prefix)-staging -build_bindir = $(build_prefix)/bin -build_libdir = $(build_prefix)/lib -build_private_libdir = $(build_prefix)/lib/julia -build_libexecdir = $(build_prefix)/libexec -build_datarootdir = $(build_prefix)/share -build_docdir = $(build_datarootdir)/doc/julia -build_mandir = $(build_datarootdir)/man -build_man1dir = $(build_mandir)/man1 -build_includedir = $(build_prefix)/include -build_sysconfdir = $(build_prefix)/etc - - -# Calculate relative paths to libdir, private_libdir, datarootdir, and sysconfdir -build_libdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(build_bindir) $(build_libdir)) -libdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(libdir)) -build_private_libdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(build_bindir) $(build_private_libdir)) -private_libdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(private_libdir)) -datarootdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(datarootdir)) -docdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(docdir)) -sysconfdir_rel = $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(sysconfdir)) - -INSTALL_F = $(JULIAHOME)/contrib/install.sh 644 -INSTALL_M = $(JULIAHOME)/contrib/install.sh 755 +build_prefix := $(BUILDROOT)/usr +build_staging := $(build_prefix)-staging +build_bindir := $(build_prefix)/bin +build_libdir := $(build_prefix)/lib +build_libexecdir := $(build_prefix)/libexec +build_datarootdir := $(build_prefix)/share +build_docdir := $(build_datarootdir)/doc/julia +build_mandir := $(build_datarootdir)/man +build_man1dir := $(build_mandir)/man1 +build_includedir := $(build_prefix)/include +build_sysconfdir := $(build_prefix)/etc # This used for debian packaging, to conform to library layout guidelines ifeq ($(MULTIARCH_INSTALL), 1) -MULTIARCH = $(shell gcc -print-multiarch) -private_libdir = $(prefix)/lib/$(MULTIARCH)/julia -libdir = $(prefix)/lib/$(MULTIARCH)/ +MULTIARCH := $(shell gcc -print-multiarch) +libdir := $(prefix)/lib/$(MULTIARCH) +build_libdir := $(build_prefix)/lib/$(MULTIARCH) endif +# Private library directories +private_libdir := $(libdir)/julia +build_private_libdir := $(build_libdir)/julia + +# Calculate relative paths to libdir, private_libdir, datarootdir, and sysconfdir +build_libdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(build_bindir) $(build_libdir)) +libdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(libdir)) +build_private_libdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(build_bindir) $(build_private_libdir)) +private_libdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(private_libdir)) +datarootdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(datarootdir)) +docdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(docdir)) +sysconfdir_rel := $(shell $(JULIAHOME)/contrib/relative_path.sh $(bindir) $(sysconfdir)) + +INSTALL_F := $(JULIAHOME)/contrib/install.sh 644 +INSTALL_M := $(JULIAHOME)/contrib/install.sh 755 + # LLVM Options -LLVMROOT = $(build_prefix) -LLVM_ASSERTIONS = 0 -LLVM_DEBUG = 0 +LLVMROOT := $(build_prefix) +LLVM_ASSERTIONS := 0 +LLVM_DEBUG := 0 +#LLVM_USE_CMAKE: defined in deps/Makefile as it depends on LLVM_VER_SHORT # set to 1 to get clang and compiler-rt -BUILD_LLVM_CLANG = 0 +BUILD_LLVM_CLANG := 0 # set to 1 to get lldb (often does not work, no chance with llvm3.2 and earlier) # see http://lldb.llvm.org/build.html for dependencies -BUILD_LLDB = 0 +BUILD_LLDB := 0 # Cross-compile -#XC_HOST = i686-w64-mingw32 -#XC_HOST = x86_64-w64-mingw32 +#XC_HOST := i686-w64-mingw32 +#XC_HOST := x86_64-w64-mingw32 # Path to cmake (override in Make.user if needed) CMAKE ?= cmake +CMAKE_GENERATOR ?= make # Point pkg-config to only look at our libraries export PKG_CONFIG_LIBDIR = $(JULIAHOME)/usr/lib/pkgconfig @@ -171,28 +213,28 @@ XC_HOST ?= $(shell uname -m)-w64-mingw32 endif ifeq ($(XC_HOST),) -CROSS_COMPILE= +CROSS_COMPILE:= +# delayed expansion of $(CC), since it won't be computed until later HOSTCC = $(CC) else -HOSTCC = gcc -override OPENBLAS_DYNAMIC_ARCH = 1 -override CROSS_COMPILE=$(XC_HOST)- +HOSTCC := gcc +override OPENBLAS_DYNAMIC_ARCH := 1 +override CROSS_COMPILE:=$(XC_HOST)- ifneq (,$(findstring mingw,$(XC_HOST))) override OS := WINNT -ifneq (,$(findstring CYGWIN,$(BUILD_OS))) -export STD_LIB_PATH := $(shell $(CROSS_COMPILE)gcc -print-search-dirs | grep programs | sed -e "s/^programs: =//" -e "s!/lib/!/bin/!g") -export STD_LIB_PATH := $(STD_LIB_PATH):$(shell $(CROSS_COMPILE)gcc -print-search-dirs | grep libraries | sed -e "s/^libraries: =//" -e "s!/lib/!/bin/!g") -else -export STD_LIB_PATH := $(shell $(CROSS_COMPILE)gcc -print-search-dirs | grep programs | sed "s/^programs: =//" | xargs -d":" winepath -w | tr '\n' ';') -export STD_LIB_PATH := $(STD_LIB_PATH);$(shell $(CROSS_COMPILE)gcc -print-search-dirs | grep libraries | sed "s/^libraries: =//" | xargs -d":" winepath -w | tr '\n' ';') +STD_LIB_PATH := $(shell $(CROSS_COMPILE)gcc -print-search-dirs | grep programs | sed -e "s/^programs: =//") +STD_LIB_PATH := $(STD_LIB_PATH):$(shell $(CROSS_COMPILE)gcc -print-search-dirs | grep libraries | sed -e "s/^libraries: =//") +ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # the cygwin-mingw32 compiler lies about it search directory paths +STD_LIB_PATH := $(shell echo '$(STD_LIB_PATH)' | sed -e "s!/lib/!/bin/!g") endif else $(error "unknown XC_HOST variable set") endif endif +STD_LIB_PATH ?= $(PATH) -JLDOWNLOAD = $(JULIAHOME)/deps/jldownload -JLCHECKSUM = $(JULIAHOME)/deps/jlchecksum +JLDOWNLOAD := $(JULIAHOME)/deps/jldownload +JLCHECKSUM := $(JULIAHOME)/deps/jlchecksum # Figure out OS and architecture OS := $(BUILD_OS) @@ -210,75 +252,79 @@ ifneq (,$(findstring MSYS,$(BUILD_OS))) override BUILD_OS := WINNT endif -ifeq ($(OS), WINNT) -fPIC = ifeq ($(BUILD_OS), WINNT) -PATH := $(PATH):$(build_libdir):$(build_private_libdir):/c/Program Files/7-zip +BUILD_EXE := .exe +else ifneq (,$(findstring CYGWIN,$(BUILD_OS))) +BUILD_EXE := .exe +else +BUILD_EXE := endif -EXE = .exe +ifeq ($(OS), WINNT) +fPIC := +EXE := .exe else -fPIC = -fPIC -EXE = +fPIC := -fPIC +EXE := endif -JULIAGC = MARKSWEEP -USE_COPY_STACKS = 1 +JULIAGC := MARKSWEEP +JULIACODEGEN := LLVM # flag for disabling assertions ifeq ($(FORCE_ASSERTIONS), 1) -DISABLE_ASSERTIONS = +DISABLE_ASSERTIONS := else -DISABLE_ASSERTIONS = -DNDEBUG +DISABLE_ASSERTIONS := -DNDEBUG endif # Compiler specific stuff ifeq ($(USEMSVC), 1) -USEGCC = 0 -USECLANG = 0 -USEICC = 0 +USEGCC := 0 +USECLANG := 0 +USEICC := 0 else ifeq ($(USECLANG), 1) -USEGCC = 0 -USEICC = 0 +USEGCC := 0 +USEICC := 0 else ifeq ($(USEICC), 1) -USEGCC = 0 -USECLANG = 0 +USEGCC := 0 +USECLANG := 0 else # default to gcc -USEGCC = 1 -USECLANG = 0 -USEICC = 0 +USEGCC := 1 +USECLANG := 0 +USEICC := 0 endif endif endif ifeq ($(USEIFC), 1) -FC = ifort +FC := ifort else -FC = $(CROSS_COMPILE)gfortran +FC := $(CROSS_COMPILE)gfortran endif -STDLIBCPP_FLAG = +STDLIBCPP_FLAG := ifeq ($(OS), Darwin) DARWINVER := $(shell uname -r | cut -b 1-2) DARWINVER_GTE13 := $(shell expr `uname -r | cut -b 1-2` \>= 13) ifeq ($(DARWINVER), 10) # Snow Leopard specific configuration -USEGCC = 1 -USECLANG = 0 -OPENBLAS_TARGET_ARCH=NEHALEM -OPENBLAS_DYNAMIC_ARCH=0 -USE_SYSTEM_LIBUNWIND=1 +USEGCC := 1 +USECLANG := 0 +OPENBLAS_TARGET_ARCH:=NEHALEM +OPENBLAS_DYNAMIC_ARCH:=0 +USE_SYSTEM_LIBUNWIND:=1 else ifeq ($(DARWINVER_GTE13),1) -USE_LIBCPP = 1 -STDLIBCPP_FLAG = -stdlib=libstdc++ +USE_LIBCPP := 1 +STDLIBCPP_FLAG := -stdlib=libstdc++ else -USE_LIBCPP = 0 +USE_LIBCPP := 0 endif -USEGCC = 0 -USECLANG = 1 +USEGCC := 0 +USECLANG := 1 endif endif @@ -289,23 +335,29 @@ endif ifeq ($(SANITIZE),1) $(error Address Sanitizer only supported with clang. Try setting SANITIZE=0) endif -CC = $(CROSS_COMPILE)gcc -CXX = $(CROSS_COMPILE)g++ -JCFLAGS = -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -JCPPFLAGS = -JCXXFLAGS = -pipe $(fPIC) -fno-rtti -DEBUGFLAGS = -O0 -ggdb3 -DJL_DEBUG_BUILD -fstack-protector-all -SHIPFLAGS = -O3 -ggdb3 -falign-functions +CC := $(CROSS_COMPILE)gcc +CXX := $(CROSS_COMPILE)g++ +JCFLAGS := -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 +# AArch64 needs this flag to generate the .eh_frame used by libunwind +JCPPFLAGS := -fasynchronous-unwind-tables +JCXXFLAGS := -pipe $(fPIC) -fno-rtti +ifneq ($(OS), WINNT) +# Do no enable on windows to avoid warnings from libuv. +JCXXFLAGS += -pedantic +endif +DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all +SHIPFLAGS := -O3 -ggdb2 -falign-functions endif ifeq ($(USECLANG),1) -CC = $(CROSS_COMPILE)clang -CXX = $(CROSS_COMPILE)clang++ -JCFLAGS = -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -JCPPFLAGS = -JCXXFLAGS = -pipe $(fPIC) -fno-rtti -DEBUGFLAGS = -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all -SHIPFLAGS = -O3 -g +CC := $(CROSS_COMPILE)clang +CXX := $(CROSS_COMPILE)clang++ +JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 +# AArch64 needs this flag to generate the .eh_frame used by libunwind +JCPPFLAGS := -fasynchronous-unwind-tables +JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic +DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all +SHIPFLAGS := -O3 -g ifeq ($(OS), Darwin) ifeq ($(USE_LIBCPP), 1) CC += -stdlib=libc++ -mmacosx-version-min=10.7 @@ -326,13 +378,13 @@ endif ifeq ($(SANITIZE),1) $(error Address Sanitizer only supported with clang. Try setting SANITIZE=0) endif -CC = icc -CXX = icpc -JCFLAGS = -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -fp-model precise -fp-model except -no-ftz -JCPPFLAGS = -JCXXFLAGS = -pipe $(fPIC) -fno-rtti -DEBUGFLAGS = -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all -SHIPFLAGS = -O3 -g -falign-functions +CC := icc +CXX := icpc +JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -fp-model precise -fp-model except -no-ftz +JCPPFLAGS := +JCXXFLAGS := -pipe $(fPIC) -fno-rtti +DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all +SHIPFLAGS := -O3 -g -falign-functions endif ifeq ($(USECCACHE), 1) @@ -341,35 +393,31 @@ CC_ARG := $(CC) # Expand CC and CXX here already because we want CXX_ARG := $(CXX) # the original definition and not the ccache version. CC_FULL := ccache $(CC) # Expand CC and CXX here already to avoid recursive CXX_FULL := ccache $(CXX) # referencing. -CC = $(CC_FULL) # Add an extra indirection to make CC/CXX non-simple -CXX = $(CXX_FULL) # vars (because of how -m$(BINARY) is added later on). -CC_BASE = ccache -CXX_BASE = ccache +CC := $(CC_FULL) # Add an extra indirection to make CC/CXX non-simple +CXX := $(CXX_FULL) # vars (because of how -m$(BINARY) is added later on). +CC_BASE := ccache +CXX_BASE := ccache ifeq ($(USECLANG),1) # ccache and Clang don't do well together # http://petereisentraut.blogspot.be/2011/05/ccache-and-clang.html -CC += -Qunused-arguments -fcolor-diagnostics -CXX += -Qunused-arguments -fcolor-diagnostics +CC += -Qunused-arguments +CXX += -Qunused-arguments # http://petereisentraut.blogspot.be/2011/09/ccache-and-clang-part-2.html export CCACHE_CPP2 := yes endif else #USECCACHE -CC_BASE = $(shell echo $(CC) | cut -d' ' -f1) -CXX_BASE = $(shell echo $(CXX) | cut -d' ' -f1) -endif - -ifeq ($(LLVM_VER),svn) -JCXXFLAGS += -std=c++11 +CC_BASE := $(shell echo $(CC) | cut -d' ' -f1) +CXX_BASE := $(shell echo $(CXX) | cut -d' ' -f1) endif -JFFLAGS = -O2 $(fPIC) +JFFLAGS := -O2 $(fPIC) ifneq ($(USEMSVC),1) -CPP = $(CC) -E +CPP := $(CC) -E AR := $(CROSS_COMPILE)ar AS := $(CROSS_COMPILE)as LD := $(CROSS_COMPILE)ld else #USEMSVC -CPP = $(CC) -EP +CPP := $(CC) -EP AR := lib ifeq ($(ARCH),x86_64) AS := ml64 @@ -382,35 +430,43 @@ RANLIB := $(CROSS_COMPILE)ranlib # file extensions ifeq ($(OS), WINNT) - SHLIB_EXT = dll + SHLIB_EXT := dll else ifeq ($(OS), Darwin) - SHLIB_EXT = dylib + SHLIB_EXT := dylib else - SHLIB_EXT = so + SHLIB_EXT := so endif # On Windows, we want shared library files to end up in $(build_bindir), instead of $(build_libdir) ifeq ($(OS),WINNT) -build_shlibdir = $(build_bindir) +build_shlibdir := $(build_bindir) else -build_shlibdir = $(build_libdir) +build_shlibdir := $(build_libdir) endif ifeq (exists, $(shell [ -e $(JULIAHOME)/Make.user ] && echo exists )) include $(JULIAHOME)/Make.user endif +ifeq (exists, $(shell [ -e $(BUILDROOT)/Make.user ] && echo exists )) +include $(BUILDROOT)/Make.user +endif ifeq ($(SANITIZE),1) ifeq ($(SANITIZE_MEMORY),1) -SANITIZE_OPTS = -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer +SANITIZE_OPTS := -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer +SANITIZE_LDFLAGS := $(SANITIZE_OPTS) else -SANITIZE_OPTS = -fsanitize=address -mllvm -asan-stack=0 +SANITIZE_OPTS := -fsanitize=address -mllvm -asan-stack=0 +SANITIZE_LDFLAGS := -fsanitize=address endif JCXXFLAGS += $(SANITIZE_OPTS) JCFLAGS += $(SANITIZE_OPTS) -LDFLAGS += $(SANITIZE_OPTS) -DEPS_CFLAGS += $(SANITIZE_OPTS) -DEPS_CXXFLAGS += $(SANITIZE_OPTS) +LDFLAGS += $(SANITIZE_LDFLAGS) +# FIXME: sanitizing all dependencies doesn't work because of -Wl,--no-undefined +# https://github.com/JuliaLang/julia/issues/13858 +# use LLVM_SANITIZE to sanitize LLVM +#DEPS_CFLAGS += $(SANITIZE_OPTS) +#DEPS_CXXFLAGS += $(SANITIZE_OPTS) endif TAR=`which gtar 2>/dev/null || which tar 2>/dev/null` @@ -441,9 +497,24 @@ endif # if MARCH is set newer than the native processor, be forewarned that the compile might fail # JULIA_CPU_TARGET is the JIT-only complement to MARCH. Setting it explicitly is not generally necessary, # since it is set equal to MARCH by default + BUILD_MACHINE := $(shell $(HOSTCC) -dumpmachine) + +# Clang spells mingw `-windows-gnu`, but autotools, etc +# don't recognize that, so canonicalize to mingw32 +BUILD_MACHINE := $(subst windows-gnu,mingw32,$(BUILD_MACHINE)) + ifeq ($(ARCH),) override ARCH := $(shell $(CC) -dumpmachine | sed "s/\([^-]*\).*$$/\1/") +else +ifneq ($(XC_HOST),) +XC_HOST := $(ARCH)$(shell echo $(XC_HOST) | sed "s/[^-]*\(.*\)$$/\1/") +MARCH := $(subst _,-,$(ARCH)) +else # insert ARCH into HOST +XC_HOST := $(ARCH)$(shell echo $(BUILD_MACHINE) | sed "s/[^-]*\(.*\)$$/\1/") +endif +endif + ifeq ($(ARCH),mingw32) $(error "the mingw32 compiler you are using fails the openblas testsuite. please see the README.windows document for a replacement") else ifeq (cygwin, $(shell $(CC) -dumpmachine | cut -d\- -f3)) @@ -451,24 +522,37 @@ $(error "cannot build julia with cygwin-target compilers. set XC_HOST to i686-w6 else ifeq (msys, $(shell $(CC) -dumpmachine | cut -d\- -f3)) $(error "cannot build julia with msys-target compilers. please see the README.windows document for instructions on setting up mingw-w64 compilers") endif + ifeq ($(BUILD_OS),Darwin) -## Mac is a rather amazing 64-bit user-space on 32-bit kernel architecture, so to determine arch we detect +## Mac is a rather cool 64-bit user-space on 32-bit kernel architecture, so to determine arch we detect ## the capabilities of the hardware, rather than the compiler or kernel, and make a substitution -ifeq ($(ARCH),x86_64) -override ARCH = i686 -else ifeq ($(ARCH),i386) -override ARCH = i686 +BUILD_ARCH := $(shell echo $(BUILD_MACHINE) | sed "s/\([^-]*\).*$$/\1/") +ifeq ($(BUILD_ARCH),x86_64) +BUILD_ARCH := i686 +else ifeq ($(BUILD_ARCH),i386) +BUILD_ARCH := i686 endif -ifeq ($(ARCH),i686) +ifeq ($(BUILD_ARCH),i686) ifeq ($(shell sysctl -n hw.cpu64bit_capable),1) -override ARCH = x86_64 +BUILD_ARCH := x86_64 endif -BUILD_MACHINE := $(ARCH)$(shell echo $(BUILD_MACHINE) | sed "s/[^-]*\(.*\)$$/\1/") +BUILD_MACHINE := $(BUILD_ARCH)$(shell echo $(BUILD_MACHINE) | sed "s/[^-]*\(.*\)$$/\1/") endif +ifeq ($(BUILD_OS),$(OS)) +ARCH := $(BUILD_OS) +endif +endif + +# Detect common pre-SSE2 JULIA_CPU_TARGET values known not to work (#7185) +ifeq ($(MARCH),) +ifneq ($(findstring $(ARCH),i386 i486 i586 i686),) +MARCH := pentium4 endif -else -XC_HOST := $(ARCH)$(shell echo $(BUILD_MACHINE) | sed "s/[^-]*\(.*\)$$/\1/") -MARCH = $(ARCH) +endif + +ifneq ($(findstring $(MARCH),i386 i486 i586 i686 pentium pentium2 pentium3),) +$(error Pre-SSE2 CPU targets not supported. To create a generic 32-bit x86 binary, \ +pass 'MARCH=pentium4'.) endif ifneq ($(MARCH),) @@ -494,43 +578,32 @@ endif JULIA_CPU_TARGET ?= native -# Detect common pre-SSE2 JULIA_CPU_TARGET values known not to work (#7185) -ifneq ($(findstring $(JULIA_CPU_TARGET),i386 i486 i586 i686 pentium pentium2 pentium3),) -$(error Pre-SSE2 CPU targets not supported. To create a generic 32-bit x86 binary, \ -pass 'MARCH=i686 JULIA_CPU_TARGET=pentium4', or 'MARCH=pentium4' if not building any dependencies.) -endif - # We map amd64 to x86_64 for compatibility with systems that identify 64-bit systems as such ifeq ($(ARCH),amd64) -override ARCH = x86_64 +override ARCH := x86_64 endif ifeq ($(ARCH),i386) -BINARY=32 -ISX86=1 +BINARY:=32 +ISX86:=1 else ifeq ($(ARCH),i387) -BINARY=32 -ISX86=1 +BINARY:=32 +ISX86:=1 else ifeq ($(ARCH),i486) -BINARY=32 -ISX86=1 +BINARY:=32 +ISX86:=1 else ifeq ($(ARCH),i586) -BINARY=32 -ISX86=1 +BINARY:=32 +ISX86:=1 else ifeq ($(ARCH),i686) -BINARY=32 -ISX86=1 +BINARY:=32 +ISX86:=1 else ifeq ($(ARCH),x86_64) -BINARY=64 -ISX86=1 -else ifneq (,$(findstring arm,$(ARCH))) -ISX86=0 -else ifneq (,$(findstring powerpc,$(ARCH))) -ISX86=0 -else ifneq (,$(findstring ppc,$(ARCH))) -ISX86=0 +BINARY:=64 +ISX86:=1 else -$(error "unknown word-size for arch: $(ARCH)") +# For all other architectures (ARM, PPC, AArch64, etc.) +ISX86:=0 endif # If we are running on ARM, set certain options automatically @@ -539,11 +612,11 @@ JCFLAGS += -fsigned-char LLVM_ASSERTIONS=1 #LLVM_FLAGS+="--with-float=hard --with-abi=aapcs-vfp" -LLVM_VER=3.6.1 -override USE_BLAS64=0 -override OPENBLAS_DYNAMIC_ARCH=0 -override OPENBLAS_TARGET_ARCH=ARMV7 +override USE_BLAS64:=0 +override OPENBLAS_DYNAMIC_ARCH:=0 +override OPENBLAS_TARGET_ARCH:=ARMV7 +override USE_SYSTEM_LIBM:=1 endif @@ -558,6 +631,13 @@ CXX_ARG += -m$(BINARY) endif endif +ifeq ($(OS),WINNT) +ifneq ($(ARCH),x86_64) +JCFLAGS += -mincoming-stack-boundary=2 +JCXXFLAGS += -mincoming-stack-boundary=2 +endif +endif + ifeq ($(USEGCC),1) ifeq ($(ISX86),1) SHIPFLAGS += -momit-leaf-frame-pointer @@ -565,34 +645,57 @@ endif endif ifeq ($(OS),WINNT) -LIBUNWIND= +LIBUNWIND:= else ifeq ($(USE_SYSTEM_LIBUNWIND), 1) ifneq ($(OS),Darwin) -LIBUNWIND=-lunwind-generic -lunwind +LIBUNWIND:=-lunwind-generic -lunwind +# Only for linux since we want to use not yet released libunwind features +JCFLAGS+=-DSYSTEM_LIBUNWIND +JCPPFLAGS+=-DSYSTEM_LIBUNWIND endif else ifeq ($(OS),Darwin) -LIBUNWIND=$(build_libdir)/libosxunwind.a +LIBUNWIND:=$(build_libdir)/libosxunwind.a JCPPFLAGS+=-DLIBOSXUNWIND else -LIBUNWIND=$(build_libdir)/libunwind-generic.a $(build_libdir)/libunwind.a +LIBUNWIND:=$(build_libdir)/libunwind-generic.a $(build_libdir)/libunwind.a endif endif endif +ifeq ($(origin LLVM_CONFIG), undefined) +ifeq ($(USE_SYSTEM_LLVM), 1) +LLVM_CONFIG := llvm-config$(EXE) +else +LLVM_CONFIG := $(build_bindir)/llvm-config$(EXE) +endif +endif # LLVM_CONFIG undefined + ifeq ($(USE_SYSTEM_LLVM), 1) -LLVM_CONFIG ?= llvm-config$(EXE) JCPPFLAGS+=-DSYSTEM_LLVM -LLVM_VER = $(shell $(LLVM_CONFIG) --version) +endif # SYSTEM_LLVM + +ifeq ($(BUILD_OS),$(OS)) +LLVM_CONFIG_HOST := $(LLVM_CONFIG) +else +LLVM_CONFIG_HOST := $(basename $(LLVM_CONFIG))-host$(BUILD_EXE) +ifeq (exists, $(shell [ -f '$(LLVM_CONFIG_HOST)' ] && echo exists )) +ifeq ($(shell $(LLVM_CONFIG_HOST) --version),3.3) +# llvm-config-host <= 3.3 is broken, use llvm-config instead (in an emulator) +# use delayed expansion (= not :=) because spawn isn't defined until later +LLVM_CONFIG_HOST = $(call spawn,$(LLVM_CONFIG)) +endif else -LLVM_CONFIG=$(build_bindir)/llvm-config$(EXE) +# llvm-config-host does not exist (cmake build) +LLVM_CONFIG_HOST = $(call spawn,$(LLVM_CONFIG)) +endif endif ifeq ($(USE_SYSTEM_PCRE), 1) -PCRE_CONFIG = pcre2-config +PCRE_CONFIG := pcre2-config else -PCRE_CONFIG = $(build_bindir)/pcre2-config +PCRE_CONFIG := $(build_bindir)/pcre2-config endif # Use ILP64 BLAS interface when building openblas from source on 64-bit architectures @@ -610,64 +713,64 @@ endif ifeq ($(USE_SYSTEM_BLAS), 1) ifeq ($(OS), Darwin) -USE_BLAS64 = 0 -USE_SYSTEM_LAPACK = 0 -LIBBLAS = -L$(build_libdir) -lgfortblas -LIBBLASNAME = libgfortblas +USE_BLAS64 := 0 +USE_SYSTEM_LAPACK := 0 +LIBBLAS := -L$(build_libdir) -lgfortblas +LIBBLASNAME := libgfortblas else LIBBLAS ?= -lblas LIBBLASNAME ?= libblas endif else -LIBBLAS = -L$(build_shlibdir) -lopenblas -LIBBLASNAME = libopenblas +LIBBLAS := -L$(build_shlibdir) -lopenblas +LIBBLASNAME := libopenblas endif # OpenBLAS builds LAPACK as part of its build. # We only need to build LAPACK if we are not using OpenBLAS. ifeq ($(USE_SYSTEM_BLAS), 0) -LIBLAPACK = $(LIBBLAS) -LIBLAPACKNAME = $(LIBBLASNAME) +LIBLAPACK := $(LIBBLAS) +LIBLAPACKNAME := $(LIBBLASNAME) else ifeq ($(USE_SYSTEM_LAPACK), 1) LIBLAPACK ?= -llapack LIBLAPACKNAME ?= liblapack else -LIBLAPACK = -L$(build_shlibdir) -llapack $(LIBBLAS) -LIBLAPACKNAME = liblapack +LIBLAPACK := -L$(build_shlibdir) -llapack $(LIBBLAS) +LIBLAPACKNAME := liblapack endif endif ifeq ($(OS), WINNT) -LIBFFTWNAME = libfftw3 -LIBFFTWFNAME = libfftw3f +LIBFFTWNAME := libfftw3 +LIBFFTWFNAME := libfftw3f else -LIBFFTWNAME = libfftw3_threads -LIBFFTWFNAME = libfftw3f_threads +LIBFFTWNAME := libfftw3_threads +LIBFFTWFNAME := libfftw3f_threads endif ifeq ($(USE_SYSTEM_LIBM), 1) -LIBM = -lm -LIBMNAME = libm +LIBM := -lm +LIBMNAME := libm else -LIBM = -lopenlibm -LIBMNAME = libopenlibm +LIBM := -lopenlibm +LIBMNAME := libopenlibm endif ifeq ($(USE_SYSTEM_LIBUV), 1) - LIBUV = /usr/lib/libuv-julia.a - LIBUV_INC = /usr/include + LIBUV := /usr/lib/libuv-julia.a + LIBUV_INC := /usr/include else - LIBUV = $(build_libdir)/libuv.a - LIBUV_INC = $(build_includedir) + LIBUV := $(build_libdir)/libuv.a + LIBUV_INC := $(build_includedir) endif ifeq ($(USE_SYSTEM_UTF8PROC), 1) - LIBUTF8PROC = -lutf8proc - UTF8PROC_INC = /usr/include + LIBUTF8PROC := -lutf8proc + UTF8PROC_INC := /usr/include else - LIBUTF8PROC = $(build_libdir)/libutf8proc.a - UTF8PROC_INC = $(build_includedir) + LIBUTF8PROC := $(build_libdir)/libutf8proc.a + UTF8PROC_INC := $(build_includedir) endif # OS specific stuff @@ -675,44 +778,44 @@ endif # install_name_tool ifeq ($(OS), Darwin) # must end with a / and have no trailing spaces - INSTALL_NAME_ID_DIR = @rpath/ - INSTALL_NAME_CMD = install_name_tool -id $(INSTALL_NAME_ID_DIR) - INSTALL_NAME_CHANGE_CMD = install_name_tool -change + INSTALL_NAME_ID_DIR := @rpath/ + INSTALL_NAME_CMD := install_name_tool -id $(INSTALL_NAME_ID_DIR) + INSTALL_NAME_CHANGE_CMD := install_name_tool -change ifeq ($(shell test `dsymutil -v | cut -d\- -f2 | cut -d. -f1` -gt 102 && echo yes), yes) - DSYMUTIL = dsymutil + DSYMUTIL := dsymutil else - DSYMUTIL = true -ignore + DSYMUTIL := true -ignore endif else - INSTALL_NAME_ID_DIR = - INSTALL_NAME_CMD = true -ignore - INSTALL_NAME_CHANGE_CMD = true -ignore - DSYMUTIL = true -ignore + INSTALL_NAME_ID_DIR := + INSTALL_NAME_CMD := true -ignore + INSTALL_NAME_CHANGE_CMD := true -ignore + DSYMUTIL := true -ignore endif # shared library runtime paths ifeq ($(OS), WINNT) - RPATH = - RPATH_ORIGIN = + RPATH := + RPATH_ORIGIN := else ifeq ($(OS), Darwin) - RPATH = -Wl,-rpath,'@executable_path/$(build_private_libdir_rel)' -Wl,-rpath,'@executable_path/$(build_libdir_rel)' - RPATH_ORIGIN = -Wl,-rpath,'@loader_path/' + RPATH := -Wl,-rpath,'@executable_path/$(build_private_libdir_rel)' -Wl,-rpath,'@executable_path/$(build_libdir_rel)' + RPATH_ORIGIN := -Wl,-rpath,'@loader_path/' else - RPATH = -Wl,-rpath,'$$ORIGIN/$(build_private_libdir_rel)' -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-z,origin - RPATH_ORIGIN = -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin + RPATH := -Wl,-rpath,'$$ORIGIN/$(build_private_libdir_rel)' -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-z,origin + RPATH_ORIGIN := -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin endif # --whole-archive ifeq ($(OS), Darwin) - WHOLE_ARCHIVE = -Xlinker -all_load - NO_WHOLE_ARCHIVE = + WHOLE_ARCHIVE := -Xlinker -all_load + NO_WHOLE_ARCHIVE := else ifneq ($(USEMSVC), 1) - WHOLE_ARCHIVE = -Wl,--whole-archive - NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive + WHOLE_ARCHIVE := -Wl,--whole-archive + NO_WHOLE_ARCHIVE := -Wl,--no-whole-archive endif ifeq ($(OS), Linux) -OSLIBS += -ldl -lrt -lpthread -Wl,--export-dynamic -Wl,--no-whole-archive $(LIBUNWIND) +OSLIBS += -Wl,--no-as-needed -ldl -lrt -lpthread -Wl,--export-dynamic,--as-needed,--no-whole-archive $(LIBUNWIND) ifneq ($(SANITIZE),1) ifneq ($(SANITIZE_MEMORY),1) ifneq ($(LLVM_SANITIZE),1) @@ -720,47 +823,53 @@ OSLIBS += -Wl,--version-script=$(JULIAHOME)/src/julia.expmap endif endif endif -JLDFLAGS = -Wl,-Bdynamic +JLDFLAGS := -Wl,-Bdynamic ifeq (-Bsymbolic-functions, $(shell $(LD) --help | grep -o -e "-Bsymbolic-functions")) -JLIBLDFLAGS = -Wl,-Bsymbolic-functions +JLIBLDFLAGS := -Wl,-Bsymbolic-functions else -JLIBLDFLAGS = +JLIBLDFLAGS := endif else #Linux -JLIBLDFLAGS = +JLIBLDFLAGS := endif ifeq ($(OS), FreeBSD) -JLDFLAGS = -Wl,-Bdynamic +JLDFLAGS := -Wl,-Bdynamic OSLIBS += -lelf -lkvm -lrt -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap $(NO_WHOLE_ARCHIVE) $(LIBUNWIND) endif ifeq ($(OS), Darwin) -INSTALL_NAME_CMD = install_name_tool -id $(INSTALL_NAME_ID_DIR) -INSTALL_NAME_CHANGE_CMD = install_name_tool -change -SHLIB_EXT = dylib +INSTALL_NAME_CMD := install_name_tool -id $(INSTALL_NAME_ID_DIR) +INSTALL_NAME_CHANGE_CMD := install_name_tool -change +SHLIB_EXT := dylib OSLIBS += -ldl -Wl,-w -framework CoreFoundation -framework CoreServices $(LIBUNWIND) -WHOLE_ARCHIVE = -Xlinker -all_load -NO_WHOLE_ARCHIVE = -JLDFLAGS = -HAVE_SSP = 1 +WHOLE_ARCHIVE := -Xlinker -all_load +NO_WHOLE_ARCHIVE := +JLDFLAGS := +HAVE_SSP := 1 endif ifeq ($(OS), WINNT) ifneq ($(USEMSVC), 1) -HAVE_SSP = 1 +HAVE_SSP := 1 OSLIBS += -Wl,--export-all-symbols -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \ $(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -JLDFLAGS = -Wl,--stack,8388608 ifeq ($(ARCH),i686) -JLDFLAGS += -Wl,--large-address-aware +JLDFLAGS := -Wl,--stack,8388608 -Wl,--large-address-aware +else #x64 +JLDFLAGS := -Wl,--stack,16777216 endif else #USEMSVC OSLIBS += kernel32.lib ws2_32.lib psapi.lib advapi32.lib iphlpapi.lib shell32.lib winmm.lib -JLDFLAGS = -stack:8388608 +JLDFLAGS := -stack:16777216 endif JCPPFLAGS += -D_WIN32_WINNT=0x0502 -UNTRUSTED_SYSTEM_LIBM = 1 +UNTRUSTED_SYSTEM_LIBM := 1 +endif + +# Threads +ifeq ($(JULIA_THREADS), 1) +JCPPFLAGS += -DJULIA_ENABLE_THREADING endif # Intel VTune Amplifier @@ -768,41 +877,46 @@ ifeq ($(USE_INTEL_JITEVENTS), 1) JCPPFLAGS += -DJL_USE_INTEL_JITEVENTS endif +# OProfile +ifeq ($(USE_OPROFILE_JITEVENTS), 1) +JCPPFLAGS += -DJL_USE_OPROFILE_JITEVENTS +endif + # Intel libraries ifeq ($(USE_INTEL_LIBM), 1) -USE_SYSTEM_LIBM = 1 -LIBM = -L$(MKLROOT)/../compiler/lib/intel64 -limf -LIBMNAME = libimf +USE_SYSTEM_LIBM := 1 +LIBM := -L$(MKLROOT)/../compiler/lib/intel64 -limf +LIBMNAME := libimf endif ifeq ($(USE_INTEL_MKL), 1) ifeq ($(USE_BLAS64), 1) export MKL_INTERFACE_LAYER := ILP64 -MKLLIB = $(MKLROOT)/lib/intel64 +MKLLIB := $(MKLROOT)/lib/intel64 else -MKLLIB = $(MKLROOT)/lib/ia32 +MKLLIB := $(MKLROOT)/lib/ia32 endif -USE_SYSTEM_BLAS=1 -USE_SYSTEM_LAPACK=1 -LIBBLASNAME = libmkl_rt -LIBLAPACKNAME = libmkl_rt -MKL_LDFLAGS = -L$(MKLLIB) -lmkl_rt +USE_SYSTEM_BLAS:=1 +USE_SYSTEM_LAPACK:=1 +LIBBLASNAME := libmkl_rt +LIBLAPACKNAME := libmkl_rt +MKL_LDFLAGS := -L$(MKLLIB) -lmkl_rt ifneq ($(strip $(MKLLIB)),) ifeq ($(OS), Linux) - RPATH_MKL = -Wl,-rpath,$(MKLLIB) + RPATH_MKL := -Wl,-rpath,$(MKLLIB) RPATH += $(RPATH_MKL) MKL_LDFLAGS += $(RPATH_MKL) endif endif -LIBBLAS = $(MKL_LDFLAGS) -LIBLAPACK = $(MKL_LDFLAGS) +LIBBLAS := $(MKL_LDFLAGS) +LIBLAPACK := $(MKL_LDFLAGS) endif ifeq ($(USE_INTEL_MKL_FFT), 1) -USE_SYSTEM_FFTW = 1 -LIBFFTWNAME = libmkl_rt -LIBFFTWFNAME = libmkl_rt +USE_SYSTEM_FFTW := 1 +LIBFFTWNAME := libmkl_rt +LIBFFTWFNAME := libmkl_rt endif ifeq ($(HAVE_SSP),1) @@ -817,33 +931,38 @@ endif # ATLAS must have been previously built with "make -C deps compile-atlas" (without -jN), # or installed to usr/lib/libatlas from some another source (built as # a shared library, for your platform, single threaded) -USE_ATLAS = 0 -ATLAS_LIBDIR = $(build_libdir) -#or ATLAS_LIBDIR = /path/to/system/atlas/lib +USE_ATLAS := 0 +ATLAS_LIBDIR := $(build_libdir) +#or ATLAS_LIBDIR := /path/to/system/atlas/lib ifeq ($(USE_ATLAS), 1) -USE_BLAS64 = 0 -USE_SYSTEM_BLAS = 1 -USE_SYSTEM_LAPACK = 1 -LIBBLAS = -L$(ATLAS_LIBDIR) -lsatlas -LIBLAPACK = $(LIBBLAS) -LIBBLASNAME = libsatlas -LIBLAPACKNAME = $(LIBBLASNAME) +USE_BLAS64 := 0 +USE_SYSTEM_BLAS := 1 +USE_SYSTEM_LAPACK := 1 +LIBBLAS := -L$(ATLAS_LIBDIR) -lsatlas +LIBLAPACK := $(LIBBLAS) +LIBBLASNAME := libsatlas +LIBLAPACKNAME := $(LIBBLASNAME) endif # Renaming OpenBLAS symbols, see #4923 and #8734 ifeq ($(USE_SYSTEM_BLAS), 0) ifeq ($(USE_BLAS64), 1) -OPENBLAS_SYMBOLSUFFIX = 64_ +OPENBLAS_SYMBOLSUFFIX := 64_ +OPENBLAS_LIBNAMESUFFIX := 64_ +LIBBLAS := -L$(build_shlibdir) -lopenblas$(OPENBLAS_LIBNAMESUFFIX) +LIBLAPACK := $(LIBBLAS) +LIBBLASNAME := $(LIBBLASNAME)$(OPENBLAS_LIBNAMESUFFIX) +LIBLAPACKNAME := $(LIBBLASNAME) endif endif # Custom libcxx ifeq ($(BUILD_CUSTOM_LIBCXX),1) -LDFLAGS += -L$(build_libdir) -lc++abi +LDFLAGS += -L$(build_libdir) CXXLDFLAGS += -L$(build_libdir) -lc++abi -stdlib=libc++ -lc++ CPPFLAGS += -I$(build_includedir)/c++/v1 -CUSTOM_LD_LIBRARY_PATH = LD_LIBRARY_PATH="$(build_libdir)" +CUSTOM_LD_LIBRARY_PATH := LD_LIBRARY_PATH="$(build_libdir)" ifeq ($(USEICC),1) CXXFLAGS += -cxxlib-nostd -static-intel CLDFLAGS += -static-intel @@ -886,6 +1005,7 @@ else endif endef +# many of the following targets must be = not := because the expansion of the makefile functions (and $1) shouldn't happen until later ifeq ($(BUILD_OS), WINNT) # MSYS spawn = $(1) cygpath_w = $(1) @@ -904,47 +1024,42 @@ endif exec = $(shell $(call spawn,$(1))) -ifneq (,$(findstring CYGWIN,$(BUILD_OS))) -wine_pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))) -else -wine_pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(shell printf %s\n '$(2)' | xargs -d";" winepath -u | tr '\n' ' ')))) -endif pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))) -JULIA_BUILD_MODE = release -JULIA_LIBSUFFIX= +JULIA_BUILD_MODE := release +JULIA_LIBSUFFIX:= ifeq (,$(findstring release,$(MAKECMDGOALS))) ifneq (,$(findstring debug,$(MAKECMDGOALS))) -JULIA_BUILD_MODE = debug -JULIA_LIBSUFFIX=-debug +JULIA_BUILD_MODE := debug +JULIA_LIBSUFFIX:=-debug endif endif -JULIA_EXECUTABLE_debug = $(build_bindir)/julia-debug$(EXE) -JULIA_EXECUTABLE_release = $(build_bindir)/julia$(EXE) -JULIA_EXECUTABLE = $(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE)) +JULIA_EXECUTABLE_debug := $(build_bindir)/julia-debug$(EXE) +JULIA_EXECUTABLE_release := $(build_bindir)/julia$(EXE) +JULIA_EXECUTABLE := $(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE)) # Colors for make ifndef VERBOSE -VERBOSE = 0 +VERBOSE := 0 endif -WARNCOLOR="\033[33;1m" +WARNCOLOR:="\033[33;1m" +ENDCOLOR:="\033[0m" ifeq ($(VERBOSE), 0) QUIET_MAKE = -s -CCCOLOR="\033[34m" -LINKCOLOR="\033[34;1m" -PERLCOLOR="\033[35m" -FLISPCOLOR="\033[32m" -JULIACOLOR="\033[32;1m" +CCCOLOR:="\033[34m" +LINKCOLOR:="\033[34;1m" +PERLCOLOR:="\033[35m" +FLISPCOLOR:="\033[32m" +JULIACOLOR:="\033[32;1m" -SRCCOLOR="\033[33m" -BINCOLOR="\033[37;1m" -JULCOLOR="\033[34;1m" -ENDCOLOR="\033[0m" +SRCCOLOR:="\033[33m" +BINCOLOR:="\033[37;1m" +JULCOLOR:="\033[34;1m" GOAL=$(subst ','\'',$(subst $(abspath $(JULIAHOME))/,,$(abspath $@))) @@ -963,3 +1078,8 @@ PRINT_FLISP = echo '$(subst ','\'',$(1))'; $(1) PRINT_JULIA = echo '$(subst ','\'',$(1))'; $(1) endif + +# Makefile debugging trick: +# call print-VARIABLE to see the runtime value of any variable +print-%: + @echo '$*=$($*)' diff --git a/Make.powerpc b/Make.powerpc index 15b2167ef6fc9..d456036a6e4ec 100644 --- a/Make.powerpc +++ b/Make.powerpc @@ -24,8 +24,6 @@ ifeq ($(USE_SYSTEM_LLVM),1) LLVM_CONFIG=llvm-config-3.5 else LLVM_ASSERTIONS=1 -LLVM_VER=3.6.0 -LLVM_ASSERTIONS=1 endif # On a newly allocated machine, you'll need the following dependencies: diff --git a/Makefile b/Makefile index 5d8ba3a7f3b3f..1ff6f833e6350 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -JULIAHOME = $(abspath .) +JULIAHOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) include $(JULIAHOME)/Make.inc # TODO: Code bundled with Julia should be installed into a versioned directory, @@ -8,25 +8,55 @@ include $(JULIAHOME)/Make.inc # prefix/share/julia/site/VERSDIR (not prefix/share/julia/VERSDIR/site ... # so that prefix/share/julia/VERSDIR can be overwritten without touching # third-party code). -VERSDIR = v`cut -d. -f1-2 < VERSION` +VERSDIR := v`cut -d. -f1-2 < $(JULIAHOME)/VERSION` #file name of make binary-dist result ifeq ($(JULIA_BINARYDIST_TARNAME),) - JULIA_BINARYDIST_TARNAME = julia-$(JULIA_COMMIT)-$(OS)-$(ARCH) + JULIA_BINARYDIST_TARNAME := julia-$(JULIA_COMMIT)-$(OS)-$(ARCH) endif default: $(JULIA_BUILD_MODE) # contains either "debug" or "release" all: debug release # sort is used to remove potential duplicates -DIRS = $(sort $(build_bindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_man1dir)) +DIRS := $(sort $(build_bindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_man1dir)) +ifneq ($(BUILDROOT),$(JULIAHOME)) +BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps test test/perf) +BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS)) +DIRS := $(DIRS) $(BUILDDIRS) +$(BUILDDIRMAKE): | $(BUILDDIRS) + @# add Makefiles to the build directories for convenience (pointing back to the source location of each) + @echo '# -- This file is automatically generated in julia/Makefile -- #' > $@ + @echo 'BUILDROOT=$(BUILDROOT)' >> $@ + @echo 'include $(JULIAHOME)$(patsubst $(BUILDROOT)%,%,$@)' >> $@ +julia-deps: | $(BUILDDIRMAKE) +configure-y: | $(BUILDDIRMAKE) +configure: +ifeq ("$(origin O)", "command line") + @if [ "$$(ls '$(BUILDROOT)' 2> /dev/null)" ]; then \ + echo 'WARNING: configure called on non-empty directory $(BUILDROOT)'; \ + read -p "Proceed [y/n]? " answer; \ + else \ + answer=y;\ + fi; \ + [ $$answer = 'y' ] && $(MAKE) configure-$$answer +else + $(error "cannot rerun configure from within a build directory") +endif +else +configure: + $(error "must specify O=builddir to run the Julia `make configure` target") +endif $(foreach dir,$(DIRS),$(eval $(call dir_target,$(dir)))) $(foreach link,base test,$(eval $(call symlink_target,$(link),$(build_datarootdir)/julia))) +julia_flisp.boot.inc.phony: julia-deps + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src julia_flisp.boot.inc.phony + # Build the HTML docs (skipped if already exists, notably in tarballs) -doc/_build/html: - @$(MAKE) -C doc html +$(BUILDROOT)/doc/_build/html: + @$(MAKE) -C $(BUILDROOT)/doc html # doc needs to live under $(build_docdir), not under $(build_datarootdir)/julia/ CLEAN_TARGETS += clean-docdir @@ -43,62 +73,68 @@ $(build_prefix)/.examples: $(wildcard $(JULIAHOME)/examples/*.jl) $(shell find $ julia-symlink: julia-ui-$(JULIA_BUILD_MODE) ifneq ($(OS),WINNT) ifndef JULIA_VAGRANT_BUILD - @ln -sf "$(shell contrib/relative_path.sh "$(JULIAHOME)" "$(JULIA_EXECUTABLE)")" julia + @ln -sf "$(shell $(JULIAHOME)/contrib/relative_path.sh "$(BUILDROOT)" "$(JULIA_EXECUTABLE)")" $(BUILDROOT)/julia endif endif julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test - @$(MAKE) $(QUIET_MAKE) -C deps + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/deps julia-base: julia-deps $(build_sysconfdir)/julia/juliarc.jl $(build_man1dir)/julia.1 - @$(MAKE) $(QUIET_MAKE) -C base + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/base -julia-libccalltest: - @$(MAKE) $(QUIET_MAKE) -C test libccalltest +julia-libccalltest: julia-deps + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src libccalltest -julia-src-release julia-src-debug : julia-src-% : julia-deps - @$(MAKE) $(QUIET_MAKE) -C src libjulia-$* +julia-src-release julia-src-debug : julia-src-% : julia-deps julia_flisp.boot.inc.phony + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src libjulia-$* julia-ui-release julia-ui-debug : julia-ui-% : julia-src-% - @$(MAKE) $(QUIET_MAKE) -C ui julia-$* + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/ui julia-$* julia-inference : julia-base julia-ui-$(JULIA_BUILD_MODE) $(build_prefix)/.examples - @$(MAKE) $(QUIET_MAKE) $(build_private_libdir)/inference.ji JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/inference.ji JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) julia-sysimg-release : julia-inference julia-ui-release - @$(MAKE) $(QUIET_MAKE) $(build_private_libdir)/sys.$(SHLIB_EXT) JULIA_BUILD_MODE=release + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.$(SHLIB_EXT) JULIA_BUILD_MODE=release julia-sysimg-debug : julia-inference julia-ui-debug - @$(MAKE) $(QUIET_MAKE) $(build_private_libdir)/sys-debug.$(SHLIB_EXT) JULIA_BUILD_MODE=debug + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys-debug.$(SHLIB_EXT) JULIA_BUILD_MODE=debug julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink julia-libccalltest debug release : % : julia-% +julia-genstdlib: julia-sysimg-$(JULIA_BUILD_MODE) + @$(call PRINT_JULIA, $(JULIA_EXECUTABLE) $(call cygpath_w, $(JULIAHOME)/doc/genstdlib.jl)) + +docs: julia-genstdlib + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/doc + check-whitespace: ifneq ($(NO_GIT), 1) - @contrib/check-whitespace.sh + @$(JULIAHOME)/contrib/check-whitespace.sh else $(warn "Skipping whitespace check because git is unavailable") endif release-candidate: release testall - @$(JULIA_EXECUTABLE) contrib/add_license_to_files.jl #add license headers - @$(JULIA_EXECUTABLE) doc/genstdlib.jl + @$(JULIA_EXECUTABLE) $(JULIAHOME)/contrib/add_license_to_files.jl #add license headers + @$(JULIA_EXECUTABLE) $(JULIAHOME)/doc/genstdlib.jl @#Check documentation - @$(JULIA_EXECUTABLE) doc/NEWS-update.jl #Add missing cross-references to NEWS.md - @$(MAKE) -C doc unicode #Rebuild Unicode table if necessary - @$(JULIA_EXECUTABLE) doc/DocCheck.jl > doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items - @if [ -z "$(cat doc/UNDOCUMENTED.rst)" ]; then \ - rm doc/UNDOCUMENTED.rst; \ + @$(JULIA_EXECUTABLE) $(JULIAHOME)/doc/NEWS-update.jl #Add missing cross-references to NEWS.md + @$(MAKE) -C $(BUILDROOT)/doc unicode #Rebuild Unicode table if necessary + @$(JULIA_EXECUTABLE) $(JULIAHOME)/doc/DocCheck.jl > $(BUILDROOT)/doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items + @if [ -z "$(cat $(BUILDROOT)/doc/UNDOCUMENTED.rst)" ]; then \ + rm $(BUILDROOT)/doc/UNDOCUMENTED.rst; \ else \ echo "Undocumented functions found in doc/UNDOCUMENTED.rst; document them, then retry"; \ exit 1; \ fi - @$(MAKE) -C doc html SPHINXOPTS="-n" #Rebuild Julia HTML docs pedantically - @$(MAKE) -C doc latex SPHINXOPTS="-n" #Rebuild Julia PDF docs pedantically - @$(MAKE) -C doc doctest #Run Julia doctests - @$(MAKE) -C doc linkcheck #Check all links + @$(MAKE) -C $(BUILDROOT)/doc html SPHINXOPTS="-n" #Rebuild Julia HTML docs pedantically + @$(MAKE) -C $(BUILDROOT)/doc latex SPHINXOPTS="-n" #Rebuild Julia PDF docs pedantically + @$(MAKE) -C $(BUILDROOT)/doc doctest #Run Julia doctests + @$(MAKE) -C $(BUILDROOT)/doc linkcheck #Check all links @# Check to see if the above make invocations changed anything important @if [ -n "$$(git status --porcelain)" ]; then \ @@ -107,7 +143,7 @@ release-candidate: release testall fi @#Check that benchmarks work - @$(MAKE) -C test/perf + @$(MAKE) -C $(BUILDROOT)/test/perf @#Check that netload tests work @#for test in test/netload/*.jl; do julia $$test; if [ $$? -ne 0 ]; then exit 1; fi; done @echo @@ -115,15 +151,16 @@ release-candidate: release testall @echo @echo 1. Remove deprecations in base/deprecated.jl - @echo 2. Bump VERSION - @echo 3. Create tag, push to github "\(git tag v\`cat VERSION\` && git push --tags\)" #"` # These comments deal with incompetent syntax highlighting rules - @echo 4. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"` - @echo 5. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist - @echo 6. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms - @echo 7. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links - @echo 8. Update checksums on AWS for tarball and packaged binaries - @echo 9. Announce on mailing lists - @echo 10. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20 + @echo 2. Update references to the julia version in the source directories, such as in README.md + @echo 3. Bump VERSION + @echo 4. Create tag, push to github "\(git tag v\`cat VERSION\` && git push --tags\)" #"` # These comments deal with incompetent syntax highlighting rules + @echo 5. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"` + @echo 6. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist + @echo 7. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms + @echo 8. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links + @echo 9. Update checksums on AWS for tarball and packaged binaries + @echo 10. Announce on mailing lists + @echo 11. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20 @echo $(build_man1dir)/julia.1: $(JULIAHOME)/doc/man/julia.1 | $(build_man1dir) @@ -135,8 +172,8 @@ $(build_sysconfdir)/julia/juliarc.jl: $(JULIAHOME)/etc/juliarc.jl | $(build_sysc @echo Creating usr/etc/julia/juliarc.jl @cp $< $@ ifeq ($(OS), WINNT) - @cat ./contrib/windows/juliarc.jl >> $(build_sysconfdir)/julia/juliarc.jl -$(build_sysconfdir)/julia/juliarc.jl: contrib/windows/juliarc.jl + @cat $(JULIAHOME)/contrib/windows/juliarc.jl >> $(build_sysconfdir)/julia/juliarc.jl +$(build_sysconfdir)/julia/juliarc.jl: $(JULIAHOME)/contrib/windows/juliarc.jl endif $(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%.o @@ -146,13 +183,15 @@ $(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%.o @$(INSTALL_NAME_CMD)$(notdir $@) $@ @$(DSYMUTIL) $@ -CORE_SRCS := base/boot.jl base/coreimg.jl \ +CORE_SRCS := $(addprefix $(JULIAHOME)/, \ + base/boot.jl base/coreimg.jl \ base/abstractarray.jl \ base/array.jl \ base/bool.jl \ base/dict.jl \ base/error.jl \ base/essentials.jl \ + base/generator.jl \ base/expr.jl \ base/functors.jl \ base/hashing.jl \ @@ -169,43 +208,49 @@ CORE_SRCS := base/boot.jl base/coreimg.jl \ base/range.jl \ base/reduce.jl \ base/reflection.jl \ - base/tuple.jl -BASE_SRCS := $(wildcard base/*.jl base/*/*.jl base/*/*/*.jl) + base/tuple.jl) +BASE_SRCS := $(shell find $(JULIAHOME)/base -name \*.jl) $(build_private_libdir)/inference0.ji: $(CORE_SRCS) | $(build_private_libdir) - @$(call PRINT_JULIA, cd base && \ + @$(call PRINT_JULIA, cd $(JULIAHOME)/base && \ $(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --output-ji $(call cygpath_w,$@) -f \ coreimg.jl) $(build_private_libdir)/inference.ji: $(build_private_libdir)/inference0.ji - @$(call PRINT_JULIA, cd base && \ + @$(call PRINT_JULIA, cd $(JULIAHOME)/base && \ $(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --output-ji $(call cygpath_w,$@) -f \ -J $(call cygpath_w,$<) coreimg.jl) +RELBUILDROOT := $(shell $(JULIAHOME)/contrib/relative_path.sh "$(JULIAHOME)/base" "$(BUILDROOT)/base/") COMMA:=, define sysimg_builder -$$(build_private_libdir)/sys$1.o: $$(build_private_libdir)/inference.ji VERSION $$(BASE_SRCS) - @$$(call PRINT_JULIA, cd base && \ +$$(build_private_libdir)/sys$1.o: $$(build_private_libdir)/inference.ji $$(JULIAHOME)/VERSION $$(BASE_SRCS) + @$$(call PRINT_JULIA, cd $$(JULIAHOME)/base && \ $$(call spawn,$2) -C $$(JULIA_CPU_TARGET) --output-o $$(call cygpath_w,$$@) $$(JULIA_SYSIMG_BUILD_FLAGS) -f \ - -J $$(call cygpath_w,$$<) sysimg.jl \ + -J $$(call cygpath_w,$$<) sysimg.jl $$(RELBUILDROOT) \ || { echo '*** This error is usually fixed by running `make clean`. If the error persists$$(COMMA) try `make cleanall`. ***' && false; } ) .SECONDARY: $(build_private_libdir)/sys$1.o endef $(eval $(call sysimg_builder,,$(JULIA_EXECUTABLE_release))) $(eval $(call sysimg_builder,-debug,$(JULIA_EXECUTABLE_debug))) -$(build_bindir)/stringreplace: contrib/stringreplace.c | $(build_bindir) - @$(call PRINT_CC, $(HOSTCC) -o $(build_bindir)/stringreplace contrib/stringreplace.c) +$(build_bindir)/stringreplace: $(JULIAHOME)/contrib/stringreplace.c | $(build_bindir) + @$(call PRINT_CC, $(HOSTCC) -o $(build_bindir)/stringreplace $(JULIAHOME)/contrib/stringreplace.c) # public libraries, that are installed in $(prefix)/lib -JL_LIBS = julia julia-debug +JL_LIBS := julia julia-debug # private libraries, that are installed in $(prefix)/lib/julia -JL_PRIVATE_LIBS = suitesparse_wrapper Rmath +JL_PRIVATE_LIBS := ccalltest +ifeq ($(USE_GPL_LIBS), 1) +JL_PRIVATE_LIBS += suitesparse_wrapper Rmath-julia +endif ifeq ($(USE_SYSTEM_FFTW),0) +ifeq ($(USE_GPL_LIBS), 1) JL_PRIVATE_LIBS += fftw3 fftw3f fftw3_threads fftw3f_threads endif +endif ifeq ($(USE_SYSTEM_PCRE),0) JL_PRIVATE_LIBS += pcre endif @@ -238,8 +283,10 @@ ifeq ($(USE_SYSTEM_ARPACK),0) JL_PRIVATE_LIBS += arpack endif ifeq ($(USE_SYSTEM_SUITESPARSE),0) +ifeq ($(USE_GPL_LIBS), 1) JL_PRIVATE_LIBS += amd camd ccolamd cholmod colamd umfpack spqr suitesparseconfig endif +endif ifeq ($(USE_SYSTEM_LLVM),0) ifeq ($(USE_LLVM_SHLIB),1) JL_PRIVATE_LIBS += LLVM @@ -257,11 +304,7 @@ ifeq ($(OS),WINNT) define std_dll julia-deps: | $$(build_bindir)/lib$(1).dll $$(build_bindir)/lib$(1).dll: | $$(build_bindir) -ifeq ($$(BUILD_OS),$$(OS)) - cp $$(call pathsearch,lib$(1).dll,$$(PATH)) $$(build_bindir) ; -else - cp $$(call wine_pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_bindir) ; -endif + cp $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_bindir) ; JL_LIBS += $(1) endef $(eval $(call std_dll,gfortran-3)) @@ -278,7 +321,7 @@ define stringreplace $(build_bindir)/stringreplace $$(strings -t x - $1 | grep '$2' | awk '{print $$1;}') '$3' 255 "$(call cygpath_w,$1)" endef -install: $(build_bindir)/stringreplace doc/_build/html +install: $(build_bindir)/stringreplace $(BUILDROOT)/doc/_build/html @$(MAKE) $(QUIET_MAKE) all @for subdir in $(bindir) $(libexecdir) $(datarootdir)/julia/site/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \ mkdir -p $(DESTDIR)$$subdir; \ @@ -325,22 +368,20 @@ ifeq ($(OS),WINNT) endif $(INSTALL_F) $(build_includedir)/uv* $(DESTDIR)$(includedir)/julia endif - $(INSTALL_F) src/julia.h src/julia_version.h src/options.h src/support/*.h $(DESTDIR)$(includedir)/julia + $(INSTALL_F) $(addprefix $(JULIAHOME)/,src/julia.h src/julia_threads.h src/julia_version.h src/support/*.h) $(DESTDIR)$(includedir)/julia # Copy system image -$(INSTALL_F) $(build_private_libdir)/sys.ji $(DESTDIR)$(private_libdir) $(INSTALL_M) $(build_private_libdir)/sys.$(SHLIB_EXT) $(DESTDIR)$(private_libdir) $(INSTALL_M) $(build_private_libdir)/sys-debug.$(SHLIB_EXT) $(DESTDIR)$(private_libdir) # Copy in system image build script - $(INSTALL_M) contrib/build_sysimg.jl $(DESTDIR)$(datarootdir)/julia/ - # Copy in standalone executable build script - $(INSTALL_M) contrib/build_executable.jl $(DESTDIR)$(datarootdir)/julia/ + $(INSTALL_M) $(JULIAHOME)/contrib/build_sysimg.jl $(DESTDIR)$(datarootdir)/julia/ # Copy in standalone julia-config script - $(INSTALL_M) contrib/julia-config.jl $(DESTDIR)$(datarootdir)/julia/ + $(INSTALL_M) $(JULIAHOME)/contrib/julia-config.jl $(DESTDIR)$(datarootdir)/julia/ # Copy in all .jl sources as well cp -R -L $(build_datarootdir)/julia $(DESTDIR)$(datarootdir)/ # Copy documentation cp -R -L $(build_docdir)/* $(DESTDIR)$(docdir)/ - cp -R -L doc/_build/html $(DESTDIR)$(docdir)/ + cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/ -rm $(DESTDIR)$(docdir)/html/.buildinfo # Remove perf suite -rm -rf $(DESTDIR)$(datarootdir)/julia/test/perf/ @@ -351,14 +392,14 @@ endif $(INSTALL_F) $(build_man1dir)/julia.1 $(DESTDIR)$(man1dir)/ # Copy icon and .desktop file mkdir -p $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ - $(INSTALL_F) contrib/julia.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ + $(INSTALL_F) $(JULIAHOME)/contrib/julia.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ -touch -c $(DESTDIR)$(datarootdir)/icons/hicolor/ -gtk-update-icon-cache $(DESTDIR)$(datarootdir)/icons/hicolor/ mkdir -p $(DESTDIR)$(datarootdir)/applications/ - $(INSTALL_F) contrib/julia.desktop $(DESTDIR)$(datarootdir)/applications/ + $(INSTALL_F) $(JULIAHOME)/contrib/julia.desktop $(DESTDIR)$(datarootdir)/applications/ # Install appdata file mkdir -p $(DESTDIR)$(datarootdir)/appdata/ - $(INSTALL_F) contrib/julia.appdata.xml $(DESTDIR)$(datarootdir)/appdata/ + $(INSTALL_F) $(JULIAHOME)/contrib/julia.appdata.xml $(DESTDIR)$(datarootdir)/appdata/ # Update RPATH entries and JL_SYSTEM_IMAGE_PATH if $(private_libdir_rel) != $(build_private_libdir_rel) ifneq ($(private_libdir_rel),$(build_private_libdir_rel)) @@ -382,11 +423,17 @@ endif cp -R $(build_sysconfdir)/julia $(DESTDIR)$(sysconfdir)/ distclean dist-clean: - rm -fr julia-*.tar.gz julia*.exe julia-*.7z julia-$(JULIA_COMMIT) + -rm -fr $(BUILDROOT)/julia-*.tar.gz $(BUILDROOT)/julia*.exe $(BUILDROOT)/julia-*.7z $(BUILDROOT)/julia-$(JULIA_COMMIT) dist: @echo \'dist\' target is deprecated: use \'binary-dist\' instead. +ifeq ($(ARCH),x86_64) +GITCONFIG := $(BUILDROOT)/julia-$(JULIA_COMMIT)/Git/mingw64/etc/gitconfig +else +GITCONFIG := $(BUILDROOT)/julia-$(JULIA_COMMIT)/Git/mingw32/etc/gitconfig +endif + binary-dist: distclean ifeq ($(USE_SYSTEM_BLAS),0) ifeq ($(ISX86),1) @@ -402,50 +449,53 @@ endif ifneq ($(DESTDIR),) $(error DESTDIR must not be set for make binary-dist) endif - @$(MAKE) install - cp LICENSE.md $(prefix) + @$(MAKE) -C $(BUILDROOT) -f $(JULIAHOME)/Makefile install + cp $(JULIAHOME)/LICENSE.md $(BUILDROOT)/julia-$(JULIA_COMMIT) ifneq ($(OS), WINNT) - -./contrib/fixup-libgfortran.sh $(DESTDIR)$(private_libdir) + -$(JULIAHOME)/contrib/fixup-libgfortran.sh $(DESTDIR)$(private_libdir) endif ifeq ($(OS), Linux) - -./contrib/fixup-libstdc++.sh $(DESTDIR)$(private_libdir) + -$(JULIAHOME)/contrib/fixup-libstdc++.sh $(DESTDIR)$(private_libdir) + # We need to bundle ca certs on linux now that we're using libgit2 with ssl +ifeq ($(shell [ -e $(shell openssl version -d | cut -d '"' -f 2)/cert.pem ] && echo exists),exists) + -cp $(shell openssl version -d | cut -d '"' -f 2)/cert.pem $(DESTDIR)$(datarootdir)/julia/ +endif endif # Copy in juliarc.jl files per-platform for binary distributions as well # Note that we don't install to sysconfdir: we always install to $(DESTDIR)$(prefix)/etc. # If you want to make a distribution with a hardcoded path, you take care of installation ifeq ($(OS), Darwin) - -cat ./contrib/mac/juliarc.jl >> $(DESTDIR)$(prefix)/etc/julia/juliarc.jl + -cat $(JULIAHOME)/contrib/mac/juliarc.jl >> $(DESTDIR)$(prefix)/etc/julia/juliarc.jl endif ifeq ($(OS), WINNT) - [ ! -d dist-extras ] || ( cd dist-extras && \ - cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(bindir) && \ - mkdir $(DESTDIR)$(prefix)/Git && \ - 7z x PortableGit.7z -o"$(DESTDIR)$(prefix)/Git" && \ - echo "[core] eol = lf" >> "$(DESTDIR)$(prefix)/Git/etc/gitconfig" && \ - sed -i "s/\bautocrlf = true$$/autocrlf = input/" "$(DESTDIR)$(prefix)/Git/etc/gitconfig" && \ - cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/echo.exe && \ - cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/printf.exe ) - cd $(DESTDIR)$(bindir) && rm -f llvm* llc.exe lli.exe opt.exe LTO.dll bugpoint.exe macho-dump.exe + [ ! -d $(JULIAHOME)/dist-extras ] || ( cd $(JULIAHOME)/dist-extras && \ + cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin && \ + mkdir $(BUILDROOT)/julia-$(JULIA_COMMIT)/Git && \ + 7z x PortableGit.7z -o"$(BUILDROOT)/julia-$(JULIA_COMMIT)/Git" && \ + echo "[core] eol = lf" >> "$(GITCONFIG)" && \ + sed -i "s/\bautocrlf = true$$/autocrlf = input/" "$(GITCONFIG)" ) + cd $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin && rm -f llvm* llc.exe lli.exe opt.exe LTO.dll bugpoint.exe macho-dump.exe # create file listing for uninstall. note: must have Windows path separators and line endings. - cd $(prefix) && find * | sed -e 's/\//\\/g' -e 's/$$/\r/g' > etc/uninstall.log + cd $(BUILDROOT)/julia-$(JULIA_COMMIT) && find * | sed -e 's/\//\\/g' -e 's/$$/\r/g' > etc/uninstall.log # build nsis package - $(call spawn,./dist-extras/nsis/makensis.exe) -NOCD -DVersion=$(JULIA_VERSION) -DArch=$(ARCH) -DCommit=$(JULIA_COMMIT) ./contrib/windows/build-installer.nsi + cd $(BUILDROOT) && $(call spawn,$(JULIAHOME)/dist-extras/nsis/makensis.exe) -NOCD -DVersion=$(JULIA_VERSION) -DArch=$(ARCH) -DCommit=$(JULIA_COMMIT) -DMUI_ICON="$(call cygpath_w,$(JULIAHOME)/contrib/windows/julia.ico)" $(call cygpath_w,$(JULIAHOME)/contrib/windows/build-installer.nsi) # compress nsis installer and combine with 7zip self-extracting header - ./dist-extras/7z a -mx9 "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" julia-installer.exe - cat ./contrib/windows/7zS.sfx ./contrib/windows/7zSFX-config.txt "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" > "julia-${JULIA_VERSION}-${ARCH}.exe" - -rm -f julia-installer.exe + cd $(BUILDROOT) && $(JULIAHOME)/dist-extras/7z a -mx9 "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" julia-installer.exe + cd $(BUILDROOT) && cat $(JULIAHOME)/contrib/windows/7zS.sfx $(JULIAHOME)/contrib/windows/7zSFX-config.txt "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" > "julia-${JULIA_VERSION}-${ARCH}.exe" + -rm -f $(BUILDROOT)/julia-installer.exe else - $(TAR) zcvf $(JULIA_BINARYDIST_TARNAME).tar.gz julia-$(JULIA_COMMIT) + cd $(BUILDROOT) && $(TAR) zcvf $(JULIA_BINARYDIST_TARNAME).tar.gz julia-$(JULIA_COMMIT) endif - rm -fr $(prefix) + rm -fr $(BUILDROOT)/julia-$(JULIA_COMMIT) -light-source-dist.tmp: doc/_build/html +# this target does not accept BUILDROOT +light-source-dist.tmp: $(JULIAHOME)/doc/_build/html # Save git information - -@$(MAKE) -C base version_git.jl.phony + -@$(MAKE) -C $(JULIAHOME)/base version_git.jl.phony # Create file light-source-dist.tmp to hold all the filenames that go into the tarball echo "base/version_git.jl" > light-source-dist.tmp @@ -453,6 +503,7 @@ light-source-dist.tmp: doc/_build/html find doc/_build/html >> light-source-dist.tmp # Make tarball with only Julia code +# this target does not accept BUILDROOT light-source-dist: light-source-dist.tmp # Prefix everything with the current directory name (usually "julia"), then create tarball DIRNAME=$$(basename $$(pwd)); \ @@ -463,13 +514,14 @@ source-dist: @echo \'source-dist\' target is deprecated: use \'full-source-dist\' instead. # Make tarball with Julia code plus all dependencies +# this target does not accept BUILDROOT full-source-dist: light-source-dist.tmp # Get all the dependencies downloaded @$(MAKE) -C deps getall NO_GIT=1 # Create file full-source-dist.tmp to hold all the filenames that go into the tarball cp light-source-dist.tmp full-source-dist.tmp - -ls deps/*.tar.gz deps/*.tar.bz2 deps/*.tar.xz deps/*.tgz deps/*.zip >> full-source-dist.tmp + -ls deps/srccache/*.tar.gz deps/srccache/*.tar.bz2 deps/srccache/*.tar.xz deps/srccache/*.tgz deps/srccache/*.zip >> full-source-dist.tmp # Prefix everything with the current directory name (usually "julia"), then create tarball DIRNAME=$$(basename $$(pwd)); \ @@ -477,31 +529,33 @@ full-source-dist: light-source-dist.tmp cd ../ && tar -cz -T $$DIRNAME/full-source-dist.tmp1 --no-recursion -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT)-full.tar.gz clean: | $(CLEAN_TARGETS) - @$(MAKE) -C base clean - @$(MAKE) -C doc clean - @$(MAKE) -C src clean - @$(MAKE) -C ui clean - @$(MAKE) -C test clean - @rm -f julia - @rm -f *~ *# *.tar.gz - @rm -f $(build_bindir)/stringreplace \ - light-source-dist.tmp light-source-dist.tmp1 \ - full-source-dist.tmp full-source-dist.tmp1 - @rm -fr $(build_private_libdir) - @rm -f $(build_prefix)/.examples + @-$(MAKE) -C $(BUILDROOT)/base clean + @-$(MAKE) -C $(BUILDROOT)/doc clean + @-$(MAKE) -C $(BUILDROOT)/src clean + @-$(MAKE) -C $(BUILDROOT)/ui clean + @-$(MAKE) -C $(BUILDROOT)/test clean + -rm -f $(BUILDROOT)/julia + -rm -f $(BUILDROOT)/*.tar.gz + -rm -f $(build_bindir)/stringreplace \ + $(BUILDROOT)/light-source-dist.tmp $(BUILDROOT)/light-source-dist.tmp1 \ + $(BUILDROOT)/full-source-dist.tmp $(BUILDROOT)/full-source-dist.tmp1 + -rm -fr $(build_private_libdir) +# Teporarily add this line to the Makefile to remove extras + -rm -fr $(build_datarootdir)/julia/extras + -rm -f $(build_prefix)/.examples cleanall: clean - @$(MAKE) -C src clean-flisp clean-support - @rm -fr $(build_shlibdir) + @-$(MAKE) -C $(BUILDROOT)/src clean-flisp clean-support + -rm -fr $(build_shlibdir) ifeq ($(OS),WINNT) - @rm -rf $(build_prefix)/lib + -rm -rf $(build_prefix)/lib endif - @$(MAKE) -C deps clean-libuv + @-$(MAKE) -C $(BUILDROOT)/deps clean-libuv distcleanall: cleanall - @$(MAKE) -C deps distcleanall - @$(MAKE) -C doc cleanall - rm -fr $(build_prefix) $(build_staging) + @-$(MAKE) -C $(BUILDROOT)/deps distcleanall + @-$(MAKE) -C $(BUILDROOT)/doc cleanall + -rm -fr $(build_prefix) $(build_staging) .PHONY: default debug release check-whitespace release-candidate \ julia-debug julia-release julia-deps \ @@ -513,59 +567,72 @@ distcleanall: cleanall dist full-source-dist source-dist test: check-whitespace $(JULIA_BUILD_MODE) - @$(MAKE) $(QUIET_MAKE) -C test default JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test default JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) testall: check-whitespace $(JULIA_BUILD_MODE) - cp $(build_prefix)/lib/julia/sys$(JULIA_LIBSUFFIX).$(SHLIB_EXT) local.$(SHLIB_EXT) && $(JULIA_EXECUTABLE) -J local.$(SHLIB_EXT) -e 'true' && rm local.$(SHLIB_EXT) - @$(MAKE) $(QUIET_MAKE) -C test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + cp $(build_private_libdir)/sys$(JULIA_LIBSUFFIX).$(SHLIB_EXT) $(BUILDROOT)/local.$(SHLIB_EXT) && $(JULIA_EXECUTABLE) -J $(call cygpath_w,$(BUILDROOT)/local.$(SHLIB_EXT)) -e 'true' && rm $(BUILDROOT)/local.$(SHLIB_EXT) + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) testall1: check-whitespace $(JULIA_BUILD_MODE) - @env JULIA_CPU_CORES=1 $(MAKE) $(QUIET_MAKE) -C test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + @env JULIA_CPU_CORES=1 $(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) test-%: check-whitespace $(JULIA_BUILD_MODE) - @$(MAKE) $(QUIET_MAKE) -C test $* JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test $* JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) perf: release - @$(MAKE) $(QUIET_MAKE) -C test/perf JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test/perf JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) perf-%: release - @$(MAKE) $(QUIET_MAKE) -C test/perf $* JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test/perf $* JULIA_BUILD_MODE=$(JULIA_BUILD_MODE) # download target for some hardcoded windows dependencies .PHONY: win-extras wine_path win-extras: - [ -d dist-extras ] || mkdir dist-extras + [ -d $(JULIAHOME)/dist-extras ] || mkdir $(JULIAHOME)/dist-extras ifneq ($(BUILD_OS),WINNT) ifeq (,$(findstring CYGWIN,$(BUILD_OS))) - cp /usr/lib/p7zip/7z /usr/lib/p7zip/7z.so dist-extras + cp /usr/lib/p7zip/7z /usr/lib/p7zip/7z.so $(JULIAHOME)/dist-extras endif endif ifneq (,$(filter $(ARCH), i386 i486 i586 i686)) - cd dist-extras && \ + cd $(JULIAHOME)/dist-extras && \ $(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920.exe && \ 7z x -y 7z920.exe 7z.exe 7z.dll && \ - ../contrib/windows/winrpm.sh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.1 \ - "mingw32-libgfortran3 mingw32-libquadmath0 mingw32-libstdc++6 mingw32-libgcc_s_sjlj1 mingw32-libssp0 mingw32-libexpat1 mingw32-zlib1" && \ - cp usr/i686-w64-mingw32/sys-root/mingw/bin/*.dll . + ../contrib/windows/winrpm.sh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.2 \ + "mingw32-libgfortran3 mingw32-libquadmath0 mingw32-libstdc++6 mingw32-libgcc_s_sjlj1 mingw32-libssp0 mingw32-libexpat1 mingw32-zlib1" && \ + cp usr/i686-w64-mingw32/sys-root/mingw/bin/*.dll . && \ + $(JLDOWNLOAD) PortableGit.7z https://github.com/git-for-windows/git/releases/download/v2.6.1.windows.1/PortableGit-2.6.1-32-bit.7z.exe else ifeq ($(ARCH),x86_64) - cd dist-extras && \ + cd $(JULIAHOME)/dist-extras && \ $(JLDOWNLOAD) 7z920-x64.msi http://downloads.sourceforge.net/sevenzip/7z920-x64.msi && \ 7z x -y 7z920-x64.msi _7z.exe _7z.dll && \ mv _7z.dll 7z.dll && \ mv _7z.exe 7z.exe && \ - ../contrib/windows/winrpm.sh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_13.1 \ - "mingw64-libgfortran3 mingw64-libquadmath0 mingw64-libstdc++6 mingw64-libgcc_s_seh1 mingw64-libssp0 mingw64-libexpat1 mingw64-zlib1" && \ - cp usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll . + ../contrib/windows/winrpm.sh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_13.2 \ + "mingw64-libgfortran3 mingw64-libquadmath0 mingw64-libstdc++6 mingw64-libgcc_s_seh1 mingw64-libssp0 mingw64-libexpat1 mingw64-zlib1" && \ + cp usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll . && \ + $(JLDOWNLOAD) PortableGit.7z https://github.com/git-for-windows/git/releases/download/v2.6.1.windows.1/PortableGit-2.6.1-64-bit.7z.exe else $(error no win-extras target for ARCH=$(ARCH)) endif - cd dist-extras && \ + cd $(JULIAHOME)/dist-extras && \ $(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920_extra.7z && \ $(JLDOWNLOAD) https://unsis.googlecode.com/files/nsis-2.46.5-Unicode-setup.exe && \ - $(JLDOWNLOAD) busybox.exe http://frippery.org/files/busybox/busybox-w32-FRP-1-g9eb16cb.exe && \ chmod a+x 7z.exe && \ chmod a+x 7z.dll && \ $(call spawn,./7z.exe) x -y -onsis nsis-2.46.5-Unicode-setup.exe && \ - chmod a+x ./nsis/makensis.exe && \ - chmod a+x busybox.exe && \ - $(JLDOWNLOAD) PortableGit.7z https://github.com/msysgit/msysgit/releases/download/Git-1.9.5-preview20141217/PortableGit-1.9.5-preview20141217.7z + chmod a+x ./nsis/makensis.exe + +# various statistics about the build that may interest the user +ifeq ($(USE_SYSTEM_LLVM), 1) +LLVM_SIZE := llvm-size$(EXE) +else +LLVM_SIZE := $(build_bindir)/llvm-size$(EXE) +endif +build-stats: + @echo $(JULCOLOR)' ==> ./julia binary sizes'$(ENDCOLOR) + $(call spawn,$(LLVM_SIZE) -A $(build_private_libdir)/sys.$(SHLIB_EXT) $(build_shlibdir)/libjulia.$(SHLIB_EXT) $(build_bindir)/julia$(EXE)) + @echo $(JULCOLOR)' ==> ./julia launch speedtest'$(ENDCOLOR) + @time $(call spawn,$(build_bindir)/julia$(EXE) -e '') + @time $(call spawn,$(build_bindir)/julia$(EXE) -e '') + @time $(call spawn,$(build_bindir)/julia$(EXE) -e '') diff --git a/NEWS.md b/NEWS.md index 135fda38422bd..50bef68b74857 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,135 @@ +Julia v0.5.0 Release Notes +========================== + +New language features +--------------------- + + * Generator expressions, e.g. `f(i) for i in 1:n` (#4470). This returns an iterator + that computes the specified values on demand. + + * Macro expander functions are now generic, so macros can have multiple definitions + (e.g. for different numbers of arguments, or optional arguments) ([#8846], [#9627]). + However note that the argument types refer to the syntax tree representation, and not + to the types of run time values. + + * `x ∈ X` is now a synonym for `x in X` in `for` loops and comprehensions, + as it already was in comparisons ([#13824]). + +Language changes +---------------- + + * Each function and closure now has its own type. The captured variables of a closure + are fields of its type. `Function` is now an abstract type, and is the default supertype + of functions and closures. All functions, including anonymous functions, + are generic and support all features (e.g. keyword arguments). + Instead of adding methods to `call`, methods are added by type using the syntax + `(::ftype)(...) = ...`. `call` is deprecated ([#13412]). + + * `using` and `import` are now case-sensitive even on case-insensitive filesystems (common on Mac and Windows) ([#13542]). + + * Relational symbols are now allowed as infix operators ([#8036]). + + * A warning is always given when a method is overwritten (previously, this was done only when the new + and old definitions were in separate modules) ([#14759]). + +Command-line option changes +--------------------------- + +Compiler/Runtime improvements +----------------------------- + +Library improvements +-------------------- + + * Most of the combinatorics functions have been moved from `Base` + to the [Combinatorics.jl package](https://github.com/JuliaLang/Combinatorics.jl) ([#13897]). + + * Packages: + + * The package system (`Pkg`) is now based on the `libgit2` library, rather + than running the `git` program, increasing performance (especially on + Windows) ([#11196]). + + * Package-development functions like `Pkg.tag` and `Pkg.publish` + have been moved to an external [PkgDev] package ([#13387]). + + * The `Base.Test` module now has a `@testset` feature to bundle + tests together and delay throwing an error until the end ([#13062]). + + * The new features are mirrored in the + [BaseTestNext](https://github.com/IainNZ/BaseTestNext.jl) + package for users who would like to use the new functionality on Julia v0.4. + + * The [BaseTestDeprecated](https://github.com/IainNZ/BaseTestDeprecated.jl) + package provides the old-style `handler` functionality, for compatibility + with code that needs to support both Julia v0.4 and v0.5. + + * The functions `remotecall`, `remotecall_fetch`, and `remotecall_wait` now have the + function argument as the first argument to allow for do-block syntax ([#13338]). + + * `cov` and `cor` don't use keyword arguments anymore and are therefore now type stable ([#13465]). + + * Linear algebra: + + * All dimensions indexed by scalars are now dropped, whereas previously only + trailing scalar dimensions would be omitted from the result. + + * New `normalize` and `normalize!` convenience functions for normalizing + vectors ([#13681]). + + * QR + + * New method for generic QR with column pivoting ([#13480]). + + * New method for polar decompositions of `AbstractVector`s ([#13681]). + + * A new `SparseVector` type allows for one-dimensional sparse arrays. + Slicing and reshaping sparse matrices now return vectors when + appropriate. The `sparsevec` function returns a one-dimensional sparse + vector instead of a one-column sparse matrix. ([#13440]) + + * Rank one update and downdate functions, `lowrankupdate`, `lowrankupdate!`, `lowrankdowndate`, + and `lowrankdowndate!`, for dense Cholesky factorizations ([#14243],[#14424]) + + * All `sparse` methods now retain provided numerical zeros as structural nonzeros; to + drop numerical zeros, use `dropzeros!` ([#14798],[#15242]). + + * New `foreach` function for calling a function on every element of a collection when + the results are not needed. + + * `Cmd(cmd; ...)` now accepts new Windows-specific options `windows_verbatim` + (to alter Windows command-line generation) and `windows_hide` (to + suppress creation of new console windows) ([#13780]). + + * Statistics: + + * Improve performance of `quantile` ([#14413]). + + * The new `Base.StackTraces` module makes stack traces easier to use programmatically. ([#14469]) + +Deprecated or removed +--------------------- + + * The following function names have been simplified and unified ([#13232]): + + * `get_bigfloat_precision` -> `precision(BigFloat)` + * `set_bigfloat_precision` -> `setprecision` + * `with_bigfloat_precision` -> `setprecision` + + * `get_rounding` -> `rounding` + * `set_rounding` -> `setrounding` + * `with_rounding` -> `setrounding` + + * The method `A_ldiv_B!(SparseMatrixCSC, StrideVecOrMat)` has been deprecated + in favor of versions that require the matrix to be in factored form + ([#13496]). + + * Deprecate `chol(A,Val{:U/:L})` in favor of `chol(A)` ([#13680]). + + * `issym` is deprecated in favor of `issymmetric` to match similar functions (`ishermitian`, ...) ([#15192]) + + * `scale` is deprecated in favor of either `α*A`, `Diagonal(x)*A`, or `A*Diagonal(x)`. ([#15258]) + Julia v0.4.0 Release Notes ========================== @@ -54,12 +186,14 @@ New language features * Support for inter-task communication using `Channels` ([#12264]). See http://docs.julialang.org/en/latest/manual/parallel-computing/#channels for details. - * RemoteRefs now point to remote channels. The remote channels can be of length greater than 1. + * `RemoteRef`s now point to remote channels. The remote channels can be of length greater than 1. Default continues to be of length 1 ([#12385]). See http://docs.julialang.org/en/latest/manual/parallel-computing/#remoterefs-and-abstractchannels for details. * `@__LINE__` special macro now available to reflect invocation source line number ([#12727]). + * `PROGRAM_FILE` global is now available for determining the name of the running script ([#14114]). + Language changes ---------------- @@ -278,6 +412,8 @@ Library improvements * Capture groups in regular expressions can now be named using PCRE syntax, `(?P...)`. Capture group matches can be accessed by name by indexing a `Match` object with the name of the group ([#11566]). + * `countlines()` now counts all lines, not just non-empty ([#11947]). + * Array and AbstractArray improvements * New multidimensional iterators and index types for efficient iteration over `AbstractArray`s. Array iteration should generally be written as `for i in eachindex(A) ... end` rather than `for i = 1:length(A) ... end` ([#8432]). @@ -388,7 +524,7 @@ Library improvements * Other improvements - * You can now tab-complete Emoji characters via their [short names](http://www.emoji-cheat-sheet.com/), using `\:name:` ([#10709]). + * You can now tab-complete emoji via their [short names](http://www.emoji-cheat-sheet.com/), using `\:name:` ([#10709]). * `gc_enable` subsumes `gc_disable`, and also returns the previous GC state. @@ -402,9 +538,9 @@ Library improvements * Added `recvfrom` to get source address of UDP packets ([#9418]). - * ClusterManager performance improvements ([#9309]) and support for changing transports([#9434]). + * `ClusterManager` performance improvements ([#9309]) and support for changing transports([#9434]). - * Added Base.get_process_title / Base.set_process_title ([#9957]). + * Added `Base.get_process_title` / `Base.set_process_title` ([#9957]). * `readavailable` now returns a byte vector instead of a string. @@ -448,7 +584,7 @@ Deprecated or removed end ``` - * indexing with Reals that are not subtypes of Integers (Rationals, AbstractFloat, etc.) has been deprecated ([#10458]). + * indexing with `Real`s that are not subtypes of `Integer` (`Rational`, `AbstractFloat`, etc.) has been deprecated ([#10458]). * `push!(A)` has been deprecated, use `append!` instead of splatting arguments to `push!` ([#10400]). @@ -461,7 +597,7 @@ Deprecated or removed * The `Graphics` module has been removed from `Base` and is now a standalone package ([#10150], [#9862]). - * The `Woodbury` special matrix type has been removed from LinAlg ([#10024]). + * The `Woodbury` special matrix type has been removed from `LinAlg` ([#10024]). * `median` and `median!` no longer accept a `checknan` keyword argument ([#8605]). @@ -910,7 +1046,7 @@ Deprecated or removed * The `Stat` type is renamed `StatStruct` ([#4670]). - * `set_rounding`, `get_rounding` and `with_rounding` now take an additional + * `setrounding`, `rounding` and `setrounding` now take an additional argument specifying the floating point type to which they apply. The old behaviour and `[get/set/with]_bigfloat_rounding` functions are deprecated ([#5007]). @@ -1260,6 +1396,7 @@ Too numerous to mention. [pairwise summation]: https://en.wikipedia.org/wiki/Pairwise_summation [a448e080]: https://github.com/JuliaLang/julia/commit/a448e080dc736c7fb326426dfcb2528be36973d3 [5e3f074b]: https://github.com/JuliaLang/julia/commit/5e3f074b9173044a0a4219f9b285879ff7cec041 +[PkgDev]: https://github.com/JuliaLang/PkgDev.jl [#13]: https://github.com/JuliaLang/julia/issues/13 [#69]: https://github.com/JuliaLang/julia/issues/69 @@ -1491,6 +1628,7 @@ Too numerous to mention. [#7917]: https://github.com/JuliaLang/julia/issues/7917 [#7992]: https://github.com/JuliaLang/julia/issues/7992 [#8011]: https://github.com/JuliaLang/julia/issues/8011 +[#8036]: https://github.com/JuliaLang/julia/issues/8036 [#8089]: https://github.com/JuliaLang/julia/issues/8089 [#8113]: https://github.com/JuliaLang/julia/issues/8113 [#8135]: https://github.com/JuliaLang/julia/issues/8135 @@ -1523,6 +1661,7 @@ Too numerous to mention. [#8827]: https://github.com/JuliaLang/julia/issues/8827 [#8832]: https://github.com/JuliaLang/julia/issues/8832 [#8845]: https://github.com/JuliaLang/julia/issues/8845 +[#8846]: https://github.com/JuliaLang/julia/issues/8846 [#8854]: https://github.com/JuliaLang/julia/issues/8854 [#8867]: https://github.com/JuliaLang/julia/issues/8867 [#8872]: https://github.com/JuliaLang/julia/issues/8872 @@ -1555,6 +1694,7 @@ Too numerous to mention. [#9575]: https://github.com/JuliaLang/julia/issues/9575 [#9578]: https://github.com/JuliaLang/julia/issues/9578 [#9597]: https://github.com/JuliaLang/julia/issues/9597 +[#9627]: https://github.com/JuliaLang/julia/issues/9627 [#9666]: https://github.com/JuliaLang/julia/issues/9666 [#9690]: https://github.com/JuliaLang/julia/issues/9690 [#9701]: https://github.com/JuliaLang/julia/issues/9701 @@ -1602,6 +1742,7 @@ Too numerous to mention. [#11105]: https://github.com/JuliaLang/julia/issues/11105 [#11145]: https://github.com/JuliaLang/julia/issues/11145 [#11171]: https://github.com/JuliaLang/julia/issues/11171 +[#11196]: https://github.com/JuliaLang/julia/issues/11196 [#11241]: https://github.com/JuliaLang/julia/issues/11241 [#11279]: https://github.com/JuliaLang/julia/issues/11279 [#11347]: https://github.com/JuliaLang/julia/issues/11347 @@ -1613,6 +1754,7 @@ Too numerous to mention. [#11849]: https://github.com/JuliaLang/julia/issues/11849 [#11891]: https://github.com/JuliaLang/julia/issues/11891 [#11922]: https://github.com/JuliaLang/julia/issues/11922 +[#11947]: https://github.com/JuliaLang/julia/issues/11947 [#11985]: https://github.com/JuliaLang/julia/issues/11985 [#12025]: https://github.com/JuliaLang/julia/issues/12025 [#12031]: https://github.com/JuliaLang/julia/issues/12031 @@ -1629,3 +1771,26 @@ Too numerous to mention. [#12576]: https://github.com/JuliaLang/julia/issues/12576 [#12727]: https://github.com/JuliaLang/julia/issues/12727 [#12739]: https://github.com/JuliaLang/julia/issues/12739 +[#13062]: https://github.com/JuliaLang/julia/issues/13062 +[#13232]: https://github.com/JuliaLang/julia/issues/13232 +[#13338]: https://github.com/JuliaLang/julia/issues/13338 +[#13387]: https://github.com/JuliaLang/julia/issues/13387 +[#13412]: https://github.com/JuliaLang/julia/issues/13412 +[#13440]: https://github.com/JuliaLang/julia/issues/13440 +[#13465]: https://github.com/JuliaLang/julia/issues/13465 +[#13480]: https://github.com/JuliaLang/julia/issues/13480 +[#13496]: https://github.com/JuliaLang/julia/issues/13496 +[#13542]: https://github.com/JuliaLang/julia/issues/13542 +[#13680]: https://github.com/JuliaLang/julia/issues/13680 +[#13681]: https://github.com/JuliaLang/julia/issues/13681 +[#13780]: https://github.com/JuliaLang/julia/issues/13780 +[#13824]: https://github.com/JuliaLang/julia/issues/13824 +[#13897]: https://github.com/JuliaLang/julia/issues/13897 +[#14114]: https://github.com/JuliaLang/julia/issues/14114 +[#14243]: https://github.com/JuliaLang/julia/issues/14243 +[#14413]: https://github.com/JuliaLang/julia/issues/14413 +[#14424]: https://github.com/JuliaLang/julia/issues/14424 +[#14469]: https://github.com/JuliaLang/julia/issues/14469 +[#14759]: https://github.com/JuliaLang/julia/issues/14759 +[#14798]: https://github.com/JuliaLang/julia/issues/14798 +[#15242]: https://github.com/JuliaLang/julia/issues/15242 diff --git a/README.arm.md b/README.arm.md index 7bfddb132ae62..1c50538172cb9 100644 --- a/README.arm.md +++ b/README.arm.md @@ -1,3 +1,8 @@ +# Julia binaries for ARM + +[Nightly builds](https://status.julialang.org/download/linux-arm) are +available for ARM. + # Building Julia on ARM Julia has been compiled on several ARMv7 / Cortex A15 Samsung @@ -9,8 +14,9 @@ Julia on ARM can be built by simply typing `make`, which will download all the relevant libraries. This is the *recommended* way, and it will take a few hours. -If you get SIGILL during sysimg.o creation, it is likely that your cpu does not support VFP. -File an issue on the Julia issue tracker with the contents of /proc/cpuinfo. +If you get SIGILL during sysimg.o creation, it is likely that your cpu +does not support VFP. File an issue on the Julia issue tracker with +the contents of /proc/cpuinfo. This is the list of known issues on ARM: [https://github.com/JuliaLang/julia/labels/arm](https://github.com/JuliaLang/julia/labels/arm) @@ -20,8 +26,9 @@ This is the list of known issues on ARM: We recommend using at least Ubuntu 14.04 and gcc 4.8, which is part of the standard `build-essentials`. -One can install other system libraries instead of building them, -should the build be troublesome, by adding the following lines in `Make.user`: +In case the build is failing on one of the dependent libraries, one +can install various system libraries instead of building them, by +adding the following lines in `Make.user`: ```` override USE_SYSTEM_BLAS=1 @@ -36,7 +43,9 @@ override USE_SYSTEM_ARPACK=1 The following command will install all the necessary libraries on Ubuntu. ```` -sudo apt-get install libblas3gf liblapack3gf libfftw3-dev libgmp3-dev libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 g++-4.8 gfortran libgfortran3 m4 libedit-dev +sudo apt-get install libblas3gf liblapack3gf libarpack2 libfftw3-dev libgmp3-dev \ + libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 \ + g++-4.8 gfortran libgfortran3 m4 libedit-dev ```` Note that OpenBLAS only supports ARMv7. For older ARM variants, using the reference BLAS @@ -47,24 +56,58 @@ may be the simplest thing to do. If you run into issues building LLVM, see these notes: [http://llvm.org/docs/HowToBuildOnARM.html](http://llvm.org/docs/HowToBuildOnARM.html) -# Raspberry Pi +## Raspberry Pi 1 / Raspberry Pi Zero + +Note: These chips use ARMv6, which is not well supported at the moment. However it is +possible to get a working Julia build. + +The Raspberry Pi ARM CPU type is not detected by LLVM. Before starting the +build, it is recommended to explicitly set the CPU target by adding the +following to `Make.user`: + +```` +JULIA_CPU_TARGET=arm1176jzf-s +```` + +It is also preferable to use various system provided dependencies on +ARMv6 as described in [Build Dependencies](#build-dependencies). + +You may need to increase the swap file size: edit the `/etc/dphys-swapfile`, changing the line + + CONF_SWAPSIZE=100 -The Raspberry Pi ARM CPU type is not detected by LLVM. -Before starting the build, it is recommended to do `export JULIA_CPU_ARCH=arm1176jzf-s` -at the shell to tune the generated code for your CPU architecture. +to -# Raspberry Pi 2 + CONF_SWAPSIZE=512 -In the case of Raspberry Pi 2, in case the default build fails, download LLVM binaries from the LLVM website. +Then restart the swapfile service: -1. Download the [LLVM 3.6.1 binaries for ARMv7a] (http://llvm.org/releases/3.6.1/clang+llvm-3.6.1-armv7a-linux-gnueabihf.tar.xz) and extract them in a local directory. -2. For each file in the extracted `bin`, `include`, and `lib` subdirectories, create symlinks from the corresponding directory under `/usr/local`. -3. Add the following to `Make.user`: -``` -override USE_SYSTEM_LLVM=1 -``` + sudo /etc/init.d/dphys-swapfile stop + sudo /etc/init.d/dphys-swapfile start -# Chromebook +## Raspberry Pi 2 + +For Raspberry Pi 2, which is ARMv7, the default build should work. However, the +CPU type is also not detected by LLVM. Fix this by adding +`JULIA_CPU_TARGET=cortex-a7` to `Make.user`. + +Depending on the exact compiler and distribution, there might be a build failure +due to unsupported inline assembly. In that case, add `MARCH=armv7-a` to +`Make.user`. + +If building LLVM fails, you can download binaries from the LLVM website: + +1. Download the [LLVM 3.7.0 binaries for ARMv7a] (http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-armv7a-linux-gnueabihf.tar.xz) and extract them in a local directory. +2. Add the following to `Make.user` (adjusting the path to the `llvm-config` binary): + + ``` + override USE_SYSTEM_LLVM=1 + LLVM_CONFIG=${EXTRACTED_LOCATION}/bin/llvm-config + ``` + +Please do let us know if you had to download a pre-built LLVM in [#10235](https://github.com/JuliaLang/julia/issues/10235). + +## Chromebook On Chromebooks, you have to first install Crouton. If you do not have an Ubuntu chroot running on your Chromebook using Crouton, you can do @@ -76,3 +119,8 @@ so by following these tutorials. These tutorials will end up installing Ubuntu 12.04, and you have to upgrade to Ubuntu 14.04, or install Ubuntu 14.04 from scratch by finding appropriate `crouton` help. + +## Scaleway cloud hosted ARM servers + +On the current [Scaleway](http://scaleway.com) ARM servers, the Julia +build works out of the box. diff --git a/README.md b/README.md index 908bddff2b048..7484a4aac6b12 100644 --- a/README.md +++ b/README.md @@ -68,18 +68,20 @@ First, acquire the source code by cloning the git repository: Be sure to also configure your system to use the appropriate proxy settings, e.g. by setting the `https_proxy` and `http_proxy` variables.) -By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the `0.3` series of releases. You can get this version by changing to the Julia directory and running +By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the `0.4` series of releases. You can get this version by changing to the Julia directory and running - git checkout release-0.3 + git checkout release-0.4 Now run `make` to build the `julia` executable. To perform a parallel build, use `make -j N` and supply the maximum number of concurrent processes. When compiled the first time, it will automatically download and build its [external dependencies](#Required-Build-Tools-External-Libraries). This takes a while, but only has to be done once. If the defaults in the build do not work for you, and you need to set specific make parameters, you can save them in `Make.user`. The build will automatically check for the existence of `Make.user` and use it if it exists. Building Julia requires 1.5GiB of disk space and approximately 700MiB of virtual memory. +For builds of julia starting with 0.5.0-dev, you can create out-of-tree builds of Julia by specifying `make O= configure` on the command line. This will create a directory mirror, with all of the necessary Makefiles to build Julia, in the specified directory. These builds will share the source files in Julia and `deps/srccache`. Each out-of-tree build directory can have its own `Make.user` file to override the global `Make.user` file in the top-level folder. + If you need to build Julia in an environment that does not allow access to the outside world, use `make -C deps getall` to download all the necessary files. Then, copy the `julia` directory over to the target environment and build with `make`. -**Note:** the build process will not work if any of the build directory's parent directories have spaces in their names (this is due to a limitation in GNU make). +**Note:** the build process 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), or, to run it from anywhere, either @@ -150,8 +152,9 @@ latest version. b. To delete existing binaries of `julia` and all its dependencies, delete the `./usr` directory _in the source tree_. -3. If you've upgraded OS X recently and you get an error that looks like - ```ld: library not found for -lcrt1.10.6.o```, run `xcode-select --install`. +3. If you've updated OS X recently, be sure to run `xcode-select --install` to update the command line tools. + Otherwise, you could run into errors for missing headers and libraries, such as + ```ld: library not found for -lcrt1.10.6.o```. 4. If you've moved the source directory, you might get errors such as ```CMake Error: The current CMakeCache.txt directory ... is different than the directory ... where CMakeCache.txt was created.```, in which case you may delete the offending dependency under `deps` @@ -217,8 +220,12 @@ Illegal Instruction error | Check if your CPU supports AVX while your OS does no ### OS X -It is essential to use a 64-bit gfortran to compile Julia dependencies. The gfortran-4.7 (and newer) compilers in Brew, Fink, and MacPorts work for building Julia. -Clang is now used by default to build Julia on OS X (10.7 and above). It is recommended that you upgrade to the latest version of Xcode (at least 4.3.3.). You need to have the Xcode command line utilities installed (and updated): run `xcode-select --install` in the terminal (in Xcode prior to v5.0, you can alternatively go to Preferences -> Downloads and select the Command Line Utilities). This will ensure that clang v3.1 is installed, which is the minimum version of `clang` required to build Julia. On OS X 10.6, the Julia build will automatically use `gcc`. +You need to have the current Xcode command line utilities installed: run `xcode-select --install` in the terminal. +You will need to rerun this terminal command after each OS X update, otherwise you may run into errors involving missing libraries or headers. +You will also need a 64-bit gfortran to compile Julia dependencies. The gfortran-4.7 (and newer) compilers in Brew, Fink, and MacPorts work for building Julia. + +Clang is now used by default to build Julia on OS X 10.7 and above. On OS X 10.6, the Julia build will automatically use `gcc`. +On current systems, we recommend that you install the command line tools as described above. Older systems do not have a separate command line tools package from Apple, and will require a full Xcode install. On these, you will need at least Xcode 4.3.3. In Xcode prior to v5.0, you can alternatively go to Preferences -> Downloads and select the Command Line Utilities. These steps will ensure that clang v3.1 is installed, which is the minimum version of `clang` required to build Julia. If you have set `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` in your `.bashrc` or equivalent, Julia may be unable to find various libraries that come bundled with it. These environment variables need to be unset for Julia to work. @@ -249,34 +256,35 @@ Building Julia requires that the following software be installed: - **[GNU make]** — building dependencies. - **[gcc & g++][gcc]** (>= 4.7) or **[Clang][clang]** (>= 3.1, Xcode 4.3.3 on OS X) — compiling and linking C, C++ -- **[gfortran][gcc]** — compiling and linking Fortran libraries +- **[gfortran]** — compiling and linking Fortran libraries - **[git]** — version control and package management (version 1.7.3+ required) - **[perl]** — preprocessing of header files of libraries. - **[wget]**, **[curl]**, or **[fetch]** (FreeBSD) — to automatically download external libraries. - **[m4]** — needed to build GMP. - **[patch]** — for modifying source code. - **[cmake]** — needed to build `libgit2`. +- **[openssl]** — needed for HTTPS support in `libgit2` on Linux, install via `apt-get install libssl-dev` or `yum install openssl-devel`. Julia uses the following external libraries, which are automatically downloaded (or in a few cases, included in the Julia source repository) and then compiled from source the first time you run `make`: -- **[LLVM]** (3.3) — compiler infrastructure. (3.4 not supported; 3.5+ mostly supported, [with caveats](https://github.com/JuliaLang/julia/issues/9336)) +- **[LLVM]** (3.7) — compiler infrastructure. - **[FemtoLisp]** — packaged with Julia source, and used to implement the compiler front-end. - **[libuv]** — portable, high-performance event-based I/O library - **[OpenLibm]** — portable libm library containing elementary math functions. - **[OpenSpecFun]** (>= 0.4) — library containing Bessel and error functions of complex arguments. - **[DSFMT]** — fast Mersenne Twister pseudorandom number generator library. - **[OpenBLAS]** — fast, open, and maintained [basic linear algebra subprograms (BLAS)](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) library, based on [Kazushige Goto's](https://en.wikipedia.org/wiki/Kazushige_Goto) famous [GotoBLAS](https://www.tacc.utexas.edu/research-development/tacc-software/gotoblas2). -- **[LAPACK]** (>= 3.4) — library of linear algebra routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. +- **[LAPACK]** (>= 3.5) — library of linear algebra routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. - **[MKL]** (optional) – OpenBLAS and LAPACK may be replaced by Intel's MKL library. - **[AMOS]** — subroutines for computing Bessel and Airy functions. - **[SuiteSparse]** (>= 4.1) — library of linear algebra routines for sparse matrices. - **[ARPACK]** — collection of subroutines designed to solve large, sparse eigenvalue problems. - **[FFTW]** (>= 3.3) — library for computing fast Fourier transforms very quickly and efficiently. -- **[PCRE]** (>= 8.31) — Perl-compatible regular expressions library. +- **[PCRE]** (>= 10.00) — Perl-compatible regular expressions library. - **[GMP]** (>= 5.0) — GNU multiple precision arithmetic library, needed for `BigInt` support. - **[MPFR]** (>= 3.0) — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support. - **[libgit2]** (>= 0.21) — Git linkable library, used by Julia's package manager -- **[utf8proc]** (>= 1.2) — a library for processing UTF-8 encoded Unicode strings +- **[utf8proc]** (>= 1.3) — a library for processing UTF-8 encoded Unicode strings - **[libosxunwind]** — clone of [libunwind], a library that determines the call-chain of a program - **[Rmath-julia]** — library for commonly used statistical functions from the R project. @@ -288,6 +296,7 @@ For a longer overview of Julia's dependencies, see these [slides](https://github [m4]: http://www.gnu.org/software/m4 [gcc]: http://gcc.gnu.org [clang]: http://clang.llvm.org +[gfortran]: https://gcc.gnu.org/fortran/ [curl]: http://curl.haxx.se [fetch]: http://www.freebsd.org/cgi/man.cgi?fetch(1) [git]: http://git-scm.com @@ -315,6 +324,7 @@ For a longer overview of Julia's dependencies, see these [slides](https://github [libosxunwind]: https://github.com/JuliaLang/libosxunwind [libunwind]: http://www.nongnu.org/libunwind [Rmath-julia]: https://github.com/JuliaLang/Rmath-julia +[openssl]: https://www.openssl.org ### System Provided Libraries @@ -397,8 +407,9 @@ The following distributions include julia, but the versions may be out of date d * Git package for openSUSE: [OBS page](https://build.opensuse.org/package/show/science/julia-unstable), [1 Click Install](http://software.opensuse.org/download.html?project=science&package=julia-unstable) * [NixOS](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/julia) * Ubuntu - * [Ubuntu 13.04 (Raring Ringtail)](http://packages.ubuntu.com/raring/julia) + * [Ubuntu](http://packages.ubuntu.com/search?keywords=julia) * [Nightly builds PPA](https://launchpad.net/~staticfloat/+archive/julianightlies) (depends on the [julia-deps PPA](https://launchpad.net/~staticfloat/+archive/julia-deps/)) +* [MacPorts](https://trac.macports.org/browser/trunk/dports/lang/julia/Portfile) * [OS X Homebrew Tap](https://github.com/staticfloat/homebrew-julia/) diff --git a/README.windows.md b/README.windows.md index a4acb7b594820..a4bc7064a7ffa 100644 --- a/README.windows.md +++ b/README.windows.md @@ -192,7 +192,7 @@ Julia can be also compiled from source in [Cygwin](http://www.cygwin.com), using If you prefer to cross-compile, the following steps should get you started. -For maximum compatibility with packages that use [WinRPM.jl](https://github.com/JuliaLang/WinRPM.jl) for binary dependencies on Windows, it is recommended that you use OpenSUSE 13.1 for cross-compiling a Windows build of Julia. If you use a different Linux distribution or OS X, install [Vagrant](http://www.vagrantup.com/downloads) and use the following `Vagrantfile`: +For maximum compatibility with packages that use [WinRPM.jl](https://github.com/JuliaLang/WinRPM.jl) for binary dependencies on Windows, it is recommended that you use OpenSUSE 13.2 for cross-compiling a Windows build of Julia. If you use a different Linux distribution or OS X, install [Vagrant](http://www.vagrantup.com/downloads) and use the following `Vagrantfile`: ``` # Vagrantfile for MinGW-w64 cross-compilation of Julia @@ -201,7 +201,7 @@ $script = <