Bug 1525219 - use version of lmdb-sys with fix for Android build issue r=glandium,froydnj
authorMyk Melez <myk@mykzilla.org>
Wed, 06 Feb 2019 21:01:19 +0000
changeset 457461 cc0ffcd544f0aa3329f83785a82dc57c0b228eb7
parent 457460 164bfd05f3f704d9d237a7395e0db2abdd1b2703
child 457462 2c1f0ec523ad073493f8c221772b1b4e54e60d6f
push id35511
push userrgurzau@mozilla.com
push dateThu, 07 Feb 2019 05:01:56 +0000
treeherdermozilla-central@d09706f38e5e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, froydnj
bugs1525219, 1512541
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
.cargo/config.in
Cargo.lock
Cargo.toml
third_party/rust/lmdb-sys/.cargo-checksum.json
third_party/rust/lmdb-sys/Cargo.toml
third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/.gitignore
third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c
--- a/.cargo/config.in
+++ b/.cargo/config.in
@@ -17,12 +17,17 @@ git = "https://github.com/froydnj/winapi
 branch = "aarch64"
 replace-with = "vendored-sources"
 
 [source."https://github.com/alexcrichton/cc-rs"]
 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'
 
 @WIN64_CARGO_LINKER_CONFIG@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1438,23 +1438,23 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "lmdb-rkv"
 version = "0.8.2"
 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)",
  "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "lock_api"
@@ -3350,17 +3350,17 @@ dependencies = [
 "checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
 "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
 "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
 "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
 "checksum libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea626d3bdf40a1c5aee3bcd4f40826970cae8d80a8fec934c82a63840094dcfe"
 "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"
 "checksum malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "35adee9ed962cf7d07d62cb58bc45029f3227f5b5b86246caa8632f06c187bc3"
 "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
 "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
 "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
 "checksum memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46f3c7359028b31999287dae4e5047ddfe90a23b7dca2282ce759b491080c99b"
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -52,11 +52,12 @@ panic = "abort"
 opt-level = 2
 rpath = false
 debug-assertions = false
 panic = "abort"
 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" }
--- a/third_party/rust/lmdb-sys/.cargo-checksum.json
+++ b/third_party/rust/lmdb-sys/.cargo-checksum.json
@@ -1,1 +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"}
\ No newline at end of file
+{"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}
\ No newline at end of file
--- a/third_party/rust/lmdb-sys/Cargo.toml
+++ b/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]
 
-[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."
+repository = "https://github.com/danburkert/lmdb-rs.git"
+readme = "../README.md"
 documentation = "https://docs.rs/lmdb-sys"
-readme = "../README.md"
 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 = "build.rs"
 
-[build-dependencies.pkg-config]
-version = "0.3"
+[dependencies]
+libc = "0.2"
+
+[build-dependencies]
+pkg-config = "0.3"
+cc = "1"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/.gitignore
@@ -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/
--- a/third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c
+++ b/third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c
@@ -104,31 +104,31 @@ extern int cacheflush(char *addr, int nb
 
 #ifdef _MSC_VER
 #include <io.h>
 typedef SSIZE_T	ssize_t;
 #else
 #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>
 #endif
 
 #if !(defined(BYTE_ORDER) || defined(__BYTE_ORDER))
 #include <netinet/in.h>
 #include <resolv.h>	/* defines BYTE_ORDER on HPUX and Solaris */
 #endif
 
 #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
 
 #ifndef _WIN32
 #include <pthread.h>
 #include <signal.h>
 #ifdef MDB_USE_POSIX_SEM
 # define MDB_USE_HASH		1
@@ -251,17 +251,17 @@ typedef SSIZE_T	ssize_t;
  * even though they don't support Robust Mutexes.
  * Compile with -DMDB_USE_ROBUST=0, or use some other
  * mechanism like -DMDB_USE_POSIX_SEM instead of
  * -DMDB_USE_POSIX_MUTEX.
  * (Posix semaphores are not robust.)
  */
 #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
 #  define MDB_USE_ROBUST	1
 # endif
 #endif /* !MDB_USE_ROBUST */
 
 #if defined(MDB_USE_POSIX_MUTEX) && (MDB_USE_ROBUST)