Fix build failure with GCC 11: ------ [...] /tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:60:51: error: ‘this’ pointer is null [-Werror=nonnull] 60 | os << "width=" << packedImg->getWidth() << ", "; | ^ /tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:274:10: note: in a call to non-static member function ‘long int OpenColorIO::v1::PackedImageDesc::getWidth() const’ 274 | long PackedImageDesc::getWidth() const | ^~~~~~~~~~~~~~~ /tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:61:53: error: ‘this’ pointer is null [-Werror=nonnull] 61 | os << "height=" << packedImg->getHeight() << ", "; | ^ /tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:279:10: note: in a call to non-static member function ‘long int OpenColorIO::v1::PackedImageDesc::getHeight() const’ 279 | long PackedImageDesc::getHeight() const | ^~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors [...] ------ Patch copied from Gentoo: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e726d850502018b6760da78dbd4a419603016b8 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 1eb691b6..cff9bd83 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -23,8 +23,6 @@ if(WIN32) if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX") endif() -else() - set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror") endif() # SHARED
path: root/nix/libstore/local-store.hh
AgeCommit message (Expand)Author
2021-11-16daemon: Do not deduplicate files smaller than 8 KiB....Files smaller than 8 KiB typically represent ~70% of the entries in /gnu/store/.links but only contribute to ~4% of the space savings afforded by deduplication. Not considering these files for deduplication speeds up file insertion in the store and, more importantly, leaves 'removeUnusedLinks' with fewer entries to traverse, thereby speeding it up proportionally. Partly fixes <https://issues.guix.gnu.org/24937>. * config-daemon.ac: Remove symlink hard link check and CAN_LINK_SYMLINK definition. * guix/store/deduplication.scm (%deduplication-minimum-size): New variable. (deduplicate)[loop]: Do not recurse when FILE's size is below %DEDUPLICATION-MINIMUM-SIZE. (dump-port): New procedure. (dump-file/deduplicate)[hash]: Turn into... [dump-and-compute-hash]: ... this thunk. Call 'deduplicate' only when SIZE is greater than %DEDUPLICATION-MINIMUM-SIZE; otherwise call 'dump-port'. * nix/libstore/gc.cc (LocalStore::removeUnusedLinks): Drop files where st.st_size < deduplicationMinSize. * nix/libstore/local-store.hh (deduplicationMinSize): New declaration. * nix/libstore/optimise-store.cc (deduplicationMinSize): New variable. (LocalStore::optimisePath_): Return when PATH is a symlink or smaller than 'deduplicationMinSize'. * tests/derivations.scm ("identical files are deduplicated"): Produce files bigger than %DEDUPLICATION-MINIMUM-SIZE. * tests/nar.scm ("restore-file-set with directories (signed, valid)"): Likewise. * tests/store-deduplication.scm ("deduplicate, below %deduplication-minimum-size"): New test. ("deduplicate", "deduplicate, ENOSPC"): Produce files bigger than %DEDUPLICATION-MINIMUM-SIZE. * tests/store.scm ("substitute, deduplication"): Likewise. Ludovic Courtès