-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to upstream (1.22+) #25
Comments
They switched to CMake. I don't understand enough of build systems, so I am wondering if this will break our autotools build? |
Good to know! But I'm fairly sure that doesn't affect bitcoin; we've always built leveldb as part of our own build system in |
Oh interesting. I didn't know |
Some of the conflicts can be avoided by reverting the fixes we applied locally #10 |
That one definitely causes some unnecessary conflicts. It seems most of the conflicts are trivial-ish, except some changes in
++<<<<<<< HEAD
+ Status s;
+ if (basename.starts_with("MANIFEST")) {
+ int fd = open(dir.c_str(), O_RDONLY);
+ if (fd < 0) {
+ s = IOError(dir, errno);
+ } else {
+ if (fsync(fd) < 0 && errno != EINVAL) {
+ s = IOError(dir, errno);
+ }
+ close(fd);
+ }
++||||||| merged common ancestors
++ Status s;
++ if (basename.starts_with("MANIFEST")) {
++ int fd = open(dir.c_str(), O_RDONLY);
++ if (fd < 0) {
++ s = IOError(dir, errno);
++ } else {
++ if (fsync(fd) < 0) {
++ s = IOError(dir, errno);
++ }
++ close(fd);
++ }
++=======
+ #endif // HAVE_FULLFSYNC
+
+ #if HAVE_FDATASYNC
+ bool sync_success = ::fdatasync(fd) == 0;
+ #else
+ bool sync_success = ::fsync(fd) == 0;
+ #endif // HAVE_FDATASYNC
+
+ if (sync_success) {
+ return Status::OK();
++>>>>>>> master that code moved to this: Status SyncDirIfManifest() {
Status status;
if (!is_manifest_) {
return status;
}
int fd = ::open(dirname_.c_str(), O_RDONLY | kOpenBaseFlags);
if (fd < 0) {
status = PosixError(dirname_, errno);
} else {
status = SyncFd(fd, dirname_);
::close(fd);
}
return status;
}
++<<<<<<< HEAD
+static int MaxMmaps() {
+ if (mmap_limit >= 0) {
+ return mmap_limit;
+ }
+ // Up to 4096 mmaps for 64-bit binaries; none for smaller pointer sizes.
+ mmap_limit = sizeof(void*) >= 8 ? 4096 : 0;
+ return mmap_limit;
+}
++||||||| merged common ancestors
++static int MaxMmaps() {
++ if (mmap_limit >= 0) {
++ return mmap_limit;
++ }
++ // Up to 1000 mmaps for 64-bit binaries; none for smaller pointer sizes.
++ mmap_limit = sizeof(void*) >= 8 ? 1000 : 0;
++ return mmap_limit;
++}
++=======
+ int MaxMmaps() { return g_mmap_limit; }
++>>>>>>> master found it // Up to 1000 mmap regions for 64-bit binaries; none for 32-bit.
constexpr const int kDefaultMmapLimit = (sizeof(void*) >= 8) ? 1000 : 0;
|
I do not know leveldb's release process. are we sure we want to include those unreleased commits? |
Leveldb's release process is slow. If you really want to wait for these changes to be in a release, it's going to take a long time. |
677fb8e test: Add ubsan surpression for crc32c (Wladimir J. van der Laan) 8e68bb1 build: Disable msvc warning 4722 for leveldb build (Aaron Clauson) be23949 build: MSVC changes for leveldb update (Aaron Clauson) 9ebdf04 build: CRC32C build system integration (Wladimir J. van der Laan) 402252a build: Add LCOV exception for crc32c (Wladimir J. van der Laan) 3a037d0 test: Add crc32c exception to various linters and generation scripts (Wladimir J. van der Laan) 84ff1b2 test: Add crc32c to subtree check linter (Wladimir J. van der Laan) 7cf13a5 doc: Add crc32c subtree to developer notes (Wladimir J. van der Laan) 24d02a9 build: Update build system for new leveldb (Wladimir J. van der Laan) 2e18193 Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388 (Wladimir J. van der Laan) 6648082 Squashed 'src/leveldb/' changes from f545dfa..f8ae182c1e5176d12e816fb2217ae33a5472fdd7 (Wladimir J. van der Laan) Pull request description: This updates leveldb to currently newest upstream commit bitcoin-core/leveldb-subtree@0c40829: - CRC32C hardware acceleration is now an external library [crc32c](https://github.com/google/crc32c). This adds acceleration on ARM, and should be faster on x86 because of using prefetch. It also makes it easy to support similar instruction sets on other platforms in the future. - Thread handling uses C++11, instead of platform specific code. - Native windows environment was added. No need to maintain our own hacky one, anymore. - Upstream now builds using CMake. This doesn't mean we need to use that (phew), but internal configuration changed to a a series of checks, instead of OS profiles. This means the blanket error "Cannot build leveldb for $host. Please file a bug report' is removed. All changes: google/leveldb@a53934a...0c40829 Pretty much all our changes have been subsumed by upstream, so we figured it was cleaner to start over with a new branch from upstream with the still-relevant patches applied: https://github.com/bitcoin-core/leveldb/tree/bitcoin-fork-new There's quite some testing to be done (see below). See bitcoin-core/leveldb-subtree#25 and bitcoin-core/leveldb-subtree#26 for more history and context. TODO: - [x] Subtree `crc32c` - [x] Make linters happy about crc32 subtree - [x] Integrate `crc32c` library into build system - [x] MSVC build system ACKs for top commit: sipa: ACK 677fb8e Tree-SHA512: 37ee92a750e053e924bc4626b12bb3fd81faa9f8c5ebaa343931fee810c45ba05aa6051fdea82535fa351bf2be7297801b98af9469865fc5ead771650a5d6240
677fb8e test: Add ubsan surpression for crc32c (Wladimir J. van der Laan) 8e68bb1 build: Disable msvc warning 4722 for leveldb build (Aaron Clauson) be23949 build: MSVC changes for leveldb update (Aaron Clauson) 9ebdf04 build: CRC32C build system integration (Wladimir J. van der Laan) 402252a build: Add LCOV exception for crc32c (Wladimir J. van der Laan) 3a037d0 test: Add crc32c exception to various linters and generation scripts (Wladimir J. van der Laan) 84ff1b2 test: Add crc32c to subtree check linter (Wladimir J. van der Laan) 7cf13a5 doc: Add crc32c subtree to developer notes (Wladimir J. van der Laan) 24d02a9 build: Update build system for new leveldb (Wladimir J. van der Laan) 2e18193 Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388 (Wladimir J. van der Laan) 6648082 Squashed 'src/leveldb/' changes from f545dfa..f8ae182c1e5176d12e816fb2217ae33a5472fdd7 (Wladimir J. van der Laan) Pull request description: This updates leveldb to currently newest upstream commit bitcoin-core/leveldb-subtree@0c40829: - CRC32C hardware acceleration is now an external library [crc32c](https://github.com/google/crc32c). This adds acceleration on ARM, and should be faster on x86 because of using prefetch. It also makes it easy to support similar instruction sets on other platforms in the future. - Thread handling uses C++11, instead of platform specific code. - Native windows environment was added. No need to maintain our own hacky one, anymore. - Upstream now builds using CMake. This doesn't mean we need to use that (phew), but internal configuration changed to a a series of checks, instead of OS profiles. This means the blanket error "Cannot build leveldb for $host. Please file a bug report' is removed. All changes: google/leveldb@a53934a...0c40829 Pretty much all our changes have been subsumed by upstream, so we figured it was cleaner to start over with a new branch from upstream with the still-relevant patches applied: https://github.com/bitcoin-core/leveldb/tree/bitcoin-fork-new There's quite some testing to be done (see below). See bitcoin-core/leveldb-subtree#25 and bitcoin-core/leveldb-subtree#26 for more history and context. TODO: - [x] Subtree `crc32c` - [x] Make linters happy about crc32 subtree - [x] Integrate `crc32c` library into build system - [x] MSVC build system ACKs for top commit: sipa: ACK 677fb8e Tree-SHA512: 37ee92a750e053e924bc4626b12bb3fd81faa9f8c5ebaa343931fee810c45ba05aa6051fdea82535fa351bf2be7297801b98af9469865fc5ead771650a5d6240
677fb8e test: Add ubsan surpression for crc32c (Wladimir J. van der Laan) 8e68bb1 build: Disable msvc warning 4722 for leveldb build (Aaron Clauson) be23949 build: MSVC changes for leveldb update (Aaron Clauson) 9ebdf04 build: CRC32C build system integration (Wladimir J. van der Laan) 402252a build: Add LCOV exception for crc32c (Wladimir J. van der Laan) 3a037d0 test: Add crc32c exception to various linters and generation scripts (Wladimir J. van der Laan) 84ff1b2 test: Add crc32c to subtree check linter (Wladimir J. van der Laan) 7cf13a5 doc: Add crc32c subtree to developer notes (Wladimir J. van der Laan) 24d02a9 build: Update build system for new leveldb (Wladimir J. van der Laan) 2e18193 Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388 (Wladimir J. van der Laan) 6648082 Squashed 'src/leveldb/' changes from f545dfa..f8ae182c1e5176d12e816fb2217ae33a5472fdd7 (Wladimir J. van der Laan) Pull request description: This updates leveldb to currently newest upstream commit bitcoin-core/leveldb-subtree@0c40829: - CRC32C hardware acceleration is now an external library [crc32c](https://github.com/google/crc32c). This adds acceleration on ARM, and should be faster on x86 because of using prefetch. It also makes it easy to support similar instruction sets on other platforms in the future. - Thread handling uses C++11, instead of platform specific code. - Native windows environment was added. No need to maintain our own hacky one, anymore. - Upstream now builds using CMake. This doesn't mean we need to use that (phew), but internal configuration changed to a a series of checks, instead of OS profiles. This means the blanket error "Cannot build leveldb for $host. Please file a bug report' is removed. All changes: google/leveldb@a53934a...0c40829 Pretty much all our changes have been subsumed by upstream, so we figured it was cleaner to start over with a new branch from upstream with the still-relevant patches applied: https://github.com/bitcoin-core/leveldb/tree/bitcoin-fork-new There's quite some testing to be done (see below). See bitcoin-core/leveldb-subtree#25 and bitcoin-core/leveldb-subtree#26 for more history and context. TODO: - [x] Subtree `crc32c` - [x] Make linters happy about crc32 subtree - [x] Integrate `crc32c` library into build system - [x] MSVC build system ACKs for top commit: sipa: ACK 677fb8e Tree-SHA512: 37ee92a750e053e924bc4626b12bb3fd81faa9f8c5ebaa343931fee810c45ba05aa6051fdea82535fa351bf2be7297801b98af9469865fc5ead771650a5d6240
There have been quite a lot of updates upstream since the last pull from there.
-Wsuggest-override
(build: Enable -Wsuggest-override if available bitcoin/bitcoin#16710) is their C++11 changes: google@28e6d23But I'm sure there's other changes that make sense for us in the mean time
Specifically: google/leveldb@a53934a...master
Unfortunately this is far from a clean merge:
Full list of conflicts
The text was updated successfully, but these errors were encountered: