pytorch / executorch

On-device AI across mobile, embedded and edge for PyTorch
https://pytorch.org/executorch/
Other
1.72k stars 293 forks source link

Cannot Build Executorch Runtime WSL2 #1232

Closed HarrySoteriou closed 10 months ago

HarrySoteriou commented 10 months ago

Hello, I am using Ubuntu-22.04.2 LTS on windows10 through wsl2 and I have spend 2 days trying to build the runtime unsuccessfully. Can you please help me out?

Steps 1: (Critical requirements ) sudo apt install g++ sudo apt install clang++ download and run Miniconda3-latest-Linux-x86_64.sh

Steps 2: (clone Executorch repo, sync and init) git clone --branch v0.1.0 https://github.com/pytorch/executorch.git

cd executorch git submodule sync git submodule update --init

Steps 3: (Create and activate conda environent) conda create -yn executorch python=3.10.0 conda activate executorch

Steps 4: (Install the rest of requirements) conda install cmake ./install_requirements.sh

Step 5: (Add flatc to $PATH) export PATH="/home/harry/executorch/third-party/flatbuffers/cmake-out:${PATH}" bash /home/harry/executorch/build/install_flatc.sh

Step 6: (Generate a Sample ExecuTorch program "add.pte") python3 -m examples.portable.scripts.export --model_name="add"

Step 7 : Install zstd for decompression and repeat sync, init and update steps) pip3 install zstd

git submodule sync git submodule update --init ./install_requirements.sh

Step 8: BUILD RUST curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Step 9: INSTALL BUCK2 and decompress it

a) GO TO https://github.com/facebook/buck2/releases/download/2023-07-18/ b) AND CLICK ON buck2-x86_64-unknown-linux-gnu.zst c) then move it from download folder to wsl2 home folder d) zstd -cdq buck2-x86_64-unknown-linux-gnu.zst > /tmp/buck2 && chmod +x /tmp/buck2

Step 10: ADD BUCK2 to your $PATH (HOW?? and how do I remove a wrong one???)

