Skip to content

Panic compiling unreachable v1.0.0/memchr v2.0.1 only inside a Docker container and only on Windows. #58613

Closed as not planned

Description

@nevdelap

Hi there.

Using the Windows Dockerfile in this repository: https://github.com/nevdelap/ned-win/tree/rust-panic
...to build this: https://github.com/nevdelap/ned
...I get this panic: (Note: it's always worked in Windows without being in the Docker container.)

   Compiling unreachable v1.0.0
   Compiling memchr v2.0.1
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', src\libcore\result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.32.0 (9fda7c223 2019-01-16) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `unreachable`.
warning: build failed, waiting for other jobs to finish...
error[E0658]: use of unstable library feature 'libc': use `libc` from crates.io (see issue #27783)
  --> C:\Users\ContainerAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\memchr-2.0.1\src\lib.rs:17:1
   |
17 | extern crate libc;
   | ^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'libc': use `libc` from crates.io (see issue #27783)
  --> C:\Users\ContainerAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\memchr-2.0.1\src\lib.rs:24:5
   |
24 | use libc::c_void;
   |     ^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'libc': use `libc` from crates.io (see issue #27783)
  --> C:\Users\ContainerAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\memchr-2.0.1\src\lib.rs:26:12
   |
26 | use libc::{c_int, size_t};
   |            ^^^^^

error[E0658]: use of unstable library feature 'libc': use `libc` from crates.io (see issue #27783)
  --> C:\Users\ContainerAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\memchr-2.0.1\src\lib.rs:26:19
   |
26 | use libc::{c_int, size_t};
   |                   ^^^^^^

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `memchr`.

To learn more, run the command again with --verbose.

The attached file rust-panic.txt contains the full output for:

  • Building and running the container.
  • Doing rustc -V and cargo -V.
  • Doing cargo test with 1.32.0 - with the panic.
  • Rustup'ing to nightly.
  • Doing a cargo clean and cargo test with nightly - with the panic.

(I haven't looked at why it is complaining: warning: could not canonicalize path: 'C:\Users\administrator\development\ned')

At that point I exited the container, committed it, and pushed it to: https://hub.docker.com/r/nevdelap/rust-panic

To reproduce it:

  1. Install Docker on Windows. (2.0.3 on Windows 10 1803 is what I've got.)
  2. Clone: https://github.com/nevdelap/ned
  3. Run: docker pull nevdelap/rust-panic:latest
  4. Run: docker run -it -v <yourpath>\ned:C:\Users\Administrator\Development\ned nevdelap/rust-panic:latest
  5. Run cargo test.

This has always built fine in Windows not in Docker, in Arch, Ubuntu, and CentOS, and in OS X High Sierra, up to an including Rust 1.32.0.

Update: verbose version info and backtrace: rust-panic-backtrace.txt

Cheers,

Nev

Activity

  1. changed the title [-]Panic compiling Compiling memchr v2.0.1 inside a Docker container only on Windows.[/-] [+]Panic compiling Compiling Compiling unreachable v1.0.0/memchr v2.0.1 inside a Docker container only on Windows.[/+] on Feb 21, 2019
  2. changed the title [-]Panic compiling Compiling Compiling unreachable v1.0.0/memchr v2.0.1 inside a Docker container only on Windows.[/-] [+]Panic compiling unreachable v1.0.0/memchr v2.0.1 inside a Docker container only on Windows.[/+] on Feb 21, 2019
  3. changed the title [-]Panic compiling unreachable v1.0.0/memchr v2.0.1 inside a Docker container only on Windows.[/-] [+]Panic compiling `unreachable v1.0.0`/`memchr v2.0.1` only inside a Docker container and only on Windows.[/+] on Feb 21, 2019
  4. added
    O-windowsOperating system: Windows
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 21, 2019
  5. nevdelap commented on Feb 21, 2019

    @nevdelap
    Author

    Update: Forgot that the ned-win repo with the Docker build was private - I've made it public.

  6. Enselic commented on Aug 22, 2023

    @Enselic
    Member

    Triage: The Dockerfile is not accessible any longer. Can you still reproduce this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-windowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions