gnu: julia: Update to 0.4.2.

* gnu/packages/patches/julia-0.3.10-fix-empty-array.patch: Remove file.
* gnu-system.am (dist_patch_DATA): Remove it.
* gnu/packages/julia.scm (julia): Update to 0.4.2.
[arguments]: Remove phase "fix-building-with-mcjit-llvm"; replace phase
"patch-include-path" with "fix-include-and-link-paths"; add phase
"hardcode-paths"; add missing make-flags.
[inputs]: Replace "pcre" with "pcre2"; replace "git" with "libgit2"; add
"coreutils"; add "libuv-julia"; add "wget"; add "which".
[native-inputs]: Remove "which".
This commit is contained in:
Ricardo Wurmus 2015-11-30 14:25:53 +01:00
parent 50b40d0709
commit c2e87caaa6
3 changed files with 69 additions and 46 deletions

View File

@ -519,7 +519,6 @@ dist_patch_DATA = \
gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \
gnu/packages/patches/jasper-CVE-2008-3522.patch \ gnu/packages/patches/jasper-CVE-2008-3522.patch \
gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \
gnu/packages/patches/julia-0.3.10-fix-empty-array.patch \
gnu/packages/patches/kmod-module-directory.patch \ gnu/packages/patches/kmod-module-directory.patch \
gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
gnu/packages/patches/liba52-enable-pic.patch \ gnu/packages/patches/liba52-enable-pic.patch \

View File

