Public bug reported:
pytorch 2.1.2+dfsg-4 fails to build from source with llvm 18:
```
[957/1892] /usr/bin/c++ -DAT_PER_OPERATOR_HEADERS -DCAFFE2_BUILD_MAIN_LIB
-DFMT_HEADER_ONLY=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1
-DHAVE_SHM_UNLINK=1 -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
-DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DTORCH_ENABLE_LLVM
-DUSE_C10D_GLOO -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC
-DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS
-I/<<PKGBUILDDIR>>/build/aten/src -I/<<PKGBUILDDIR>>/aten/src
-I/<<PKGBUILDDIR>>/build -I/<<PKGBUILDDIR>>
-I/<<PKGBUILDDIR>>/cmake/../third_party/benchmark/include
-I/usr/lib/llvm-18/include -I/<<PKGBUILDDIR>>/debian/foxi
-I/<<PKGBUILDDIR>>/build/debian/foxi -I/<<PKGBUILDDIR>>/torch/csrc/api
-I/<<PKGBUILDDIR>>/torch/csrc/api/include -I/<<PKGBUILDDIR>>/caffe2/aten/src/TH
-I/<<PKGBUILDDIR>>/build/caffe2/aten/src/TH
-I/<<PKGBUILDDIR>>/build/caffe2/aten/src
-I/<<PKGBUILDDIR>>/build/caffe2/../aten/src -I/<<PKGBUILDDIR>>/torch/csrc
-I/<<PKGBUILDDIR>>/third_party/miniz-2.1.0
-I/<<PKGBUILDDIR>>/debian/kineto/libkineto/include
-I/<<PKGBUILDDIR>>/debian/kineto/libkineto/src
-I/<<PKGBUILDDIR>>/aten/src/ATen/.. -I/<<PKGBUILDDIR>>/c10/..
-I/<<PKGBUILDDIR>>/aten/src/ATen/native/quantized/cpu/qnnpack/include
-I/<<PKGBUILDDIR>>/aten/src/ATen/native/quantized/cpu/qnnpack/src
-I/<<PKGBUILDDIR>>/aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/include
-I/<<PKGBUILDDIR>>/third_party/flatbuffers/include -isystem
/<<PKGBUILDDIR>>/build/third_party/gloo -isystem
/<<PKGBUILDDIR>>/cmake/../third_party/gloo -isystem
/<<PKGBUILDDIR>>/cmake/../third_party/googletest/googlemock/include -isystem
/<<PKGBUILDDIR>>/cmake/../third_party/googletest/googletest/include -isystem
/usr/include/opencv4 -isystem /usr/include/eigen3 -isystem
/<<PKGBUILDDIR>>/caffe2 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
-fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/pytorch-2.1.2+dfsg-4 -gsplit-dwarf
-Wno-dangling-reference -I/usr -D_GLIBCXX_USE_CXX11_ABI=1
-fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DUSE_KINETO -DLIBKINETO_NOCUPTI
-DLIBKINETO_NOROCTRACER -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK
-DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type
-Werror=non-virtual-dtor -Werror=range-loop-construct -Werror=bool-operation
-Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds
-Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function
-Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing
-Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast
-Wno-invalid-partial-specialization -Wno-unused-private-field
-Wno-aligned-allocation-unavailable -Wno-missing-braces
-fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable
-Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format
-Werror=cast-function-type -Wno-stringop-overflow -DHAVE_AVX512_CPU_DEFINITION
-DHAVE_AVX2_CPU_DEFINITION -O2 -g -DNDEBUG -std=gnu++17 -fPIC -DCAFFE2_USE_GLOO
-DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
-Wno-unused-result -Wno-missing-field-initializers -Wno-unknown-pragmas
-Wno-type-limits -Wno-array-bounds -Wno-strict-overflow -Wno-strict-aliasing
-Wno-missing-braces -Wno-maybe-uninitialized -fvisibility=hidden -O2 -fopenmp
-Wno-init-list-lifetime -MD -MT
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o
-MF
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o.d
-o
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o
-c /<<PKGBUILDDIR>>/torch/csrc/jit/tensorexpr/llvm_codegen.cpp
FAILED:
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o
/usr/bin/c++ -DAT_PER_OPERATOR_HEADERS -DCAFFE2_BUILD_MAIN_LIB
-DFMT_HEADER_ONLY=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1
-DHAVE_SHM_UNLINK=1 -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
-DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DTORCH_ENABLE_LLVM
-DUSE_C10D_GLOO -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DUSE_RPC
-DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS
-I/<<PKGBUILDDIR>>/build/aten/src -I/<<PKGBUILDDIR>>/aten/src
-I/<<PKGBUILDDIR>>/build -I/<<PKGBUILDDIR>>
-I/<<PKGBUILDDIR>>/cmake/../third_party/benchmark/include
-I/usr/lib/llvm-18/include -I/<<PKGBUILDDIR>>/debian/foxi
-I/<<PKGBUILDDIR>>/build/debian/foxi -I/<<PKGBUILDDIR>>/torch/csrc/api
-I/<<PKGBUILDDIR>>/torch/csrc/api/include -I/<<PKGBUILDDIR>>/caffe2/aten/src/TH
-I/<<PKGBUILDDIR>>/build/caffe2/aten/src/TH
-I/<<PKGBUILDDIR>>/build/caffe2/aten/src
-I/<<PKGBUILDDIR>>/build/caffe2/../aten/src -I/<<PKGBUILDDIR>>/torch/csrc
-I/<<PKGBUILDDIR>>/third_party/miniz-2.1.0
-I/<<PKGBUILDDIR>>/debian/kineto/libkineto/include
-I/<<PKGBUILDDIR>>/debian/kineto/libkineto/src
-I/<<PKGBUILDDIR>>/aten/src/ATen/.. -I/<<PKGBUILDDIR>>/c10/..
-I/<<PKGBUILDDIR>>/aten/src/ATen/native/quantized/cpu/qnnpack/include
-I/<<PKGBUILDDIR>>/aten/src/ATen/native/quantized/cpu/qnnpack/src
-I/<<PKGBUILDDIR>>/aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/include
-I/<<PKGBUILDDIR>>/third_party/flatbuffers/include -isystem
/<<PKGBUILDDIR>>/build/third_party/gloo -isystem
/<<PKGBUILDDIR>>/cmake/../third_party/gloo -isystem
/<<PKGBUILDDIR>>/cmake/../third_party/googletest/googlemock/include -isystem
/<<PKGBUILDDIR>>/cmake/../third_party/googletest/googletest/include -isystem
/usr/include/opencv4 -isystem /usr/include/eigen3 -isystem
/<<PKGBUILDDIR>>/caffe2 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
-fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/pytorch-2.1.2+dfsg-4 -gsplit-dwarf
-Wno-dangling-reference -I/usr -D_GLIBCXX_USE_CXX11_ABI=1
-fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DUSE_KINETO -DLIBKINETO_NOCUPTI
-DLIBKINETO_NOROCTRACER -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK
-DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type
-Werror=non-virtual-dtor -Werror=range-loop-construct -Werror=bool-operation
-Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds
-Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function
-Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing
-Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast
-Wno-invalid-partial-specialization -Wno-unused-private-field
-Wno-aligned-allocation-unavailable -Wno-missing-braces
-fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable
-Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format
-Werror=cast-function-type -Wno-stringop-overflow -DHAVE_AVX512_CPU_DEFINITION
-DHAVE_AVX2_CPU_DEFINITION -O2 -g -DNDEBUG -std=gnu++17 -fPIC -DCAFFE2_USE_GLOO
-DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function
-Wno-unused-result -Wno-missing-field-initializers -Wno-unknown-pragmas
-Wno-type-limits -Wno-array-bounds -Wno-strict-overflow -Wno-strict-aliasing
-Wno-missing-braces -Wno-maybe-uninitialized -fvisibility=hidden -O2 -fopenmp
-Wno-init-list-lifetime -MD -MT
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o
-MF
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o.d
-o
caffe2/CMakeFiles/torch_cpu.dir/__/torch/csrc/jit/tensorexpr/llvm_codegen.cpp.o
-c /<<PKGBUILDDIR>>/torch/csrc/jit/tensorexpr/llvm_codegen.cpp
/<<PKGBUILDDIR>>/torch/csrc/jit/tensorexpr/llvm_codegen.cpp:37:10: fatal error:
llvm/Support/Host.h: No such file or directory
37 | #include <llvm/Support/Host.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
```
Full log: https://launchpadlibrarian.net/732495262/buildlog_ubuntu-
oracular-amd64.pytorch_2.1.2+dfsg-4_BUILDING.txt.gz
llvm-dev pulls in llvm 18 and
/usr/include/llvm-$version/llvm/Support/Host.h is gone in that llvm
version.
** Affects: pytorch (Ubuntu)
Importance: Undecided
Status: New
** Tags: ftbfs update-excuse
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2067720
Title:
pytorch 2.1.2+dfsg-4 FTBFS with llvm 18
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pytorch/+bug/2067720/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs