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

Configuring libffi fails on Windows 10 under WSL #89

Open
Skgland opened this issue Feb 16, 2024 · 2 comments
Open

Configuring libffi fails on Windows 10 under WSL #89

Skgland opened this issue Feb 16, 2024 · 2 comments

Comments

@Skgland
Copy link

Skgland commented Feb 16, 2024

error: failed to run custom build command for `libffi-sys v2.3.0`

Caused by:
  process didn't exit successfully: `/mnt/c/Users/Bennet/Git/scryer-prolog-1/target/debug/build/libffi-sys-5ebf69dc60871829/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking target system type... x86_64-pc-linux-gnu
  continue configure in default builddir "./x86_64-unknown-linux-gnu"
  ....exec /bin/bash .././configure "--srcdir=.." "--enable-builddir=x86_64-unknown-linux-gnu" "linux
  gnu"

  --- stderr
  .././configure: line 2251: config.log: No such file or directory
  .././configure: line 2261: config.log: No such file or directory
  cat: standard output: No such file or directory
  thread 'main' panicked at /home/bennet/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libffi-sys-2.3.0/build/common.rs:8:5:
  Configuring libffi
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Appears to be the error from libffi/libffi#552 and is a similar but not identical error to #85

WSL Details
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
@Skgland
Copy link
Author

Skgland commented Feb 16, 2024

This also appears to be the same problem as #86, based on the logs posed in the linked issue svix/svix-webhooks#1128 (comment)

@Skgland
Copy link
Author

Skgland commented Jul 23, 2024

I just noticed libffi/libffi#552 (comment)

I found out that the issue only occurs when the files are stored on the Windows side on NTFS and accessed through /mnt.

It looks like for libffs-sys-rs it is sufficient if the target dir is on the WSL filesystem (probably because it build libffi inside of the target dir) i.e. CARGO_TARGET_DIR=~/.targets/<project name>/target cargo build worked to fix my build

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