@ -39,6 +39,7 @@
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages textutils) #:use-module (gnu packages textutils)
#:use-module (gnu packages version-control) #:use-module (gnu packages version-control)
#:use-module (gnu packages wget)
#:use-module (ice-9 match)) #:use-module (ice-9 match))
(define libuv-julia (define libuv-julia
@ -67,16 +68,15 @@
(define-public julia (define-public julia
(package (package
(name "julia") (name "julia")
(version "0.3.10") (version "0.4.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://github.com/JuliaLang/julia/releases/download/v" "https://github.com/JuliaLang/julia/releases/download/v"
version "/julia-" version "_c8ceeefcc1.tar.gz")) version "/julia-" version "-full.tar.gz"))
(sha256 (sha256
(base32 (base32
"0j6mw6wr35lxid10nh9gz7k6wck3a90ic92w99n1r052325gl9r7")) "0sikirixvryf8z3d0skig22fpip64jk001qsha98iwsrcfiqpyds"))))
(patches (list (search-patch "julia-0.3.10-fix-empty-array.patch")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
@ -92,8 +92,7 @@
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(add-after (add-after 'unpack 'hardcode-soname-map
'unpack 'hardcode-soname-map
;; ./src/ccall.cpp creates a map from library names to paths using the ;; ./src/ccall.cpp creates a map from library names to paths using the
;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix, ;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix,
;; we patch ccall.cpp to contain a static map. ;; we patch ccall.cpp to contain a static map.
@ -108,45 +107,69 @@
"sonameMap[\"" libname "\"] = " "sonameMap[\"" libname "\"] = "
"\"" (assoc-ref inputs input) "/lib/" soname "\";"))) "\"" (assoc-ref inputs input) "/lib/" soname "\";")))
'(("libc" "libc" "libc.so.6") '(("libc" "libc" "libc.so.6")
("pcre" "libpcre" "libpcre.so") ("pcre2" "libpcre2-8" "libpcre2-8.so")
("mpfr" "libmpfr" "libmpfr.so") ("mpfr" "libmpfr" "libmpfr.so")
("openblas" "libblas" "libopenblas.so") ("openblas" "libblas" "libopenblas.so")
("arpack-ng" "libarpack" "libarpack.so") ("arpack-ng" "libarpack" "libarpack.so")
("lapack" "liblapack" "liblapack.so") ("lapack" "liblapack" "liblapack.so")
("libgit2" "libgit2" "libgit2.so")
("gmp" "libgmp" "libgmp.so") ("gmp" "libgmp" "libgmp.so")
("openlibm" "libopenlibm" "libopenlibm.so") ("openlibm" "libopenlibm" "libopenlibm.so")
("openspecfun" "libopenspecfun" "libopenspecfun.so") ("openspecfun" "libopenspecfun" "libopenspecfun.so")
("fftw" "libfftw3" "libfftw3.so") ("fftw" "libfftw3" "libfftw3.so")
("fftwf" "libfftw3f" "libfftw3f.so")))))) ("fftwf" "libfftw3f" "libfftw3f.so"))))))
#t)) #t))
;; This phase will no longer be necessary in 0.3.11; see (add-before 'build 'fix-include-and-link-paths
;; https://github.com/JuliaLang/julia/issues/12028 (lambda* (#:key inputs #:allow-other-keys)
(add-before ;; LIBUTF8PROC is a linker flag, not a build target. It is
'build 'fix-building-with-mcjit-llvm ;; included in the LIBFILES_* variable which is used as a
(lambda _ ;; collection of build targets and a list of libraries to link
(substitute* "src/cgutils.cpp" ;; against.
(("addComdat\\(gv\\);") "")) (substitute* "src/flisp/Makefile"
#t)) (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)")
(add-before "$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)")
'build 'patch-include-path (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)")
(lambda _ "$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)"))
;; The REPL must be linked with libuv.
(substitute* "ui/Makefile"
(("JLDFLAGS \\+= ")
(string-append "JLDFLAGS += "
(assoc-ref %build-inputs "libuv")
"/lib/libuv.so ")))
(substitute* "deps/Makefile" (substitute* "deps/Makefile"
(("/usr/include/double-conversion") (("/usr/include/double-conversion")
(string-append (assoc-ref %build-inputs "double-conversion") (string-append (assoc-ref %build-inputs "double-conversion")
"/include/double-conversion"))) "/include/double-conversion")))
(substitute* "base/Makefile"
(("\\$\\(build_includedir\\)/uv-errno.h")
(string-append (assoc-ref inputs "libuv")
"/include/uv-errno.h")))
#t)) #t))
(add-before (add-before 'build 'replace-default-shell
'build 'replace-default-shell
(lambda _ (lambda _
(substitute* "base/client.jl" (substitute* "base/client.jl"
(("/bin/sh") (which "sh"))) (("/bin/sh") (which "sh")))
#t)) #t))
(add-before (add-after 'unpack 'hardcode-paths
'check 'disable-broken-test
;; One test fails because it produces slightly different output.
(lambda _ (lambda _
(substitute* "base/interactiveutil.jl"
(("`which") (string-append "`" (which "which")))
(("`wget") (string-append "`" (which "wget"))))
#t))
(add-before 'check 'disable-broken-tests
(lambda _
(substitute* "test/choosetests.jl"
;; These tests time out. See
;; https://github.com/JuliaLang/julia/issues/14374 for ongoing
;; discussion.
(("\"replcompletions\",") "")
(("\"repl\",") ""))
(substitute* "test/repl.jl" (substitute* "test/repl.jl"
(("@test output") "# @test output")) ;; This test fails because we cannot escape the build
;; directory.
(("@test pwd\\(\\) == homedir\\(\\)") "#"))
#t))) #t)))
#:make-flags #:make-flags
(list (list
@ -163,7 +186,6 @@
(_ "MARCH=UNSUPPORTED")) (_ "MARCH=UNSUPPORTED"))
"CONFIG_SHELL=bash" ;needed to build bundled libraries "CONFIG_SHELL=bash" ;needed to build bundled libraries
"USE_SYSTEM_LIBUV=0" ;Julia expects a modified libuv
"USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no "USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no
;build system for a shared library. ;build system for a shared library.
"USE_SYSTEM_RMATH=0" ;Julia uses a bundled version of R's math "USE_SYSTEM_RMATH=0" ;Julia uses a bundled version of R's math
@ -184,10 +206,22 @@
;; (assoc-ref %build-inputs "suitesparse") ;; (assoc-ref %build-inputs "suitesparse")
;; "/include") ;; "/include")
"USE_GPL_LIBS=1" ;proudly
"USE_SYSTEM_GRISU=1" ;for double-conversion "USE_SYSTEM_GRISU=1" ;for double-conversion
"USE_SYSTEM_UTF8PROC=1" "USE_SYSTEM_UTF8PROC=1"
(string-append "UTF8PROC_INC="
(assoc-ref %build-inputs "utf8proc")
"/include")
"USE_SYSTEM_LLVM=1" "USE_SYSTEM_LLVM=1"
"USE_SYSTEM_LIBUNWIND=1" "USE_SYSTEM_LIBUNWIND=1"
"USE_SYSTEM_LIBUV=1"
(string-append "LIBUV="
(assoc-ref %build-inputs "libuv")
"/lib/libuv.so")
(string-append "LIBUV_INC="
(assoc-ref %build-inputs "libuv")
"/include")
"USE_SYSTEM_PATCHELF=1"
"USE_SYSTEM_PCRE=1" "USE_SYSTEM_PCRE=1"
"USE_SYSTEM_OPENLIBM=1" "USE_SYSTEM_OPENLIBM=1"
"USE_SYSTEM_GMP=1" "USE_SYSTEM_GMP=1"
@ -198,26 +232,29 @@
(inputs (inputs
`(("llvm" ,llvm-3.5) `(("llvm" ,llvm-3.5)
("arpack-ng" ,arpack-ng) ("arpack-ng" ,arpack-ng)
("coreutils" ,coreutils) ;for bindings to "mkdir" and the like
("lapack" ,lapack) ("lapack" ,lapack)
("openblas" ,openblas) ;Julia does not build with Atlas ("openblas" ,openblas) ;Julia does not build with Atlas
("libunwind" ,libunwind) ("libunwind" ,libunwind)
("openlibm" ,openlibm) ("openlibm" ,openlibm)
("openspecfun" ,openspecfun) ("openspecfun" ,openspecfun)
("double-conversion" ,double-conversion) ("double-conversion" ,double-conversion)
("libgit2" ,libgit2)
("fftw" ,fftw) ("fftw" ,fftw)
("fftwf" ,fftwf) ("fftwf" ,fftwf)
("fortran" ,gfortran) ("fortran" ,gfortran)
("pcre" ,pcre) ("libuv" ,libuv-julia)
("pcre2" ,pcre2)
("utf8proc" ,utf8proc) ("utf8proc" ,utf8proc)
("git" ,git)
("mpfr" ,mpfr) ("mpfr" ,mpfr)
("wget" ,wget)
("which" ,which)
("gmp" ,gmp))) ("gmp" ,gmp)))
(native-inputs (native-inputs
`(("perl" ,perl) `(("perl" ,perl)
("patchelf" ,patchelf) ("patchelf" ,patchelf)
("pkg-config" ,pkg-config) ("pkg-config" ,pkg-config)
("python" ,python-2) ("python" ,python-2)))
("which" ,which)))
;; Julia is not officially released for ARM and MIPS. ;; Julia is not officially released for ARM and MIPS.
;; See https://github.com/JuliaLang/julia/issues/10639 ;; See https://github.com/JuliaLang/julia/issues/10639
(supported-systems '("i686-linux" "x86_64-linux")) (supported-systems '("i686-linux" "x86_64-linux"))

View File

@ -1,13 +0,0 @@
See https://github.com/JuliaLang/julia/issues/11817
--- a/src/codegen.cpp 2015-06-24 12:44:31.218674066 +0200
+++ b/src/codegen.cpp 2015-04-23 11:19:50.000000000 +0200
@@ -4551,7 +4551,7 @@
#ifdef V128_BUG
"-avx",
#endif
- };
+ ""};
SmallVector<std::string, 4> MAttrs(mattr, mattr+sizeof(mattr)/sizeof(mattr[0]));
EngineBuilder eb = EngineBuilder(engine_module)
.setEngineKind(EngineKind::JIT)