Bug 1525219 - use version of lmdb-sys with fix for Android build issue r=glandium,froydnj

The fix for build bug 1512541 causes an Android build issue.  The issue has been fixed upstream in LMDB's development branch, but the fix hasn't made it to LMDB's release branch.  So I backported it to a branch in the mozilla/lmdb-rs repo, and this change switches to that branch to fix the Android build issue.

Differential Revision: https://phabricator.services.mozilla.com/D18767

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Myk Melez 2019-02-06 21:01:19 +00:00
Родитель b1374ee405
Коммит 1c7dcac39f
7 изменённых файлов: 50 добавлений и 29 удалений

Просмотреть файл

@ -22,6 +22,11 @@ git = "https://github.com/glandium/cc-rs"
branch = "1.0.23-clang-cl-aarch64"
replace-with = "vendored-sources"
[source."https://github.com/mozilla/lmdb-rs"]
git = "https://github.com/mozilla/lmdb-rs"
branch = "lmdb-sys-0.8.0-android-fix"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = '@top_srcdir@/third_party/rust'

6
Cargo.lock сгенерированный
Просмотреть файл

@ -1443,13 +1443,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"lmdb-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lmdb-sys 0.8.0 (git+https://github.com/mozilla/lmdb-rs?branch=lmdb-sys-0.8.0-android-fix)",
]
[[package]]
name = "lmdb-sys"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
source = "git+https://github.com/mozilla/lmdb-rs?branch=lmdb-sys-0.8.0-android-fix#1295a0e2c0e3eeff2036ada60cb22d57663d0e74"
dependencies = [
"cc 1.0.23 (git+https://github.com/glandium/cc-rs?branch=1.0.23-clang-cl-aarch64)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3355,7 +3355,7 @@ dependencies = [
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
"checksum lmdb-rkv 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "07d8d72d709440ac7a19b71e04fb66684ec7547b3831817872454b01fdaefe23"
"checksum lmdb-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5b392838cfe8858e86fac37cf97a0e8c55cc60ba0a18365cadc33092f128ce9"
"checksum lmdb-sys 0.8.0 (git+https://github.com/mozilla/lmdb-rs?branch=lmdb-sys-0.8.0-android-fix)" = "<none>"
"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"

Просмотреть файл

@ -57,6 +57,7 @@ codegen-units = 1
[patch.crates-io]
libudev-sys = { path = "dom/webauthn/libudev-sys" }
lmdb-sys = { git = "https://github.com/mozilla/lmdb-rs", branch = "lmdb-sys-0.8.0-android-fix" }
serde_derive = { git = "https://github.com/servo/serde", branch = "deserialize_from_enums9" }
winapi = { git = "https://github.com/froydnj/winapi-rs", branch = "aarch64" }
cc = { git = "https://github.com/glandium/cc-rs", branch = "1.0.23-clang-cl-aarch64" }

Просмотреть файл

@ -1 +1 @@
{"files":{"Cargo.toml":"f934ea681a6ab7338d4fee18c0d7c2915321c3087e82e373484b3e586ad367ee","build.rs":"4204dd0891e2eca08cb7cbcccfb36d1bdac137651c383f4a36368478fd836402","lmdb/libraries/liblmdb/CHANGES":"d58e7fbdac22b7001c141df2f48b9d192770de52c9b4a0348552dcd4056ebbf7","lmdb/libraries/liblmdb/COPYRIGHT":"ce2436e2ab324485500b6fec5764b788ba082ac902ed00290f527d0170d8c90e","lmdb/libraries/liblmdb/Doxyfile":"5545f6b049040ce58e6d1a603eaea6b7fb8ae92459f2ab8d3bcbacabcce1014d","lmdb/libraries/liblmdb/LICENSE":"310fe25c858a9515fc8c8d7d1f24a67c9496f84a91e0a0e41ea9975b1371e569","lmdb/libraries/liblmdb/Makefile":"60b5f574e6642602f692a95956da61c588a265ad50b8059960c230b9e6aaf4fd","lmdb/libraries/liblmdb/intro.doc":"c7c2d970e7c277dc1f45bb3824c054fb73cf8d1666aa826e83c6a9a6a378839d","lmdb/libraries/liblmdb/lmdb.h":"c06ce42284b7544657e7b2d6b1f34cedd85234c193e673167b5d4b86372142ca","lmdb/libraries/liblmdb/mdb.c":"f7840eb8efaba2b55f7980dcecf9c0109b33db6261c07ae6dc1fea4f40789db4","lmdb/libraries/liblmdb/mdb_copy.1":"c01f113a295d3c76b60f432896f24862cb0d2dadb14e26d72c6de9b55a254e2f","lmdb/libraries/liblmdb/mdb_copy.c":"b75a4d9b18aea89b8910bff44938244587a1a5863d1d609134298b1b5f019bfe","lmdb/libraries/liblmdb/mdb_dump.1":"adf51a57167bc6a64e0e6635e28ad2175924754f25eb1e9d89278b543c5e78d3","lmdb/libraries/liblmdb/mdb_dump.c":"7a67fa80539cb976cedd2bf7c56082366c33e07c9eac409e47efabaf4e31b62f","lmdb/libraries/liblmdb/mdb_load.1":"c1f7369d12b84fc92908256d3c1e422fa05576bde378fc84aca272d5aa2f4102","lmdb/libraries/liblmdb/mdb_load.c":"136169ce000cf254149ac00a0d9d4b12e9548649e7cdc9f6d6bd0943c16c11ea","lmdb/libraries/liblmdb/mdb_stat.1":"9c531fa57f1a528fa4bc4da4351b2332bff2e34bbd6f76dd0c1bbd915888cbfd","lmdb/libraries/liblmdb/mdb_stat.c":"235b872ae85aff627dbf27ae495c66cf3ed80eeca2188fe90d27d0486c03d0fa","lmdb/libraries/liblmdb/midl.c":"4877d6421f114a18a7074076b5b56c68567c0ba1a8328018af788cf5bb5c4f87","lmdb/libraries/liblmdb/midl.h":"853fc3115d2b827d6b53afcb03d39e0dcab6be108108955e549990ee5ece5c8a","lmdb/libraries/liblmdb/mtest.c":"4fd58e1ab4e445a73a6c655275f2c84523c128d34afa958a98b128c1d5f7ec24","lmdb/libraries/liblmdb/mtest2.c":"4b5711048ecbc255e3393c2fab589630b78fc3fc423cc98281629c7e45e78b4b","lmdb/libraries/liblmdb/mtest3.c":"b8e895e093a9d5bacbfde677d8f8e0aca9f0b9d8c2f4392bb47ff227b9c6a08d","lmdb/libraries/liblmdb/mtest4.c":"6e1fd62ca1036795dbadd1306fae4e48c34f00576805c0ac1dd73114ec58f85c","lmdb/libraries/liblmdb/mtest5.c":"24906ec930c259be3c2af5250fe1cb06dbb0f40ce3bad3c9f4991f681642e1e9","lmdb/libraries/liblmdb/mtest6.c":"f5c40dc672e5946874fe8a6a2d10fe8da2f509ffe48c73bdd4199b2d6756031c","lmdb/libraries/liblmdb/sample-bdb.txt":"7692f24c5f909328856008ed90e48cf224de1eb466d1f7623ffb7f32148eb3d9","lmdb/libraries/liblmdb/sample-mdb.txt":"40902b2560d72d348d19a23711244c59e3d684871a4262071312cc5a67e5ecae","lmdb/libraries/liblmdb/tooltag":"4734c6dc1fa7aec8c2e9646bd04bc5218ef6a03ad83a3b18de2ac4069eb94120","src/constants.rs":"af67740b5acccdc71b2267ec051bb60e5433c4f0313fe16dc0627376a52dcdff","src/ffi.rs":"caa9bbfb3868a7a9e9ad822d775e60ffa8c8c2f2450ac4ed403a93ddb7547899","src/lib.rs":"93504d2712ee68182bb59d5c6ad440b42892c221ecf014e77c325f2bb5cdddf1"},"package":"d5b392838cfe8858e86fac37cf97a0e8c55cc60ba0a18365cadc33092f128ce9"}
{"files":{"Cargo.toml":"6d08d8713cae81e984bb50cbeb309c7746f4eb6b747a8e2affdca9c30230d353","build.rs":"4204dd0891e2eca08cb7cbcccfb36d1bdac137651c383f4a36368478fd836402","lmdb/libraries/liblmdb/.gitignore":"49e1a82819dab072b1c80d4570f817d6e2c6625d574df871f7a065ab44944727","lmdb/libraries/liblmdb/CHANGES":"d58e7fbdac22b7001c141df2f48b9d192770de52c9b4a0348552dcd4056ebbf7","lmdb/libraries/liblmdb/COPYRIGHT":"ce2436e2ab324485500b6fec5764b788ba082ac902ed00290f527d0170d8c90e","lmdb/libraries/liblmdb/Doxyfile":"5545f6b049040ce58e6d1a603eaea6b7fb8ae92459f2ab8d3bcbacabcce1014d","lmdb/libraries/liblmdb/LICENSE":"310fe25c858a9515fc8c8d7d1f24a67c9496f84a91e0a0e41ea9975b1371e569","lmdb/libraries/liblmdb/Makefile":"60b5f574e6642602f692a95956da61c588a265ad50b8059960c230b9e6aaf4fd","lmdb/libraries/liblmdb/intro.doc":"c7c2d970e7c277dc1f45bb3824c054fb73cf8d1666aa826e83c6a9a6a378839d","lmdb/libraries/liblmdb/lmdb.h":"c06ce42284b7544657e7b2d6b1f34cedd85234c193e673167b5d4b86372142ca","lmdb/libraries/liblmdb/mdb.c":"75b99ad8ef4ef747fb6ba93cc54b2d20cd91bef9121450c449cb2dbd77bf6d31","lmdb/libraries/liblmdb/mdb_copy.1":"c01f113a295d3c76b60f432896f24862cb0d2dadb14e26d72c6de9b55a254e2f","lmdb/libraries/liblmdb/mdb_copy.c":"b75a4d9b18aea89b8910bff44938244587a1a5863d1d609134298b1b5f019bfe","lmdb/libraries/liblmdb/mdb_dump.1":"adf51a57167bc6a64e0e6635e28ad2175924754f25eb1e9d89278b543c5e78d3","lmdb/libraries/liblmdb/mdb_dump.c":"7a67fa80539cb976cedd2bf7c56082366c33e07c9eac409e47efabaf4e31b62f","lmdb/libraries/liblmdb/mdb_load.1":"c1f7369d12b84fc92908256d3c1e422fa05576bde378fc84aca272d5aa2f4102","lmdb/libraries/liblmdb/mdb_load.c":"136169ce000cf254149ac00a0d9d4b12e9548649e7cdc9f6d6bd0943c16c11ea","lmdb/libraries/liblmdb/mdb_stat.1":"9c531fa57f1a528fa4bc4da4351b2332bff2e34bbd6f76dd0c1bbd915888cbfd","lmdb/libraries/liblmdb/mdb_stat.c":"235b872ae85aff627dbf27ae495c66cf3ed80eeca2188fe90d27d0486c03d0fa","lmdb/libraries/liblmdb/midl.c":"4877d6421f114a18a7074076b5b56c68567c0ba1a8328018af788cf5bb5c4f87","lmdb/libraries/liblmdb/midl.h":"853fc3115d2b827d6b53afcb03d39e0dcab6be108108955e549990ee5ece5c8a","lmdb/libraries/liblmdb/mtest.c":"4fd58e1ab4e445a73a6c655275f2c84523c128d34afa958a98b128c1d5f7ec24","lmdb/libraries/liblmdb/mtest2.c":"4b5711048ecbc255e3393c2fab589630b78fc3fc423cc98281629c7e45e78b4b","lmdb/libraries/liblmdb/mtest3.c":"b8e895e093a9d5bacbfde677d8f8e0aca9f0b9d8c2f4392bb47ff227b9c6a08d","lmdb/libraries/liblmdb/mtest4.c":"6e1fd62ca1036795dbadd1306fae4e48c34f00576805c0ac1dd73114ec58f85c","lmdb/libraries/liblmdb/mtest5.c":"24906ec930c259be3c2af5250fe1cb06dbb0f40ce3bad3c9f4991f681642e1e9","lmdb/libraries/liblmdb/mtest6.c":"f5c40dc672e5946874fe8a6a2d10fe8da2f509ffe48c73bdd4199b2d6756031c","lmdb/libraries/liblmdb/sample-bdb.txt":"7692f24c5f909328856008ed90e48cf224de1eb466d1f7623ffb7f32148eb3d9","lmdb/libraries/liblmdb/sample-mdb.txt":"40902b2560d72d348d19a23711244c59e3d684871a4262071312cc5a67e5ecae","lmdb/libraries/liblmdb/tooltag":"4734c6dc1fa7aec8c2e9646bd04bc5218ef6a03ad83a3b18de2ac4069eb94120","src/constants.rs":"af67740b5acccdc71b2267ec051bb60e5433c4f0313fe16dc0627376a52dcdff","src/ffi.rs":"caa9bbfb3868a7a9e9ad822d775e60ffa8c8c2f2450ac4ed403a93ddb7547899","src/lib.rs":"93504d2712ee68182bb59d5c6ad440b42892c221ecf014e77c325f2bb5cdddf1"},"package":null}

36
third_party/rust/lmdb-sys/Cargo.toml поставляемый
Просмотреть файл

@ -1,31 +1,23 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g. crates.io) dependencies
#
# If you believe there's an error in this file please file an
# issue against the rust-lang/cargo repository. If you're
# editing this file be aware that the upstream Cargo.toml
# will likely look very different (and much more reasonable)
[package]
name = "lmdb-sys"
# NB: When modifying, also modify html_root_url in lib.rs
version = "0.8.0"
authors = ["Dan Burkert <dan@danburkert.com>"]
build = "build.rs"
license = "Apache-2.0"
description = "Rust bindings for liblmdb."
documentation = "https://docs.rs/lmdb-sys"
repository = "https://github.com/danburkert/lmdb-rs.git"
readme = "../README.md"
documentation = "https://docs.rs/lmdb-sys"
keywords = ["LMDB", "database", "storage-engine", "bindings", "library"]
categories = ["database", "external-ffi-bindings"]
license = "Apache-2.0"
repository = "https://github.com/danburkert/lmdb-rs.git"
[dependencies.libc]
version = "0.2"
[build-dependencies.cc]
version = "1"
[build-dependencies.pkg-config]
version = "0.3"
build = "build.rs"
[dependencies]
libc = "0.2"
[build-dependencies]
pkg-config = "0.3"
cc = "1"

