esp-rs / esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
404 stars 49 forks source link

Fails to build due to esp-idf-sys #16

Closed recmo closed 2 years ago

recmo commented 2 years ago

Empty project using cargo-generate.

cargo build
   Compiling esp-idf-sys v0.30.6
error: failed to run custom build command for `esp-idf-sys v0.30.6`

Caused by:
  process didn't exit successfully: `/Users/remco/WV/esp32c3/esp32c3-test/target/debug/build/esp-idf-sys-e5d7a772d4b05ce4/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
  cargo:rerun-if-env-changed=ESP_IDF_VERSION
  cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
  cargo:rerun-if-env-changed=MCU
  IDF_PYTHON_ENV_PATH=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env
  PATH=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/cmake/3.20.3/CMake.app/Contents/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/ninja/1.10.2/:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/esp-idf-master/tools:$PATH
  Skipping riscv32-esp-elf@esp-2021r2-patch3-8.4.0 (already installed)
  Skipping ninja@1.10.2 (already installed)
  IDF_PYTHON_ENV_PATH=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env
  PATH=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/cmake/3.20.3/CMake.app/Contents/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/ninja/1.10.2/:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/esp-idf-master/tools:$PATH
  Skipping cmake@3.20.3 (already installed)
  IDF_PYTHON_ENV_PATH=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env
  PATH=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/cmake/3.20.3/CMake.app/Contents/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env/bin:/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/esp-idf-master/tools:$PATH
  cargo:rerun-if-changed=/Users/remco/WV/esp32c3/esp32c3-test/sdkconfig.defaults
  CMAKE_PREFIX_PATH_riscv32imc-esp-espidf = None
  CMAKE_PREFIX_PATH_riscv32imc_esp_espidf = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_riscv32imc-esp-espidf = None
  CMAKE_riscv32imc_esp_espidf = None
  TARGET_CMAKE = None
  CMAKE = None
  running: "cmake" "/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out" "-G" "Ninja" "-DCMAKE_TOOLCHAIN_FILE=/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/esp-idf-master/tools/cmake/toolchain-esp32c3.cmake" "-DCMAKE_BUILD_TYPE=" "-DCMAKE_INSTALL_PREFIX=/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out" "-DCMAKE_C_FLAGS= -march=rv32imc -ffunction-sections -fdata-sections -march=rv32imc -mabi=ilp32 -mcmodel=medany" "-DCMAKE_CXX_FLAGS= -march=rv32imc -ffunction-sections -fdata-sections -march=rv32imc -mabi=ilp32 -mcmodel=medany" "-DCMAKE_ASM_FLAGS=  -ffunction-sections -fdata-sections -march=rv32imc -mabi=ilp32 -mcmodel=medany"
  -- Checking Python dependencies...
  Python requirements are satisfied.
  Skipping the download of /Users/remco/.espressif/espidf.constraints.v5.0.txt because it was downloaded recently. If you believe that this is causing you trouble then remove it manually and re-run your install script.
  Constraint file: /Users/remco/.espressif/espidf.constraints.v5.0.txt
  Requirement files:
   - /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/esp-idf-master/tools/requirements/requirements.core.txt
  Python being checked: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/python_env/idf5.0_py3.9_env/bin/python
  -- Project sdkconfig file /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/sdkconfig
  Loading defaults file /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/gen-sdkconfig.defaults...
  Loading defaults file /Users/remco/WV/esp32c3/esp32c3-test/sdkconfig.defaults...
  -- Configuring incomplete, errors occurred!
  See also "/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CMakeOutput.log".
  See also "/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CMakeError.log".

  --- stderr
  CMake Error at /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/esp-idf-master/CMakeLists.txt:226 (message):
    Failed to determine sizeof(time_t)

  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /Users/remco/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
recmo commented 2 years ago

CMakeError.log:

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc 
Build flags: -march=rv32imc;;-ffunction-sections;-fdata-sections;-mabi=ilp32;-mcmodel=medany
Id flags:  

The output was:
1
/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../libexec/gcc/riscv32-esp-elf/8.4.0/liblto_plugin.so: error loading plugin: dlopen(/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../libexec/gcc/riscv32-esp-elf/8.4.0/liblto_plugin.so, 0x0002): Library not loaded: /opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/libstdc++.6.dylib
  Referenced from: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/libexec/gcc/riscv32-esp-elf/8.4.0/liblto_plugin.0.so
  Reason: tried: '/opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/libstdc++.6.dylib' (no such file), '/Users/remco/WV/esp32c3/esp32c3-test/target/debug/deps/libstdc++.6.dylib' (no such file), '/Users/remco/WV/esp32c3/esp32c3-test/target/debug/libstdc++.6.dylib' (no such file), '/Users/remco/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/libstdc++.6.dylib' (no such file), '/Users/remco/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/libstdc++.6.dylib' (no such file), '/Users/remco/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/libstdc++.6.dylib' (no such file), '/usr/local/opt/openssl/lib/libstdc++.6.dylib' (no such file), '/libstdc++.6.dylib' (no such file), '/Users/remco/WV/esp32c3/esp32c3-test/target/debug/build/ring-9ab5bf82c8a3f3c5/out/libstdc++.6.dylib' (no such file)
collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++ 
Build flags: -march=rv32imc;;-ffunction-sections;-fdata-sections;-mabi=ilp32;-mcmodel=medany
Id flags:  

The output was:
1
/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../libexec/gcc/riscv32-esp-elf/8.4.0/liblto_plugin.so: error loading plugin: dlopen(/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../libexec/gcc/riscv32-esp-elf/8.4.0/liblto_plugin.so, 0x0002): Library not loaded: /opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/libstdc++.6.dylib
  Referenced from: /Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/libexec/gcc/riscv32-esp-elf/8.4.0/liblto_plugin.0.so
  Reason: tried: '/opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/libstdc++.6.dylib' (no such file), '/Users/remco/WV/esp32c3/esp32c3-test/target/debug/deps/libstdc++.6.dylib' (no such file), '/Users/remco/WV/esp32c3/esp32c3-test/target/debug/libstdc++.6.dylib' (no such file), '/Users/remco/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/libstdc++.6.dylib' (no such file), '/Users/remco/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/libstdc++.6.dylib' (no such file), '/Users/remco/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/libstdc++.6.dylib' (no such file), '/usr/local/opt/openssl/lib/libstdc++.6.dylib' (no such file), '/libstdc++.6.dylib' (no such file), '/Users/remco/WV/esp32c3/esp32c3-test/target/debug/build/ring-9ab5bf82c8a3f3c5/out/libstdc++.6.dylib' (no such file)
collect2: error: ld returned 1 exit status

Determining if the include file sys/types.h exists failed with the following output:
Change Dir: /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/ninja/1.10.2/ninja cmTC_e8fd7 && [1/2] Building C object CMakeFiles/cmTC_e8fd7.dir/CheckIncludeFile.c.obj
FAILED: CMakeFiles/cmTC_e8fd7.dir/CheckIncludeFile.c.obj 
/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc   -march=rv32imc  -ffunction-sections -fdata-sections -mabi=ilp32 -mcmodel=medany -o CMakeFiles/cmTC_e8fd7.dir/CheckIncludeFile.c.obj -c CheckIncludeFile.c
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:75,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:837:2: error: #error Unsupported architecture
 #error Unsupported architecture
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:78,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/types.h:39:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:79,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:79,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_dev_t;         /* dev_t */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
 typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
 typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
         ^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
 typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
         ^~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:81,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/endian.h:39:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:95:9: error: unknown type name 'u_int64_t'
 typedef u_int64_t               u_quad_t;       /* quads */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:96:9: error: unknown type name 'int64_t'
 typedef int64_t                 quad_t;
         ^~~~~~~
