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

Read-only filesystem error using cc during build #1015

Closed
grovesNL opened this issue Aug 28, 2020 · 5 comments
Closed

Read-only filesystem error using cc during build #1015

grovesNL opened this issue Aug 28, 2020 · 5 comments
Labels
C-build-failure Category: This is a crate that failed to build S-waiting-on-crate-author Status: This is a build failure that has to be fixed by the crate author, not the docs.rs team

Comments

@grovesNL
Copy link

Crate name: spirv_cross or crates depending on it (e.g. gfx-backend-dx12)
Build failure link: https://docs.rs/crate/gfx-backend-dx12/0.5.9/builds/281262
Additional details: When running cc from spirv_cross we get the following message:

[INFO] [stderr] running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" "-DSPIRV_CROSS_WRAPPER_NO_EXCEPTIONS" "-DSPIRV_CROSS_WRAPPER_GLSL" "-DSPIRV_CROSS_WRAPPER_HLSL" "-Fo/opt/rustwide/target/x86_64-pc-windows-msvc/debug/build/spirv_cross-f7ca93fa2885997b/out/src/wrapper.o" "-c" "src/wrapper.cpp"
[INFO] [stderr] cargo:warning=src/wrapper.cpp:2: warning: ignoring #pragma warning [-Wunknown-pragmas]
[INFO] [stderr] cargo:warning= 2 | #pragma warning(disable : 4996 4101)
[INFO] [stderr] cargo:warning= |
[INFO] [stderr] cargo:warning=Assembler messages:
[INFO] [stderr] cargo:warning=Fatal error: can't create wrapper.o: Read-only file system
[INFO] [stderr] exit code: 1
[INFO] [stderr]
[INFO] [stderr] --- stderr
[INFO] [stderr]
[INFO] [stderr]
[INFO] [stderr] error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" "-DSPIRV_CROSS_WRAPPER_NO_EXCEPTIONS" "-DSPIRV_CROSS_WRAPPER_GLSL" "-DSPIRV_CROSS_WRAPPER_HLSL" "-Fo/opt/rustwide/target/x86_64-pc-windows-msvc/debug/build/spirv_cross-f7ca93fa2885997b/out/src/wrapper.o" "-c" "src/wrapper.cpp" with args "c++" did not execute successfully (status code exit code: 1).
[INFO] [stderr]
[INFO] [stderr]
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stderr] error: build failed

I'm not sure how to resolve this so I was wondering if I could get some help. I thought the path (/opt/rustwide/target/x86_64-pc-windows-msvc/debug/build/spirv_cross-f7ca93fa2885997b/out/src/wrapper.o) would be writable because it's inside of out.

The spirv_cross build script is a pretty typical cc setup and should use OUT_DIR from the environment: https://github.com/grovesNL/spirv_cross/blob/master/spirv_cross/build.rs

@Nemo157
Copy link
Member

Nemo157 commented Aug 28, 2020

It looks like the -Fo argument is ignored, running cargo build --target x86_64-pc-windows-msvc results in a bunch of .o files appearing in the root directory when building spirv_cross-0.20.0.

@Nemo157
Copy link
Member

Nemo157 commented Aug 28, 2020

(I think it's trying to pass MSVC flags to g++, that should be a -o flag).

@jyn514 jyn514 added C-build-failure Category: This is a crate that failed to build S-waiting-on-crate-author Status: This is a build failure that has to be fixed by the crate author, not the docs.rs team labels Aug 28, 2020
@grovesNL
Copy link
Author

Ah ok, that would make sense, thanks! cc-rs would've generated these flags so it's surprising we'd see MSVC flags if it detected that g++ is being used.

I guess the bigger issue is that we're trying to cross-compile a Windows-only crate, so we'd prefer to use a Windows host and require MSVC instead of g++. For gfx-backend-dx12, could we use Windows as the host to avoid cross-compilation, or require MSVC to be used through package metadata somehow?

@pietroalbini
Copy link
Member

We don't have any Windows build hosts unfortunately :(

@jyn514
Copy link
Member

jyn514 commented Jun 21, 2021

Closing due to inactivity; feel free to reopen if you're still having trouble and have time to debug things.

@jyn514 jyn514 closed this as completed Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-build-failure Category: This is a crate that failed to build S-waiting-on-crate-author Status: This is a build failure that has to be fixed by the crate author, not the docs.rs team
Projects
None yet
Development

No branches or pull requests

4 participants