r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

Rust build error on Windows Builder (note: `link.exe` returned an unexpected error) #231

Closed eitsupi closed 1 year ago

eitsupi commented 1 year ago

The bug found in #219 continues to occur and seems to be causing prqlr and rpolars (https://github.com/pola-rs/r-polars/issues/25#issuecomment-1416102821) to fail to build on Windows.

image

   note: `link.exe` returned an unexpected error

  note: you may need to install Visual Studio build tools with the "C++ build tools" workload

  error: could not compile `proc-macro2` due to previous error
  warning: build failed, waiting for other jobs to finish...
  error: could not compile `quote` due to previous error
  make: *** [Makevars.win:24: rust/target/x86_64-pc-windows-gnu/release/libprqlr.a] Error 101
  ERROR: compilation failed for package 'prqlr'
  * removing 'D:/a/eitsupi/eitsupi/prqlr.Rcheck/prqlr'
Post-check done.

Since the build is fine on the machines on CRAN and in the normal GitHub Actions runner, perhaps somewhere in the R-universe workflow, even the necessary software is being removed. (Sorry, haven't been able to locate that yet)

eitsupi commented 1 year ago

I looked at the workflow and unlike macOS (#208) it doesn't seem to uninstall anything? https://github.com/r-universe/workflows/blob/96a6b1da44d5118e04195707a85966816d36e602/.github/workflows/build.yml

jeroen commented 1 year ago

We don't uninstall anything indeed. I'm surprised it passes in your own CI and not r-universe, it should be the same setup.

Does the hello_r_universe branch also pass in your own CI?

eitsupi commented 1 year ago

Does the hello_r_universe branch also pass in your own CI?

Yes pola-rs/r-polars#38

The workflow for rpolars has been changed a lot, but the workflow for prqlr is simple, with the template almost intact, but this is successfully built. https://github.com/eitsupi/prqlr/blob/a4779c5ec296bf89650259305ec7601b351cedf6/.github/workflows/check.yml#L31-L77

jeroen commented 1 year ago

I think it has to do with bloat on the PATH, this may fix it. I just triggered a rebuild for rpolars to test.

eitsupi commented 1 year ago

Thank you very much!