goertzenator / rebar3_rust

Rebar3 plugin to build Rust crates (unmaintained). See https://github.com/filmor/rebar3_rust/tree/update for more recent work.
Apache License 2.0
9 stars 5 forks source link

tests fail on windows due to long path #2

Open goertzenator opened 7 years ago

goertzenator commented 7 years ago

The test suite fails on Windows because the Rust compiler cannot handle paths longer than 260 characters. Erlang common test and rebar add a lot of length to the path, so this issue is unlikely to arise in normal use of the rebar3_rust plugin. Ref https://github.com/rust-lang/rust/issues/32689

Excerpt of common test log:

 Downloading erlang_nif-sys v0.4.2

 Downloading libc v0.2.20

   Compiling libc v0.2.20

     Running `rustc --crate-name libc C:\Users\home\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.20\src\lib.rs --crate-type lib -g --cfg "feature=\"default\"" --cfg "feature=\"use_std\"" -C metadata=83c2bd88b43ecde3 -C extra-filename=-83c2bd88b43ecde3 --out-dir c:\Users\home\rebar3_rust\_build\test\logs\ct_run.nonode@nohost.2017-03-09_14.13.19\rebar3_rust.ct.logs\run.2017-03-09_14.13.19\log_private\test_app\crates\nifsys\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\home\rebar3_rust\_build\test\logs\ct_run.nonode@nohost.2017-03-09_14.13.19\rebar3_rust.ct.logs\run.2017-03-09_14.13.19\log_private\test_app\crates\nifsys\target\debug\deps --cap-lints allow`

   Compiling erlang_nif-sys v0.4.2

     Running `rustc --crate-name build_script_build C:\Users\home\.cargo\registry\src\github.com-1ecc6299db9ec823\erlang_nif-sys-0.4.2\build.rs --crate-type bin -g -C metadata=2829a1e81beb4d26 -C extra-filename=-2829a1e81beb4d26 --out-dir c:\Users\home\rebar3_rust\_build\test\logs\ct_run.nonode@nohost.2017-03-09_14.13.19\rebar3_rust.ct.logs\run.2017-03-09_14.13.19\log_private\test_app\crates\nifsys\target\debug\build\erlang_nif-sys-2829a1e81beb4d26 --emit=dep-info,link -L dependency=c:\Users\home\rebar3_rust\_build\test\logs\ct_run.nonode@nohost.2017-03-09_14.13.19\rebar3_rust.ct.logs\run.2017-03-09_14.13.19\log_private\test_app\crates\nifsys\target\debug\deps --extern libc=c:\Users\home\rebar3_rust\_build\test\logs\ct_run.nonode@nohost.2017-03-09_14.13.19\rebar3_rust.ct.logs\run.2017-03-09_14.13.19\log_private\test_app\crates\nifsys\target\debug\deps\liblibc-83c2bd88b43ecde3.rlib --cap-lints allow`

error: failed to remove c:\Users\home\rebar3_rust\_build\test\logs\ct_run.nonode@nohost.2017-03-09_14.13.19\rebar3_rust.ct.logs\run.2017-03-09_14.13.19\log_private\test_app\crates\nifsys\target\debug\build\erlang_nif-sys-2829a1e81beb4d26\build_script_build-2829a1e81beb4d26.metadata.o: The system cannot find the path specified. (os error 3)

error: could not rename dep info: "c:\\Users\\home\\rebar3_rust\\_build\\test\\logs\\ct_run.nonode@nohost.2017-03-09_14.13.19\\rebar3_rust.ct.logs\\run.2017-03-09_14.13.19\\log_private\\test_app\\crates\\nifsys\\target\\debug\\build\\erlang_nif-sys-2829a1e81beb4d26\\build_script_build-2829a1e81beb4d26.d"

Caused by:

  The system cannot find the path specified. (os error 3)