[PATCH] D139752: cmake: Enable 64bit off_t on 32bit glibc systems
Steven Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 14:53:01 PST 2023
srj added a comment.
>> I wonder if this could be a bug in a specific version(s) of CMake? What version(s) have you tried replicating with? Our buildbots are using v3.22.6 (Halide requires a minimum of 3.22).
>
> I am using cmake 3.25.1
I get the same failure when using CMake 25.1 as well (linux x86-64). I can't explain the failure, but it is 100% reproducible for me on x86-64 Linux using CMake 3.25.1. Try these steps to repeat when building from scratch:
$ export LLVM_INSTALL_DIR=path/to/llvm/install/directory
# Build a local 32-bit build of LLVM (with this patch in place)
$ CC='gcc -m32' \
CXX='g++ -m32' \
LD='ld -melf_i386' \
cmake \
-D LLVM_BUILD_32_BITS=ON \
-D CMAKE_FIND_ROOT_PATH=/usr/lib/i386-linux-gnu \
-D CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=${LLVM_INSTALL_DIR} \
-D LLVM_CCACHE_BUILD=ON \
-D LLVM_CCACHE_MAXSIZE=20G \
-D LLVM_BUILD_32_BITS=OFF \
-D LLVM_ENABLE_ASSERTIONS=ON \
-D LLVM_ENABLE_CURL=OFF \
-D LLVM_ENABLE_HTTPLIB=OFF \
-D LLVM_ENABLE_LIBXML2=OFF \
-D LLVM_ENABLE_PROJECTS="clang;lld" \
-D LLVM_ENABLE_RTTI=ON \
-D LLVM_ENABLE_TERMINFO=OFF \
-D LLVM_ENABLE_ZLIB=OFF \
-D LLVM_ENABLE_ZSTD=OFF \
-D LLVM_ENABLE_OCAMLDOC=OFF \
-D LLVM_ENABLE_BINDINGS=OFF \
-D LLVM_ENABLE_IDE=OFF \
-D LLVM_TARGETS_TO_BUILD="X86;ARM;NVPTX;AArch64;PowerPC;Hexagon;WebAssembly;RISCV" \
-S path/to/llvm/source/tree \
-B path/to/llvm/build/directory \
-G Ninja
$ ninja install
# Clone Halide
$ git clone https://github.com/halide/Halide path/to/halide/source
# Build Halide
$ CC='gcc -m32' \
CXX='g++ -m32' \
LD='ld -melf_i386' \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DHalide_CCACHE_BUILD=ON \
-DLLVM_DIR=${LLVM_INSTALL_DIR}/lib/cmake/llvm \
-DWITH_PYTHON_BINDINGS=OFF \
-DHalide_TARGET=x86-32-linux\
-S path/to/halide/source \
-B path/to/halide/build-dir \
-G Ninja
$ ninja Halide
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139752/new/
https://reviews.llvm.org/D139752
More information about the llvm-commits
mailing list