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

[Windows] Unable to build #48

Closed
macintoshplus opened this issue Dec 5, 2020 · 4 comments
Closed

[Windows] Unable to build #48

macintoshplus opened this issue Dec 5, 2020 · 4 comments

Comments

@macintoshplus
Copy link
Contributor

  1. I have installed the latest version of Rust lang (x64) on Windows 10
  2. I have run cargo build on Rymfony folder

This is the result:

X:\>cargo build
   Compiling autocfg v1.0.1
   Compiling unicode-xid v0.2.1
   Compiling cfg-if v0.1.10
   Compiling lazy_static v1.4.0
LLVM ERROR: IO failure on output stream: bad file descriptor
error: could not compile `cfg-if`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
LLVM ERROR: IO failure on output stream: bad file descriptor
LLVM ERROR: IO failure on output stream: bad file descriptor
LLVM ERROR: IO failure on output stream: bad file descriptor
error: build failed
@Pierstoval
Copy link
Member

Pierstoval commented Dec 5, 2020

Maybe you are building it on a network drive? If so, there seems to be no workaround yet for this (check rust-lang/rust#54216)

Edit: there actually is a workaround: put the project in a non-network drive in the VM, it should do the trick. It can be cumbersome though if your IDE is on the host and the code is in the VM.

@macintoshplus
Copy link
Contributor Author

Yes, the project is in shared folder with Virtual Box.

After copy the project, into another drive, I have now this error:

error: failed to run custom build command for `openssl-sys v0.9.58`

Caused by:
  process didn't exit successfully: `D:\Rymfony\target\debug\build\openssl-sys-5f976203516b4a27\build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  running "perl" "./Configure" "--prefix=D:\\Rymfony\\target\\debug\\build\\openssl-sys-20f397a2af661d07\\out\\openssl-build\\install" "no-dso" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "Le fichier spécifié est introuvable." }', C:\Users\test\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-src-111.12.0+1.1.1h\src\lib.rs:411:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

I have follow this documentation to install OpenSSL on my windows System
https://github.com/sfackler/rust-openssl/tree/5948898e54882c0bedd12d87569eb4dbee5bbca7#installing-openssl-110-using-precompiled-binaries

@Pierstoval
Copy link
Member

Did you install OpenSSL through vcpkg?

I personally installed it in my dev directory, and have set the envs var as such:

> env | grep SSL
OPENSSL_DIR=C:\dev\vcpkg\packages\openssl_x86-windows-static
OPENSSL_INCLUDE_DIR=C:\dev\vcpkg\packages\openssl_x64-windows-static\include
OPENSSL_LIB_DIR=C:\dev\vcpkg\packages\openssl_x64-windows-static\lib
OPENSSL_NO_VENDOR=1
OPENSSL_STATIC=Yes
SSL_CERT_FILE=C:\dev\vcpkg\packages\openssl_x86-windows\certs\cacert.pem

And in my PATH, I have this (I use Powershell):

> $env:PATH | sed 's/;/\n/g' | grep -i ssl
C:\dev\vcpkg\packages\openssl_x86-windows\tools\openssl
C:\dev\vcpkg\packages\openssl_x86-windows\bin

@macintoshplus
Copy link
Contributor Author

Thanks @Pierstoval, I can build on Windows.

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

2 participants