23
third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,23 @@
mtest
mtest[23456]
testdb
mdb_copy
mdb_stat
mdb_dump
mdb_load
*.lo
*.[ao]
*.so
*.exe
*[~#]
*.bak
*.orig
*.rej
*.gcov
*.gcda
*.gcno
core
core.*
valgrind.*
man/
html/

Просмотреть файл

@ -109,7 +109,7 @@ typedef SSIZE_T ssize_t;
#include <unistd.h>
#endif
#if defined(__sun) || defined(ANDROID)
#if defined(__sun) || defined(__ANDROID__)
/* Most platforms have posix_memalign, older may only have memalign */
#define HAVE_MEMALIGN 1
#include <malloc.h>
@ -123,7 +123,7 @@ typedef SSIZE_T ssize_t;
#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__)
# define MDB_USE_POSIX_SEM 1
# define MDB_FDATASYNC fsync
#elif defined(ANDROID)
#elif defined(__ANDROID__)
# define MDB_FDATASYNC fsync
#endif
@ -256,7 +256,7 @@ typedef SSIZE_T ssize_t;
*/
#ifndef MDB_USE_ROBUST
/* Android currently lacks Robust Mutex support. So does glibc < 2.4. */
# if defined(MDB_USE_POSIX_MUTEX) && (defined(ANDROID) || \
# if defined(MDB_USE_POSIX_MUTEX) && (defined(__ANDROID__) || \
(defined(__GLIBC__) && GLIBC_VER < 0x020004))
# define MDB_USE_ROBUST 0
# else