Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not identify the root crate and ESP_IDF_SYS_ROOT_CRATE not specified #279

Closed
ghost opened this issue Jan 29, 2024 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Jan 29, 2024

I'm using workspace and when I want to build one of my binary packages from workspace directory I'll face to these errors:

Compiling xxxxx v0.1.0 (/dc_fw/platforms/esp32/xxxxx)
The following warnings were emitted during compilation:

warning: [email protected]: could not identify the root crate and `ESP_IDF_SYS_ROOT_CRATE` not specified.

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

Caused by:
  process didn't exit successfully: `/dc_fw/target/release/build/esp-idf-sys-ed2a604075017141/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
  cargo:rerun-if-env-changed=MCU
  cargo:rerun-if-env-changed=ESP_IDF_SYS_ROOT_CRATE
  cargo:rerun-if-env-changed=ESP_IDF_VERSION
  cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
  cargo:rerun-if-env-changed=ESP_IDF_CMAKE_GENERATOR
  cargo:rerun-if-env-changed=IDF_PATH
  cargo:rerun-if-env-changed=EXTRA-COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENT_MANAGER
  cargo:warning=could not identify the root crate and `ESP_IDF_SYS_ROOT_CRATE` not specified

  --- stderr
  Build configuration: BuildConfig {
      esp_idf_tools_install_dir: None,
      esp_idf_sdkconfig: None,
      esp_idf_sdkconfig_defaults: None,
      mcu: None,
      native: NativeConfig {
          esp_idf_version: None,
          esp_idf_repository: None,
          esp_idf_cmake_generator: None,
          idf_path: None,
          extra_components: [],
          esp_idf_components: None,
          esp_idf_component_manager: None,
      },
      esp_idf_sys_root_crate: None,
  }
  Error: Unsupported target 'x86_64-unknown-linux-gnu'
make: *** [Makefile:5: Build_xxxxx_ESP] Error 101
make: *** [Makefile:23: cbexxxxx] Error 2

If I won't put this crate to workspace directory everything will work correctly.
I tried to add "export ESP_IDF_SYS_ROOT_CRATE=xxxxx" and getting following errors:

The following warnings were emitted during compilation:

warning: [email protected]: could not read build config from manifest metadata: Matching variant not found

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

Caused by:
  process didn't exit successfully: `/dc_fw/target/release/build/esp-idf-sys-ed2a604075017141/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
  cargo:rerun-if-env-changed=MCU
  cargo:rerun-if-env-changed=ESP_IDF_SYS_ROOT_CRATE
  cargo:rerun-if-env-changed=ESP_IDF_VERSION
  cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
  cargo:rerun-if-env-changed=ESP_IDF_CMAKE_GENERATOR
  cargo:rerun-if-env-changed=IDF_PATH
  cargo:rerun-if-env-changed=EXTRA-COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENT_MANAGER
  cargo:warning=could not read build config from manifest metadata: Matching variant not found

  --- stderr
  Build configuration: BuildConfig {
      esp_idf_tools_install_dir: Some(
          Global,
      ),
      esp_idf_sdkconfig: None,
      esp_idf_sdkconfig_defaults: Some(
          [
              "/dc_fw/platforms/esp32/xxxxx/sdkconfig.defaults",
          ],
      ),
      mcu: None,
      native: NativeConfig {
          esp_idf_version: None,
          esp_idf_repository: None,
          esp_idf_cmake_generator: None,
          idf_path: None,
          extra_components: [],
          esp_idf_components: None,
          esp_idf_component_manager: None,
      },
      esp_idf_sys_root_crate: Some(
          "xxxxx",
      ),
  }
  Error: Unsupported target 'x86_64-unknown-linux-gnu'
@ivmarkov
Copy link
Collaborator

ivmarkov commented Feb 1, 2024

Where is your .cargo/config.toml? I think it must be in the workspace root, and that might be the reason why it fails for you.
As in here: https://github.com/ivmarkov/ruwm/tree/master/.cargo

@ghost
Copy link
Author

ghost commented Feb 2, 2024

Where is your .cargo/config.toml? I think it must be in the workspace root, and that might be the reason why it fails for you. As in here: https://github.com/ivmarkov/ruwm/tree/master/.cargo

yes, thank you, config.toml was problem but one of them. I have multiple platforms on this repository and don't want to put esp32 files on root directory, so I have to change sdkconfig and others path too.

@ghost ghost closed this as completed Feb 2, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Feb 2, 2024
@1cedsoda
Copy link

Where is your .cargo/config.toml? I think it must be in the workspace root, and that might be the reason why it fails for you. As in here: https://github.com/ivmarkov/ruwm/tree/master/.cargo

yes, thank you, config.toml was problem but one of them. I have multiple platforms on this repository and don't want to put esp32 files on root directory, so I have to change sdkconfig and others path too.

Can you explain how you solved this?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants