jayjun/rambo

Windows build fails

Opened this issue · 5 comments

Running mix compile.rambo all fails to compile the Windows binary.

 => [internal] load build definition from Dockerfile.x86_64-pc-windows-gnu                                                                                                                                               0.0s
 => => transferring dockerfile: 464B                                                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/rustembedded/cross:x86_64-pc-windows-gnu                                                                                                                                      1.2s
 => [internal] load build context                                                                                                                                                                                        0.6s
 => => transferring context: 6.01MB                                                                                                                                                                                      0.6s
 => [1/7] FROM docker.io/rustembedded/cross:x86_64-pc-windows-gnu@sha256:14d1808255d9e45fb99ef175d75820c3f2194c683df7487a1687d569876d585c                                                                                0.0s
 => CACHED [2/7] WORKDIR /app                                                                                                                                                                                            0.0s
 => CACHED [3/7] RUN apt-get update && apt-get install -y curl                                                                                                                                                           0.0s
 => CACHED [4/7] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y                                                                                                                             0.0s
 => CACHED [5/7] RUN rustup target add x86_64-pc-windows-gnu                                                                                                                                                             0.0s
 => CACHED [6/7] COPY entrypoint.sh /                                                                                                                                                                                    0.0s
 => [7/7] COPY . /app                                                                                                                                                                                                    5.9s
 => exporting to image                                                                                                                                                                                                   9.4s
 => => exporting layers                                                                                                                                                                                                  9.4s
 => => writing image sha256:1a7de9724287b11762df04ca10d4e5d1c983caeb7c0c00873c7d7bae1d3be122                                                                                                                             0.0s
 => => naming to docker.io/rambo/x86_64-pc-windows-gnu                                                                                                                                                                   0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
    Updating crates.io index
 Downloading crates ...
  Downloaded ws2_32-sys v0.2.1
  Downloaded winapi-build v0.1.1
  Downloaded bytes v0.5.4
  Downloaded arc-swap v0.4.4
  Downloaded mio-named-pipes v0.1.6
  Downloaded mio-uds v0.6.7
  Downloaded kernel32-sys v0.2.2
  Downloaded socket2 v0.3.11
  Downloaded miow v0.3.3
  Downloaded winapi v0.3.8
  Downloaded winapi v0.2.8
  Downloaded miow v0.2.1
  Downloaded futures-sink v0.3.5
  Downloaded log v0.4.8
  Downloaded pin-utils v0.1.0
  Downloaded net2 v0.2.33
  Downloaded iovec v0.1.4
  Downloaded futures-macro v0.3.5
  Downloaded pin-project-internal v0.4.17
  Downloaded pin-project-lite v0.1.4
  Downloaded proc-macro-hack v0.5.11
  Downloaded lazy_static v1.4.0
  Downloaded proc-macro2 v1.0.9
  Downloaded quote v1.0.3
  Downloaded signal-hook-registry v1.2.0
  Downloaded syn v1.0.16
  Downloaded tokio-macros v0.2.5
  Downloaded tokio v0.2.13
  Downloaded memchr v2.3.3
  Downloaded futures-core v0.3.5
  Downloaded unicode-xid v0.2.0
  Downloaded once_cell v1.4.0
  Downloaded slab v0.4.2
  Downloaded proc-macro-nested v0.1.3
  Downloaded futures v0.3.5
  Downloaded futures-io v0.3.5
  Downloaded mio v0.6.21
  Downloaded futures-util v0.3.5
  Downloaded libc v0.2.67
  Downloaded cfg-if v0.1.10
  Downloaded pin-project v0.4.17
  Downloaded futures-task v0.3.5
  Downloaded futures-channel v0.3.5
  Downloaded futures-executor v0.3.5
  Downloaded winapi-x86_64-pc-windows-gnu v0.4.0
   Compiling winapi-x86_64-pc-windows-gnu v0.4.0
   Compiling winapi v0.3.8
   Compiling ws2_32-sys v0.2.1
   Compiling kernel32-sys v0.2.2
   Compiling memchr v2.3.3
   Compiling log v0.4.8
   Compiling proc-macro-nested v0.1.3
   Compiling futures-task v0.3.5
error: failed to run custom build command for `proc-macro-nested v0.1.3`

Caused by:
  process didn't exit successfully: `/app/target/release/build/proc-macro-nested-87b54e181d4c7bc9/build-script-build` (exit status: 1)
  --- stderr
  /app/target/release/build/proc-macro-nested-87b54e181d4c7bc9/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /app/target/release/build/proc-macro-nested-87b54e181d4c7bc9/build-script-build)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `memchr v2.3.3`

Caused by:
  process didn't exit successfully: `/app/target/release/build/memchr-ba3fb440c0f00734/build-script-build` (exit status: 1)
  --- stderr
  /app/target/release/build/memchr-ba3fb440c0f00734/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /app/target/release/build/memchr-ba3fb440c0f00734/build-script-build)
error: failed to run custom build command for `log v0.4.8`

Caused by:
  process didn't exit successfully: `/app/target/release/build/log-a59866334bb598ef/build-script-build` (exit status: 1)
  --- stderr
  /app/target/release/build/log-a59866334bb598ef/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /app/target/release/build/log-a59866334bb598ef/build-script-build)
thbar commented

@jayjun I made a quick test today (from a Mac M1 though, so take this with a pinch of salt), and things seem to reach their end:

full log
❯ cd priv
❯ docker build -f Dockerfile.x86_64-pc-windows-gnu .
[+] Building 631.2s (12/12) FINISHED                                                                                                                                                 
 => [internal] load build definition from Dockerfile.x86_64-pc-windows-gnu                                                                                                      0.3s
 => => transferring dockerfile: 464B                                                                                                                                            0.0s
 => [internal] load .dockerignore                                                                                                                                               0.5s
 => => transferring context: 2B                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/rustembedded/cross:x86_64-pc-windows-gnu                                                                                             3.7s
 => [1/7] FROM docker.io/rustembedded/cross:x86_64-pc-windows-gnu@sha256:14d1808255d9e45fb99ef175d75820c3f2194c683df7487a1687d569876d585c                                     435.9s
 => => resolve docker.io/rustembedded/cross:x86_64-pc-windows-gnu@sha256:14d1808255d9e45fb99ef175d75820c3f2194c683df7487a1687d569876d585c                                       0.1s
 => => sha256:83d38954e3fc38e36663eefb984b1f7045208aa01b8fb94afb3c912c5d13c752 4.98kB / 4.98kB                                                                                  0.0s
 => => sha256:14d1808255d9e45fb99ef175d75820c3f2194c683df7487a1687d569876d585c 2.63kB / 2.63kB                                                                                  0.0s
 => => sha256:e4ca327ec0e73c737201b7a6d7b2df779a3ccf34fe9cf1b0c031e767f6464240 26.71MB / 26.71MB                                                                               43.2s
 => => sha256:1b37752cb1bb00c6d111c819ff77b4612ef6603d9f90036f54108320bc109be8 871B / 871B                                                                                     13.0s
 => => sha256:b6b4685533fc6a2cd549d84b84243d82d1a587fb1c520a62fedc71e33d86a90e 140.69MB / 140.69MB                                                                            415.2s
 => => sha256:de2bb76e2aad9d014982f5e1ca820a2f36dcac2b7055f62113e6cfbfe6bc4b66 417B / 417B                                                                                     28.3s
 => => sha256:95024615870341e77c1c63b434f26161db9ca449d3fb8a94429cd43bdd514d3a 41.34MB / 41.34MB                                                                              338.7s
 => => extracting sha256:e4ca327ec0e73c737201b7a6d7b2df779a3ccf34fe9cf1b0c031e767f6464240                                                                                       0.6s
 => => sha256:0f60ace7377c27438eb4f56276d64f54687eef77da878ae84fb44345cd1d1531 414B / 414B                                                                                     44.2s
 => => extracting sha256:1b37752cb1bb00c6d111c819ff77b4612ef6603d9f90036f54108320bc109be8                                                                                       0.0s
 => => sha256:8abc372307d88aea341174087f8c823a158147273019069a2d9495d049d96e3e 51.94MB / 51.94MB                                                                              103.9s
 => => sha256:4d79660a25bb392c4bbc0c0fe5c8b5efc377914bf3e8778d1bdce37238e244fe 145.82MB / 145.82MB                                                                            208.5s
 => => sha256:eedf4a6c38c1e183c4fdbfb43b93a81fbd3579b4914aced882d1151de774b19d 106.66MB / 106.66MB                                                                            275.7s
 => => sha256:4f2f4e35c5a133000d7e9294bfee42d973529666629ef5983df95faa3d93b190 209B / 209B                                                                                    278.5s
 => => sha256:ef081f3ee0bd584b0135e66945a78912d27f4f41a60e34871819e80a92bd5e00 438B / 438B                                                                                    279.1s
 => => extracting sha256:b6b4685533fc6a2cd549d84b84243d82d1a587fb1c520a62fedc71e33d86a90e                                                                                       3.0s
 => => extracting sha256:de2bb76e2aad9d014982f5e1ca820a2f36dcac2b7055f62113e6cfbfe6bc4b66                                                                                       0.0s
 => => extracting sha256:95024615870341e77c1c63b434f26161db9ca449d3fb8a94429cd43bdd514d3a                                                                                       1.3s
 => => extracting sha256:0f60ace7377c27438eb4f56276d64f54687eef77da878ae84fb44345cd1d1531                                                                                       0.0s
 => => extracting sha256:8abc372307d88aea341174087f8c823a158147273019069a2d9495d049d96e3e                                                                                       1.0s
 => => extracting sha256:4d79660a25bb392c4bbc0c0fe5c8b5efc377914bf3e8778d1bdce37238e244fe                                                                                       3.8s
 => => extracting sha256:eedf4a6c38c1e183c4fdbfb43b93a81fbd3579b4914aced882d1151de774b19d                                                                                       2.9s
 => => extracting sha256:4f2f4e35c5a133000d7e9294bfee42d973529666629ef5983df95faa3d93b190                                                                                       0.0s
 => => extracting sha256:ef081f3ee0bd584b0135e66945a78912d27f4f41a60e34871819e80a92bd5e00                                                                                       0.0s
 => [internal] load build context                                                                                                                                               1.6s
 => => transferring context: 69.48MB                                                                                                                                            1.4s
 => [2/7] WORKDIR /app                                                                                                                                                          0.6s
 => [3/7] RUN apt-get update && apt-get install -y curl                                                                                                                        39.4s
 => [4/7] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y                                                                                         122.9s
 => [5/7] RUN rustup target add x86_64-pc-windows-gnu                                                                                                                          15.6s 
 => [6/7] COPY entrypoint.sh /                                                                                                                                                  0.8s 
 => [7/7] COPY . /app                                                                                                                                                           1.0s 
 => exporting to image                                                                                                                                                          9.8s 
 => => exporting layers                                                                                                                                                         9.4s 
 => => writing image sha256:16ecaa82e8d1762ee8aec73d870475d262dd65ae1b4124b17b1a3fd4637a1ad7

I have not attempted to compare with your output in detail, but hope this helps nonetheless.

thbar commented

(maybe you have a bit of cache to flush? I notice I have more Docker logs than you etc)

balins commented

@jayjun What's the status of this? I've just built the thing on my M1 Mac and everything works fine 🤔 It would be great to finally make this package ship with Apple Silicon prebuilt binaries

@balins I believe the blocker issue is still this:

Running mix compile.rambo all fails to compile the Windows binary.

Anyone with access to a Windows machine and enough time to figure this out?

(I might dive into this later during the year, but not a huge available time at the moment).

Submitted pull request #25 to fix Windows build.