dannym pushed a commit to branch wip-file-offset-bits-64 in repository guix.
commit 911e33ead1483ee802985453ef2c33e047113049 Author: Danny Milosavljevic <[email protected]> AuthorDate: Tue Sep 29 15:18:37 2020 +0200 gnu: cmake: Explicity declare the _FILE_OFFSET_BITS we want. * gnu/packages/patches/cmake-file-offset-bits-64.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cmake.scm (cmake-minimal)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/cmake.scm | 2 ++ .../patches/cmake-file-offset-bits-64.patch | 34 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/gnu/local.mk b/gnu/local.mk index 33f1b85..c81e930 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -871,6 +871,7 @@ dist_patch_DATA = \ %D%/packages/patches/clisp-remove-failing-test.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-curl-certificates.patch \ + %D%/packages/patches/cmake-file-offset-bits-64.patch \ %D%/packages/patches/coda-use-system-libs.patch \ %D%/packages/patches/collectd-5.11.0-noinstallvar.patch \ %D%/packages/patches/combinatorial-blas-awpm.patch \ diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 03b1ce0..74dea1a 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -256,6 +256,8 @@ and workspaces that can be used in the compiler environment of your choice.") (name "cmake-minimal") (source (origin (inherit (package-source cmake-bootstrap)) + (patches (search-patches "cmake-curl-certificates.patch" + "cmake-file-offset-bits-64.patch")) (snippet (match (origin-snippet (package-source cmake-bootstrap)) ((_ _ exp ...) diff --git a/gnu/packages/patches/cmake-file-offset-bits-64.patch b/gnu/packages/patches/cmake-file-offset-bits-64.patch new file mode 100644 index 0000000..fef369d --- /dev/null +++ b/gnu/packages/patches/cmake-file-offset-bits-64.patch @@ -0,0 +1,34 @@ +From 5b10f96793ab6f3a4ef446d67c09ea91b7898584 Mon Sep 17 00:00:00 2001 +From: Marc Chevrier <[email protected]> +Date: Wed, 23 Sep 2020 18:06:35 +0200 +Subject: [PATCH] Linux: Compile with _FILE_OFFSET_BITS=64 on 32-bit Linux + +To avoid problems accessing filesystem, use 64-bit file offsets when +compilation model is 32-bit. This explicit definition is needed now +that KWSys does not provide LFS settings in its headers anymore. + +Fixes: #20568 +--- + CompileFlags.cmake | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/CompileFlags.cmake b/CompileFlags.cmake +index 053259f47c..1c5f1beca9 100644 +--- a/CompileFlags.cmake ++++ b/CompileFlags.cmake +@@ -53,6 +53,12 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc") + endif() + endif() + ++# Use 64-bit off_t on 32-bit Linux ++if (CMAKE_SYSTEM_NAME STREQUAL "Linux") ++ # ensure 64bit offsets are used for filesystem accesses for 32bit compilation ++ add_definitions(-D_FILE_OFFSET_BITS=64) ++endif() ++ + # Workaround for TOC Overflow on ppc64 + set(bigTocFlag "") + if(CMAKE_SYSTEM_NAME STREQUAL "AIX" AND +-- +GitLab +