In file included from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:101:9: error: unknown type name 'int32_t'
 typedef int32_t                 daddr_t;        /* disk address */
         ^~~~~~~
In file included from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:105:9: error: unknown type name 'u_int32_t'
 typedef u_int32_t               fixpt_t;        /* fixed point number */
         ^~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:110,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h:31:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      in_addr_t;      /* base type for internet address */
         ^~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:111,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h:31:9: error: unknown type name '__uint16_t'
 typedef __uint16_t              in_port_t;
         ^~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:118,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h:31:9: error: unknown type name '__int32_t'
 typedef __int32_t        key_t;         /* IPC key (for Sys V IPC) */
         ^~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:120,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h:31:9: error: unknown type name '__uint16_t'
 typedef __uint16_t        nlink_t;      /* link count */
         ^~~~~~~~~~
In file included from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:125:9: error: unknown type name 'int32_t'
 typedef int32_t                 segsz_t;        /* segment size */
         ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:126:9: error: unknown type name 'int32_t'
 typedef int32_t                 swblk_t;        /* swap offset */
         ^~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:165,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h:31:9: error: unknown type name '__darwin_clock_t'
 typedef __darwin_clock_t        clock_t;
         ^~~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:166,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
 typedef __darwin_size_t        size_t;
         ^~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:167,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h:31:9: error: unknown type name '__darwin_ssize_t'
 typedef __darwin_ssize_t        ssize_t;
         ^~~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:168,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h:31:9: error: unknown type name '__darwin_time_t'
 typedef __darwin_time_t         time_t;
         ^~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:174,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h:31:9: error: unknown type name '__darwin_size_t'
 typedef __darwin_size_t        rsize_t;
         ^~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:184,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:51:2: error: unknown type name '__int32_t'
  __int32_t       fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];
  ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:46:41: error: '__int32_t' undeclared here (not in a function); did you mean '__int128'?
 #define __DARWIN_NFDBITS        (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */
                                         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:47:43: note: in definition of macro '__DARWIN_howmany'
 #define __DARWIN_howmany(x, y)  ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */
                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:51:65: note: in expansion of macro '__DARWIN_NFDBITS'
  __int32_t       fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];
                                                                 ^~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: In function '__darwin_check_fd_set':
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:64:7: error: 'uintptr_t' undeclared (first use in this function); did you mean 'in_port_t'?
  if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
       ^~~~~~~~~
       in_port_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:64:7: note: each undeclared identifier is reported only once for each function it appears in
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:64:63: error: expected ')' before numeric constant
  if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
     ~                                                         ^~
                                                               )
In file included from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h: At top level:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:189:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fd_mask'
 typedef __int32_t       fd_mask;
                         ^~~~~~~
ninja: build stopped: subcommand failed.

Determining if the include file stdint.h exists failed with the following output:
Change Dir: /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/ninja/1.10.2/ninja cmTC_95dd1 && [1/2] Building C object CMakeFiles/cmTC_95dd1.dir/CheckIncludeFile.c.obj
FAILED: CMakeFiles/cmTC_95dd1.dir/CheckIncludeFile.c.obj 
/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc   -march=rv32imc  -ffunction-sections -fdata-sections -mabi=ilp32 -mcmodel=medany -o CMakeFiles/cmTC_95dd1.dir/CheckIncludeFile.c.obj -c CheckIncludeFile.c
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:52,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:837:2: error: #error Unsupported architecture
 #error Unsupported architecture
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:52,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:52,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_dev_t;         /* dev_t */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
 typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
 typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
         ^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
 typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
         ^~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h:30,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:53,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/types.h:39:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:53,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t'
 typedef __darwin_intptr_t       intptr_t;
         ^~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Determining if the include file stddef.h exists failed with the following output:
