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

cargo check fails in cxx demo if CARGO_TARGET_DIR is set #2335

Open
fw-immunant opened this issue Aug 30, 2024 · 0 comments
Open

cargo check fails in cxx demo if CARGO_TARGET_DIR is set #2335

fw-immunant opened this issue Aug 30, 2024 · 0 comments

Comments

@fw-immunant
Copy link
Collaborator

I get an error that looks like this:

  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/include" "-I" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/crate" "-I" "." "-I" "../../../target/cxxbridge/demo/src" "-Wall" "-Wextra" "-std=c++14" "-o" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/a9655d8c113f2a3f-main.rs.o" "-c" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/sources/demo/src/main.rs.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/include" "-I" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/crate" "-I" "." "-I" "../../../target/cxxbridge/demo/src" "-Wall" "-Wextra" "-std=c++14" "-o" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/src/blobstore.o" "-c" "src/blobstore.cc"
  cargo:warning=src/blobstore.cc:2:10: fatal error: main.rs.h: No such file or directory

  cargo:warning=    2 | #include "main.rs.h"

  cargo:warning=      |          ^~~~~~~~~~~

  cargo:warning=compilation terminated.

  exit status: 1

  --- stderr

  CXX include path:
    /var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/include
    /var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/crate


  error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/include" "-I" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/cxxbridge/crate" "-I" "." "-I" "../../../target/cxxbridge/demo/src" "-Wall" "-Wextra" "-std=c++14" "-o" "/var/cache/cargo/target/release/build/demo-4ab9609d61ec3bdd/out/src/blobstore.o" "-c" "src/blobstore.cc" with args "c++" did not execute successfully (status code exit status: 1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant