[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 Dec 19 16:34:42 PST 2022
srj added a comment.
This change seems to have injected a failure into Halide builds on 32-bit Linux: we now fail with `<command-line>:0:70: error: token "=" is not valid in preprocessor expressions`; examination of our CMake-based build command line shows that it is something like:
cmake -E env CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines /usr/bin/ccache /usr/bin/g++-7 -m32 -DHALIDE_ENABLE_RTTI -DHALIDE_WITH_EXCEPTIONS -DHalide_EXPORTS -DLLVM_VERSION=160 -DWITH_AARCH64 -DWITH_ARM -DWITH_D3D12 -DWITH_HEXAGON -DWITH_INTROSPECTION -DWITH_METAL -DWITH_MIPS -DWITH_NVPTX -DWITH_OPENCL -DWITH_OPENGLCOMPUTE -DWITH_POWERPC -DWITH_RISCV -DWITH_WABT -DWITH_WEBASSEMBLY -DWITH_X86 -D_GNU_SOURCE -D_FILE_OFFSET_BITS="64 -D_DEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" -I/home/halidenightly/build_bot/worker/llvm-16-x86-32-linux/llvm-install/include -isystem /home/halidenightly/build_bot/worker/halide-testbranch-main-llvm16-x86-32-linux-cmake/halide-build/_deps/wabt-src/include -isystem /home/halidenightly/build_bot/worker/halide-testbranch-main-llvm16-x86-32-linux-cmake/halide-build/_deps/wabt-build/include -O3 -DNDEBUG -fPIC -Wall -Wcast-qual -Wignored-qualifiers -Woverloaded-virtual -Wsuggest-override -Wdeprecated-declarations -Wno-double-promotion -Wno-float-conversion -Wno-float-equal -Wno-missing-field-initializers -Wno-old-style-cast -Wno-shadow -Wno-sign-conversion -Wno-switch-enum -Wno-undef -Wno-unused-function -Wno-unused-macros -Wno-unused-parameter -pthread -std=c++1z -MD -MT src/CMakeFiles/Halide.dir/AddParameterChecks.cpp.o -MF src/CMakeFiles/Halide.dir/AddParameterChecks.cpp.o.d -o src/CMakeFiles/Halide.dir/AddParameterChecks.cpp.o -c /home/halidenightly/build_bot/worker/halide-testbranch-main-llvm16-x86-32-linux-cmake/halide-source/src/AddParameterChecks.cpp
Look closely at the `_FILE_OFFSET_BITS` section:
**-D_FILE_OFFSET_BITS=**"//64 -D_DEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS//"
...I'm not sure how or why we're getting this bizarre failure, but, uh, this is pretty bizarre. Has this been tested with a project that also uses CMake?
(FYI, I can repeat this running cmake 3.24.2 on x86-64 linux)
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