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

Cross compile error (Debian -> Windows) #297

Open
juroberttyb opened this issue Jun 14, 2024 · 0 comments
Open

Cross compile error (Debian -> Windows) #297

juroberttyb opened this issue Jun 14, 2024 · 0 comments

Comments

@juroberttyb
Copy link

Description

Error No such file or directory encountered when trying to cross compile from Ubuntu Debian to Windows.

Finished `release` profile [optimized] target(s) in 0.16s
       Cargo process finished with success
       Cargo envs: LEPTOS_OUTPUT_NAME=ohana LEPTOS_SITE_ROOT=target/site LEPTOS_SITE_PKG_DIR=pkg LEPTOS_SITE_ADDR=127.0.0.1:3000 LEPTOS_RELOAD_PORT=3001 LEPTOS_LIB_DIR=. LEPTOS_BIN_DIR=. LEPTOS_HASH_FILES=false
       Cargo finished cargo build --package=ohana --bin=ohana --target=x86_64-pc-windows-gnu --no-default-features --features=ssr --release
Error: at `/home/robert/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.17/src/compile/server.rs:39:22`

Caused by:
    0: at `/home/robert/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.17/src/service/site.rs:117:44`
    1: Could not read "target/x86_64-pc-windows-gnu/release/ohana" at `/home/robert/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.17/src/ext/fs.rs:44:10`
    2: No such file or directory (os error 2)
make: *** [Makefile:23: app] Error 1

Error Raised From

It seems the error is raised from (src) checking whether there are file changes, but somehow failed to find those files when trying to compute the hash.

    pub async fn did_external_file_change(&self, to: &Utf8Path) -> Result<bool> {
        let new_hash = file_hash(to).await.dot()?;

Additional Env Besides Default

LEPTOS_BIN_TARGET_TRIPLE=x86_64-pc-windows-gnu

Cargo Config

[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"
ar = "x86_64-w64-mingw32-gcc-ar"
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