mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-21 02:03:29 -05:00
gnu: RocksDB: Update to 6.25.3.
* gnu/packages/databases.scm (rocksdb): Update to 6.25.3. [inputs]: Change from PYTHON-2 to PYTHON. [arguments]: Adjust #:make-flags for upstream changes. Use a less arbitrary test subset. Move the disable-optimizations phase contents to #:make-flags. Introduce 'clean' phase. While here, fix cross-compilation and remove trailing #t's.
This commit is contained in:
parent
3c6cbd866c
commit
71ad48f7bb
1 changed files with 30 additions and 31 deletions
|
@ -1359,7 +1359,7 @@ (define-public emacs-recutils
|
||||||
(define-public rocksdb
|
(define-public rocksdb
|
||||||
(package
|
(package
|
||||||
(name "rocksdb")
|
(name "rocksdb")
|
||||||
(version "6.11.4")
|
(version "6.25.3")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -1368,35 +1368,37 @@ (define-public rocksdb
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
|
"14150kd7hk8jjwpm28bf3a0agrhyapbq9lgnl00l385vfb73wnzl"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
'(begin
|
||||||
;; TODO: unbundle gtest.
|
;; TODO: unbundle gtest.
|
||||||
(delete-file "build_tools/gnu_parallel")
|
(delete-file "build_tools/gnu_parallel")
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("build_tools/gnu_parallel") "parallel"))
|
(("build_tools/gnu_parallel") "parallel"))))))
|
||||||
#t))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:make-flags (list "CC=gcc" "V=1"
|
`(#:make-flags (list (string-append "CC=" ,(cc-for-target))
|
||||||
|
(string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||||
;; Ceph requires that RTTI is enabled.
|
;; Ceph requires that RTTI is enabled.
|
||||||
"USE_RTTI=1"
|
"USE_RTTI=1"
|
||||||
"date=1970-01-01" ; build reproducibly
|
;; Don't pass '-march=native' to the compiler.
|
||||||
(string-append "INSTALL_PATH="
|
"PORTABLE=1"
|
||||||
(assoc-ref %outputs "out"))
|
;; Use a deterministic date stamp.
|
||||||
|
"build_date=1970-01-01"
|
||||||
|
|
||||||
;; Running the full test suite takes hours and require
|
;; Running the full test suite takes hours and require
|
||||||
;; a lot of disk space. Instead we only run a subset
|
;; a lot of disk space. Instead we only run a subset
|
||||||
;; (see .travis.yml and Makefile).
|
;; that exercises platform-specific functionality.
|
||||||
"ROCKSDBTESTS_END=db_tailing_iter_test")
|
"ROCKSDBTESTS_PLATFORM_DEPENDENT=only")
|
||||||
#:test-target "check_some"
|
#:test-target "check_some"
|
||||||
;; Many tests fail on 32-bit platforms. There are multiple reports about
|
;; Many tests fail on 32-bit platforms. There are multiple reports about
|
||||||
;; this upstream, but it's not going to be supported any time soon.
|
;; this upstream, but it's not going to be supported any time soon.
|
||||||
#:tests? (let ((system ,(or (%current-target-system)
|
#:tests? ,(if (%current-target-system)
|
||||||
(%current-system))))
|
#f
|
||||||
(or (string-prefix? "x86_64-linux" system)
|
(let ((system (%current-system)))
|
||||||
(string-prefix? "aarch64-linux" system)))
|
(or (string-prefix? "x86_64-linux" system)
|
||||||
|
(string-prefix? "aarch64-linux" system))))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-Makefile
|
(add-after 'unpack 'patch-Makefile
|
||||||
|
@ -1404,9 +1406,8 @@ (define-public rocksdb
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
;; Don't depend on the static library when installing.
|
;; Don't depend on the static library when installing.
|
||||||
(("install: install-static")
|
(("install: install-static")
|
||||||
"install: install-shared")
|
"install:")
|
||||||
(("#!/bin/sh") (string-append "#!" (which "sh"))))
|
(("#!/bin/sh") (string-append "#!" (which "sh"))))))
|
||||||
#t))
|
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
;; The default target is only needed for tests and built on demand.
|
;; The default target is only needed for tests and built on demand.
|
||||||
(delete 'build)
|
(delete 'build)
|
||||||
|
@ -1419,33 +1420,31 @@ (define-public rocksdb
|
||||||
(let ((test-dir (string-append (getcwd) "/../test")))
|
(let ((test-dir (string-append (getcwd) "/../test")))
|
||||||
(mkdir test-dir)
|
(mkdir test-dir)
|
||||||
(setenv "TEST_TMPDIR" (canonicalize-path test-dir)))))
|
(setenv "TEST_TMPDIR" (canonicalize-path test-dir)))))
|
||||||
(add-before 'check 'disable-optimizations
|
|
||||||
(lambda _
|
|
||||||
;; Prevent the build from passing '-march=native' to the compiler.
|
|
||||||
(setenv "PORTABLE" "1")
|
|
||||||
#t))
|
|
||||||
(add-before 'check 'disable-failing-tests
|
(add-before 'check 'disable-failing-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
;; These tests reliably fail due to "Too many open files".
|
;; These tests reliably fail due to "Too many open files".
|
||||||
(("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
|
(("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
|
||||||
(("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
|
(("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))))
|
||||||
#t))
|
(add-after 'check 'clean
|
||||||
(add-after 'check 'build
|
(lambda _
|
||||||
|
;; Otherwise stale objects from the tests would interfere.
|
||||||
|
(invoke "make" "clean")))
|
||||||
|
(add-after 'clean 'build
|
||||||
;; The default build target is a debug build for tests. The
|
;; The default build target is a debug build for tests. The
|
||||||
;; install target depends on the "shared_lib" release target
|
;; install target depends on the "shared_lib" release target
|
||||||
;; so we build it here for clarity.
|
;; so we build it here for clarity.
|
||||||
(lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
|
(lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
|
||||||
(apply invoke "make" "shared_lib"
|
(apply invoke "make" "shared_lib"
|
||||||
`(,@(if parallel-build?
|
`(,@(if parallel-build?
|
||||||
`("-j" ,(number->string (parallel-job-count)))
|
`("-j" ,(number->string (parallel-job-count)))
|
||||||
'())
|
'())
|
||||||
,@make-flags)))))))
|
,@make-flags)))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("parallel" ,parallel)
|
`(("parallel" ,parallel)
|
||||||
("perl" ,perl)
|
("perl" ,perl)
|
||||||
("procps" ,procps)
|
("procps" ,procps)
|
||||||
("python" ,python-2)
|
("python" ,python)
|
||||||
("which" ,which)))
|
("which" ,which)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("bzip2" ,bzip2)
|
`(("bzip2" ,bzip2)
|
||||||
|
|
Loading…
Reference in a new issue