Change Dir: /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/ninja/1.10.2/ninja cmTC_96d8c && [1/2] Building C object CMakeFiles/cmTC_96d8c.dir/CheckIncludeFile.c.obj
FAILED: CMakeFiles/cmTC_96d8c.dir/CheckIncludeFile.c.obj 
/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc   -march=rv32imc  -ffunction-sections -fdata-sections -mabi=ilp32 -mcmodel=medany -o CMakeFiles/cmTC_96d8c.dir/CheckIncludeFile.c.obj -c CheckIncludeFile.c
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types.h:27,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:64,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:837:2: error: #error Unsupported architecture
 #error Unsupported architecture
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types.h:27,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:64,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types.h:27,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:64,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_dev_t;         /* dev_t */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
 typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
 typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
         ^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
 typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
 typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
         ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
         ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
 typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
         ^~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:31,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:69,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/types.h:39:2: error: #error architecture not supported
 #error architecture not supported
  ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:69,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:32:9: error: unknown type name '__darwin_ptrdiff_t'
 typedef __darwin_ptrdiff_t ptrdiff_t;
         ^~~~~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:72,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h:31:9: error: unknown type name '__darwin_size_t'
 typedef __darwin_size_t        rsize_t;
         ^~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:77,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
 typedef __darwin_size_t        size_t;
         ^~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:79,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h:34:9: error: unknown type name '__darwin_wchar_t'
 typedef __darwin_wchar_t wchar_t;
         ^~~~~~~~~~~~~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stddef.h:82,
                 from CheckIncludeFile.c:1:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_wint_t.h:32:9: error: unknown type name '__darwin_wint_t'
 typedef __darwin_wint_t wint_t;
         ^~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Determining size of time_t failed with the following output:
Change Dir: /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CMakeTmp

Run Build Command(s):/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/ninja/1.10.2/ninja cmTC_6ca70 && [1/2] Building C object CMakeFiles/cmTC_6ca70.dir/TIME_T_SIZE.c.obj
FAILED: CMakeFiles/cmTC_6ca70.dir/TIME_T_SIZE.c.obj 
/Users/remco/WV/esp32c3/esp32c3-test/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc   -march=rv32imc  -ffunction-sections -fdata-sections -mabi=ilp32 -mcmodel=medany -o CMakeFiles/cmTC_6ca70.dir/TIME_T_SIZE.c.obj -c /Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CheckTypeSize/TIME_T_SIZE.c
/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CheckTypeSize/TIME_T_SIZE.c:24:22: error: 'time_t' undeclared here (not in a function)
 #define SIZE (sizeof(time_t))
                      ^~~~~~
/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CheckTypeSize/TIME_T_SIZE.c:26:12: note: in expansion of macro 'SIZE'
   ('0' + ((SIZE / 10000)%10)),
            ^~~~
ninja: build stopped: subcommand failed.

/Users/remco/WV/esp32c3/esp32c3-test/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-2f34b9498a53221f/out/build/CMakeFiles/CheckTypeSize/TIME_T_SIZE.c:

#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__PPC64__)
# define KEY '_','_','P','P','C','6','4','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#elif defined(__PPC__)
# define KEY '_','_','P','P','C','_','_'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__aarch64__)
# define KEY '_','_','a','a','r','c','h','6','4','_','_'
#elif defined(__ARM_ARCH_7A__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_'
#elif defined(__ARM_ARCH_7S__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_'
#endif

#define SIZE (sizeof(time_t))
static char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
  ('0' + ((SIZE / 10000)%10)),
  ('0' + ((SIZE / 1000)%10)),
  ('0' + ((SIZE / 100)%10)),
  ('0' + ((SIZE / 10)%10)),
  ('0' +  (SIZE    % 10)),
  ']',
#ifdef KEY
  ' ','k','e','y','[', KEY, ']',
#endif
  '\0'};

#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
  int require = 0;
  require += info_size[argc];
  (void)argv;
  return require;
}
MabezDev commented 2 years ago

v5.0 of esp-idf is not officially released (master is currently 5.0-dev), hence issues like this can be expected. Easier way to sort this would be to use the latest stable v4.4 release.