I DID THIS (https://buck2.build/docs/getting_started/) export PATH=$HOME/.cargo/bin:$PATH

but maybe it should be: export PATH=/tmp/buck2:$PATH

Step 11: Build a binary /tmp/buck2 build //examples/portable/executor_runner:executor_runner --show-output

OUTPUT:

Action failed: root//runtime/platform:platform (cxx_compile log.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/__platform__/__objects__/log.cpp.o @buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/__platform__/.cpp.argsfile -c runtime/platform/log.cpp stdout: stderr: In file included from runtime/platform/log.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/platform/buck-headers/executorch/runtime/platform/log.h:16:10: fatal error: 'cstdarg' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/platform:platform_private (cxx_compile target/Posix.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/__platform_private__/__objects__/t ...<omitted>... da68ea2a374/runtime/platform/__platform_private__/.cpp.argsfile -c runtime/platform/target/Posix.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: runtime/platform/target/Posix.cpp:26:10: fatal error: 'chrono' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//runtime/core/portable_type:portable_type (cxx_compile tensor_impl.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/portable_type/__portable_type__/__obje ...<omitted>... ime/core/portable_type/__portable_type__/.cpp.argsfile -c runtime/core/portable_type/tensor_impl.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/core/portable_type/tensor_impl.cpp:9: In file included from ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/portable_type/__portable_type/buck-headers/executorch/runtime/core/portable_type/tensor_impl.h:13: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/core__/buck-headers/executorch/runtime/core/array_ref.h:30:10: fatal error: 'cstdint' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/core/exec_aten/util:tensor_util (cxx_compile tensor_util_portable.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/exec_aten/util/__tensor_util__/__objec ...<omitted>... exec_aten/util/__tensor_util__/.cpp.argsfile -c runtime/core/exec_aten/util/tensor_util_portable.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/core/exec_aten/util/tensor_util_portable.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/exec_aten/util/__tensor_util__/buck-headers/executorch/runtime/core/exec_aten/util/tensor_util.h:11:10: fatal error: 'algorithm' file not found

include

     ^~~~~~~~~~~

1 error generated. Action failed: root//extension/evalue_util:print_evalue (cxx_compile print_evalue.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/extension/evalue_util/__print_evalue__/__objects__/ ...<omitted>... 2a374/extension/evalue_util/__print_evalue__/.cpp.argsfile -c extension/evalue_util/print_evalue.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from extension/evalue_util/print_evalue.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/extension/evalue_util/__print_evalue__/buck-headers/executorch/extension/evalue_util/print_evalue.h:11:10: fatal error: 'ostream' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//kernels/portable/cpu:op_logical_or (cxx_compile op_logical_or.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/kernels/portable/cpu/__op_logical_or__/__objects__/ ...<omitted>... 2a374/kernels/portable/cpu/__op_logical_or__/.cpp.argsfile -c kernels/portable/cpu/op_logical_or.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from kernels/portable/cpu/op_logical_or.cpp:9: In file included from ./buck-out/v2/gen/root/524f8da68ea2a374/kernels/portable/cpu/pattern/pattern/buck-headers/executorch/kernels/portable/cpu/pattern/pattern.h:46: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/core/buck-headers/executorch/runtime/core/function_ref.h:37:10: fatal error: 'cstdint' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/kernel:operator_registry (cxx_compile operator_registry.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/kernel/__operator_registry__/__objects__/op ...<omitted>... 68ea2a374/runtime/kernel/__operator_registry__/.cpp.argsfile -c runtime/kernel/operator_registry.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/kernel/operator_registry.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/kernel/__operator_registry__/buck-headers/executorch/runtime/kernel/operator_registry.h:11:10: fatal error: 'cstring' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/grpc/src/compiler/go_generator.cc) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/grpc/ ...<omitted>... a374/third-party/__flatc__/.cc.argsfile -c third-party/flatbuffers/grpc/src/compiler/go_generator.cc (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/grpc/src/compiler/go_generator.cc:1: ./third-party/flatbuffers/grpc/src/compiler/go_generator.h:6:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//runtime/backend:interface (cxx_compile interface.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/backend/__interface__/__objects__/interface ...<omitted>... n/root/524f8da68ea2a374/runtime/backend/__interface__/.cpp.argsfile -c runtime/backend/interface.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/backend/interface.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/backend/interface/buck-headers/executorch/runtime/backend/interface.h:11:10: fatal error: 'cstring' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/executor/test:test_backend_compiler_lib (cxx_compile test_backend_compiler_lib.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/executor/test/__test_backend_compiler_lib__ ...<omitted>... t/__test_backend_compiler_lib__/.cpp.argsfile -c runtime/executor/test/test_backend_compiler_lib.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/executor/test/test_backend_compiler_lib.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/backend/interface/buck-headers/executorch/runtime/backend/interface.h:11:10: fatal error: 'cstring' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/grpc/src/compiler/cpp_generator.cc) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/grpc/ ...<omitted>... 374/third-party/__flatc__/.cc.argsfile -c third-party/flatbuffers/grpc/src/compiler/cpp_generator.cc (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/grpc/src/compiler/cpp_generator.cc:1: ./third-party/flatbuffers/grpc/src/compiler/cpp_generator.h:8:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//examples/portable/executor_runner:executor_runner_lib (cxx_compile executor_runner.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/examples/portable/executor_runner/__executor_runner ...<omitted>... unner/__executor_runner_lib__/.cpp.argsfile -c examples/portable/executor_runner/executor_runner.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: examples/portable/executor_runner/executor_runner.cpp:20:10: fatal error: 'iostream' file not found

include

     ^~~~~~~~~~

1 error generated. Build ID: 2f13157d-fdac-48d5-a323-fe0da61b2077 Network: Up: 0 B Down: 152 KiB Jobs completed: 833. Time elapsed: 1.2s. Cache hits: 0%. Commands: 22 (cached: 0, remote: 0, local: 22)

mcr229 commented 10 months ago

cc. @larryliu0820

larryliu0820 commented 10 months ago

I'm not sure why you need to build rust? Also you don't need to follow this: https://buck2.build/docs/getting_started/, just download the prebuilt binary from https://github.com/facebook/buck2/releases/download/2023-07-18/ like you did. So in short get rid of step 8 and step 10 is also optional.

Looking at the error it seems like you are building without C++11 support. This is weird because we add -std=c++17 to all C++ library target.

I would recommend start from scratch and install buck2 properly.

HarrySoteriou commented 10 months ago

Repeated steps from the beginning (ignoring step 8 and 10), installed [buck2-x86_64-unknown-linux-gnu.zst] from https://github.com/facebook/buck2/releases/tag/2023-07-18 and this is my error log:

Action failed: root//third-party:flatc_library (cxx_compile flatbuffers/src/reflection.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc_library__/__objects__/flatbuffe ...<omitted>... a68ea2a374/third-party/__flatc_library__/.cpp.argsfile -c third-party/flatbuffers/src/reflection.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/reflection.cpp:17: In file included from ./third-party/flatbuffers/include/flatbuffers/reflection.h:25: In file included from ./third-party/flatbuffers/include/flatbuffers/reflection_generated.h:7: ./third-party/flatbuffers/include/flatbuffers/flatbuffers.h:20:10: fatal error: 'algorithm' file not found

include

     ^~~~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/code_generators.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/c ...<omitted>... f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/code_generators.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/code_generators.cpp:17: ./third-party/flatbuffers/include/flatbuffers/code_generators.h:20:10: fatal error: 'map' file not found

include

     ^~~~~

1 error generated. Action failed: root//third-party:flatc_library (cxx_compile flatbuffers/src/code_generators.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc_library__/__objects__/flatbuffe ...<omitted>... 2a374/third-party/__flatc_library__/.cpp.argsfile -c third-party/flatbuffers/src/code_generators.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/code_generators.cpp:17: ./third-party/flatbuffers/include/flatbuffers/code_generators.h:20:10: fatal error: 'map' file not found

include

     ^~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_binary.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 4f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_binary.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_binary.cpp:19: third-party/flatbuffers/src/idl_gen_binary.h:20:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/file_binary_writer.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/f ...<omitted>... a68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/file_binary_writer.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: third-party/flatbuffers/src/file_binary_writer.cpp:17:10: fatal error: 'fstream' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/file_name_saving_file_manager.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/f ...<omitted>... third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/file_name_saving_file_manager.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: third-party/flatbuffers/src/file_name_saving_file_manager.cpp:17:10: fatal error: 'fstream' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/reflection.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/r ...<omitted>... t/524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/reflection.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/reflection.cpp:17: In file included from ./third-party/flatbuffers/include/flatbuffers/reflection.h:25: In file included from ./third-party/flatbuffers/include/flatbuffers/reflection_generated.h:7: ./third-party/flatbuffers/include/flatbuffers/flatbuffers.h:20:10: fatal error: 'algorithm' file not found

include

     ^~~~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_text.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_text.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_text.cpp:18: In file included from third-party/flatbuffers/src/idl_gen_text.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_fbs.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... /524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_fbs.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_fbs.cpp:18: In file included from third-party/flatbuffers/src/idl_gen_fbs.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/flatc.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/f ...<omitted>... n/root/524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/flatc.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/flatc.cpp:17: ./third-party/flatbuffers/include/flatbuffers/flatc.h:20:10: fatal error: 'functional' file not found

include

     ^~~~~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_rust.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_rust.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_rust.cpp:19: In file included from third-party/flatbuffers/src/idl_gen_rust.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_cpp.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... /524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_cpp.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_cpp.cpp:19: In file included from third-party/flatbuffers/src/idl_gen_cpp.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_csharp.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 4f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_csharp.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_csharp.cpp:19: In file included from third-party/flatbuffers/src/idl_gen_csharp.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_ts.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... t/524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_ts.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_ts.cpp:17: third-party/flatbuffers/src/idl_gen_ts.h:20:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_java.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_java.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_java.cpp:19: In file included from third-party/flatbuffers/src/idl_gen_java.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_lobster.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_lobster.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_lobster.cpp:17: In file included from third-party/flatbuffers/src/idl_gen_lobster.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_php.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... /524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_php.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_php.cpp:19: In file included from third-party/flatbuffers/src/idl_gen_php.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_json_schema.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_json_schema.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_json_schema.cpp:17: third-party/flatbuffers/src/idl_gen_json_schema.h:20:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/flatc_main.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/f ...<omitted>... t/524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/flatc_main.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: third-party/flatbuffers/src/flatc_main.cpp:17:10: fatal error: 'cstdio' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_parser.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... t/524f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_parser.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: third-party/flatbuffers/src/idl_parser.cpp:17:10: fatal error: 'algorithm' file not found

include

     ^~~~~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_swift.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 24f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_swift.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_swift.cpp:17: In file included from third-party/flatbuffers/src/idl_gen_swift.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/idl_gen_kotlin.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/i ...<omitted>... 4f8da68ea2a374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/idl_gen_kotlin.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/idl_gen_kotlin.cpp:19: In file included from third-party/flatbuffers/src/idl_gen_kotlin.h:20: ./third-party/flatbuffers/include/flatbuffers/code_generator.h:20:10: fatal error: 'string' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/grpc/src/compiler/swift_generator.cc) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/grpc/ ...<omitted>... 4/third-party/__flatc__/.cc.argsfile -c third-party/flatbuffers/grpc/src/compiler/swift_generator.cc (runbuck2 log what-failedto get the full command) stdout: stderr: third-party/flatbuffers/grpc/src/compiler/swift_generator.cc:23:10: fatal error: 'map' file not found

include

     ^~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/grpc/src/compiler/ts_generator.cc) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/grpc/ ...<omitted>... a374/third-party/__flatc__/.cc.argsfile -c third-party/flatbuffers/grpc/src/compiler/ts_generator.cc (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/grpc/src/compiler/ts_generator.cc:24: ./third-party/flatbuffers/grpc/src/compiler/ts_generator.h:1:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/src/annotated_binary_text_gen.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/src/a ...<omitted>... 374/third-party/__flatc__/.cpp.argsfile -c third-party/flatbuffers/src/annotated_binary_text_gen.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/src/annotated_binary_text_gen.cpp:1 third-party/flatbuffers/src/annotated_binary_text_gen.h:20:10: fatal error: 'map' file not found

include

     ^~~~~

1 error generated. Action failed: root//third-party:flatc (cxx_compile flatbuffers/grpc/src/compiler/cpp_generator.cc) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/third-party/__flatc__/__objects__/flatbuffers/grpc/ ...<omitted>... 374/third-party/__flatc__/.cc.argsfile -c third-party/flatbuffers/grpc/src/compiler/cpp_generator.cc (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from third-party/flatbuffers/grpc/src/compiler/cpp_generator.cc:1: ./third-party/flatbuffers/grpc/src/compiler/cpp_generator.h:8:10: fatal error: 'memory' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//runtime/platform:platform_private (cxx_compile target/Posix.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/__platform_private__/__objects__/t ...<omitted>... da68ea2a374/runtime/platform/__platform_private__/.cpp.argsfile -c runtime/platform/target/Posix.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: runtime/platform/target/Posix.cpp:26:10: fatal error: 'chrono' file not found

include

     ^~~~~~~~

1 error generated. Action failed: root//runtime/platform:platform (cxx_compile log.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/__platform__/__objects__/log.cpp.o @buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/__platform__/.cpp.argsfile -c runtime/platform/log.cpp stdout: stderr: In file included from runtime/platform/log.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/platform/platform/buck-headers/executorch/runtime/platform/log.h:16:10: fatal error: 'cstdarg' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/core/portable_type:portable_type (cxx_compile tensor_impl.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/portable_type/__portable_type__/__obje ...<omitted>... ime/core/portable_type/__portable_type__/.cpp.argsfile -c runtime/core/portable_type/tensor_impl.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/core/portable_type/tensor_impl.cpp:9: In file included from ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/portable_type/__portable_type/buck-headers/executorch/runtime/core/portable_type/tensor_impl.h:13: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/core__/buck-headers/executorch/runtime/core/array_ref.h:30:10: fatal error: 'cstdint' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/core:evalue (cxx_compile evalue.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/__evalue__/__objects__/evalue.cpp.o @buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/__evalue__/.cpp.argsfile -c runtime/core/evalue.cpp stdout: stderr: In file included from runtime/core/evalue.cpp:9: In file included from ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/evalue/buck-headers/executorch/runtime/core/evalue.h:11: In file included from ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/exec_aten/lib/buck-headers/executorch/runtime/core/exec_aten/exec_aten.h:11: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/core/tensor_shape_dynamism/buck-headers/executorch/runtime/core/tensor_shape_dynamism.h:11:10: fatal error: 'cstdint' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/kernel:operator_registry (cxx_compile operator_registry.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/kernel/__operator_registry__/__objects__/op ...<omitted>... 68ea2a374/runtime/kernel/__operator_registry__/.cpp.argsfile -c runtime/kernel/operator_registry.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/kernel/operator_registry.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/kernel/__operator_registry__/buck-headers/executorch/runtime/kernel/operator_registry.h:11:10: fatal error: 'cstring' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//runtime/executor/test:test_backend_compiler_lib (cxx_compile test_backend_compiler_lib.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/runtime/executor/test/__test_backend_compiler_lib__ ...<omitted>... t/__test_backend_compiler_lib__/.cpp.argsfile -c runtime/executor/test/test_backend_compiler_lib.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: In file included from runtime/executor/test/test_backend_compiler_lib.cpp:9: ./buck-out/v2/gen/root/524f8da68ea2a374/runtime/backend/interface/buck-headers/executorch/runtime/backend/interface.h:11:10: fatal error: 'cstring' file not found

include

     ^~~~~~~~~

1 error generated. Action failed: root//examples/portable/executor_runner:executor_runner_lib (cxx_compile executor_runner.cpp) Local command returned non-zero exit code 1 Reproduce locally: clang++ -o buck-out/v2/gen/root/524f8da68ea2a374/examples/portable/executor_runner/__executor_runner ...<omitted>... unner/__executor_runner_lib__/.cpp.argsfile -c examples/portable/executor_runner/executor_runner.cpp (runbuck2 log what-failedto get the full command) stdout: stderr: examples/portable/executor_runner/executor_runner.cpp:20:10: fatal error: 'iostream' file not found

include

     ^~~~~~~~~~

1 error generated. Build ID: c1eead44-379d-41bb-b0aa-5f9d832f5ce3 Network: Up: 0 B Down: 670 KiB Jobs completed: 831. Time elapsed: 1.9s. Cache hits: 0%. Commands: 45 (cached: 0, remote: 0, local: 45) BUILD FAILED Failed to build 'root//examples/portable/executor_runner:executor_runner_lib (prelude//platforms:default#524f8da68ea2a374)'

HarrySoteriou commented 10 months ago

Maybe flatbuffers are incompatible with g++ or clang++ ?? Or maybe it is trying to use triton to compile but my laptop's GPU is too old for triton (Maxwell architecture Quadro M1200) ?

g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Ubuntu clang version 14.0.0-1ubuntu1.1

:""pip list" produces this attrs 23.1.0 certifi 2023.11.17 charset-normalizer 3.3.2 cmake 3.27.7 exceptiongroup 1.1.3 execnet 2.0.2 executorch 0.1.0 expecttest 0.1.6 filelock 3.13.1 flatbuffers 23.5.26 fsspec 2023.10.0 huggingface-hub 0.17.3 hypothesis 6.89.0 idna 3.4 iniconfig 2.0.0 Jinja2 3.1.2 MarkupSafe 2.1.3 mpmath 1.2.1 networkx 3.0rc1 numpy 1.26.2 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.18.1 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 packaging 23.2 pandas 2.1.3 parameterized 0.9.0 Pillow 9.3.0 pip 23.3 pluggy 1.3.0 pytest 7.4.3 pytest-xdist 3.4.0 python-dateutil 2.8.2 pytz 2023.3.post1 PyYAML 6.0.1 regex 2023.10.3 requests 2.31.0 ruamel.yaml 0.18.5 ruamel.yaml.clib 0.2.8 safetensors 0.4.1rc1 setuptools 68.0.0 six 1.16.0 sortedcontainers 2.4.0 sympy 1.11.1 tabulate 0.9.0 timm 0.6.13 tokenizers 0.14.1 tomli 2.0.1 torch 2.2.0.dev20231010+cpu torchaudio 2.2.0.dev20231010+cpu torchsr 1.0.4 torchvision 0.17.0.dev20231010+cpu tqdm 4.66.1 transformers 4.34.0 triton 2.1.0 typing_extensions 4.8.0 tzdata 2023.3 urllib3 2.1.0 wheel 0.41.2 zstd 1.5.5.1

HarrySoteriou commented 10 months ago

SOLVED: https://askubuntu.com/questions/1449769/clang-cannot-find-iostream