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

error: linker i686-w64-mingw32-gcc not found #758

Closed
brandonros opened this issue Jun 6, 2022 · 4 comments
Closed

error: linker i686-w64-mingw32-gcc not found #758

brandonros opened this issue Jun 6, 2022 · 4 comments
Labels
needs-information needs more information to replicate pending-close Issue will be closed if no further comments

Comments

@brandonros
Copy link
Contributor

 $ CROSS_CONTAINER_ENGINE=docker cross build --target i686-pc-windows-gnu
   Compiling vpi v0.0.1 (/Users/brandonros/Desktop/dpdu-http/vpi)
   Compiling remoter v0.0.1 (/Users/brandonros/Desktop/dpdu-http/remoter)
error: linker `i686-w64-mingw32-gcc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `vpi` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `remoter` due to previous error

Brandons-MacBook-Air:dpdu-http brandonros 2022-06-06 13:25:44 $ uname -a
Darwin Brandons-MacBook-Air.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 arm64

It feels like it isn't running in Docker?

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jun 6, 2022

Can you provide the output of cross --version? Are you installing from git? The latest cross versions will also warn you if you fall back to the host. The latest release on crates.io is quite old and we're planning a release at some point.

@Alexhuszagh Alexhuszagh added pending-close Issue will be closed if no further comments needs-information needs more information to replicate labels Jun 6, 2022
@Alexhuszagh
Copy link
Contributor

If I install cross from git, the following works fine:

$ cargo install cross --git https://github.com/cross-rs/cross
$ git clone https://github.com/cross-rs/rust-cpp-hello-word
$ cd rust-cpp-hello-word
$ cross run --target i686-pc-windows-gnu

   Compiling cc v1.0.73
   Compiling hellopp v0.1.0 (/project)
    Finished dev [unoptimized + debuginfo] target(s) in 42.90s
     Running `wine /target/i686-pc-windows-gnu/debug/hellopp.exe`
0044:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0044:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0044:err:systray:initialize_systray Could not create tray window
Hello, world!

So everything seems to work if using the latest versions.

@brandonros
Copy link
Contributor Author

$ cross --version
cross 0.2.1
cargo 1.61.0 (a028ae42f 2022-04-29)

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jun 6, 2022

$ cross --version
cross 0.2.1
cargo 1.61.0 (a028ae42f 2022-04-29)

Yeah that means you're using the very old version installed from crates.io, which has some major bugs we're fixing in a new release. For a while, we had a lack of maintainers, so we've been patching some errors that had built up over time. If you reinstall cross from git (as shown above), this should fix your issue. You can always use a specific commit if you'd like to lock version dependencies. For example, to use the currently latest commit, and ensure you've audited the correct version, use:

cargo install --git https://github.com/cross-rs/cross --rev 6a7fa09d6307acb5380475b134ff749c7cd9ed35

This will also warn you if any commands fall back to the host:

cross --version
cross 0.2.1 (6a7fa09 2022-06-05)
Warning: Falling back to `cargo` on the host.
cargo 1.61.0 (a028ae42f 2022-04-29)

Thanks for your patience with the lack of recent releases, due to the lack of maintainers.

bors bot added a commit that referenced this issue Jun 6, 2022
759: update readme to mention install from git due to outdated crates version r=Alexhuszagh a=brandonros

part of #758?

Co-authored-by: Brandon Ros <brandonros1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-information needs more information to replicate pending-close Issue will be closed if no further comments
Projects
None yet
Development

No branches or pull requests

2 participants