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

Upgrade to cxx-1.0.103 failing our builds #1260

Closed
kndsatya opened this issue Aug 19, 2023 · 4 comments
Closed

Upgrade to cxx-1.0.103 failing our builds #1260

kndsatya opened this issue Aug 19, 2023 · 4 comments

Comments

@kndsatya
Copy link

Hi,

We started to see from cxx-1.0.103 is failing our build with the error:

cargo:warning=/workplace/nagkota/FaissIndex/src/FaissIndex/build/private/cargo-target/debug/build/faiss-index-4a7468c3273f1ccb/out/cxxbridge/sources/faiss-index/src/lib.rs.cc:1:10: fatal error: faiss-index/include/ukko_faiss.h: No such file or directory

exit status: 1

  --- stderr

  CXX include path:
    /workplace/nagkota/FaissIndex/src/FaissIndex/build/private/cargo-target/debug/build/faiss-index-4a7468c3273f1ccb/out/cxxbridge/include

    /workplace/nagkota/FaissIndex/src/FaissIndex/build/private/cargo-target/debug/build/faiss-index-4a7468c3273f1ccb/out/cxxbridge/crate

I checked both of the cxx include paths mentioned in the error. I confirm that the file ukko_faiss.h doesn't exist. But if I use cxx-1.0.102 it exists. To give a picture of how our source code looks like:

--include
         --ukko_faiss.h
--src
        --lib.rs
        --ukko_faiss.cc
--tests
--cargo.toml
--build.rs

Difference I observe between 1.0.102 and 1.0.103 is that when I build the code my entire code i.e. all the directories in the from the root folder of the project i.e. include, src and tests are being copied in the older versions where as in 1.0.103 I don't see any of those files.

I observed this is caused because of the wrong path referred by the symlink of my crate. To be precise this how my crate sym link looks like in 1.0.103:

lrwxrwxrwx 1 nagkota nagkota 27 Aug 19 16:41 faiss-index -> ../../../../../../../../../

If I follow the symlink all I see in that path is build folder.

vs in 1.0.102

lrwxrwxrwx 1 nagkota nagkota 74 Aug 19 17:17 faiss-index -> /workplace/nagkota/FaissIndex/src/FaissIndex
@dtolnay
Copy link
Owner

dtolnay commented Aug 19, 2023

Thanks for the helpful writeup. I think I know the issue. Could you try whether cxx-build 1.0.106 has resolved this in your project?

@kndsatya
Copy link
Author

Thanks for the quick response. It might take a couple of days for me to test this. WIll update in 2 days from now

@kndsatya
Copy link
Author

Thanks for the fix! I pulled in the latest version 1.0.106 and it works now. Thanks again!

@caesay
Copy link

caesay commented Oct 20, 2024

I am getting this exact issue on 1.0.129. My project structure laid out the same way with the header in an include dir. Even more peculiar is that it works fine when building on Windows but fails on Nix with:

velopack_libc@0.0.805-geb00d1c: /target/x86_64-unknown-linux-gnu/release/build/velopack_libc-597f89871ac50297/out/cxxbridge/crate/velopack_libc/include/Velopack.h:10:20: fatal error: optional: No such file or directory

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

3 participants