Junjie Mao <junjie....@hotmail.com> writes:

> Paolo Bonzini <pbonz...@redhat.com> writes:
>
>> Il mer 16 ott 2024, 08:10 Junjie Mao <junjie....@hotmail.com> ha scritto:
>>
>>  In my Ubuntu 22.04 environment (rustc 1.76.0 and bindgen 0.59.1 from
>>  apt) the feature `proc_macro_byte_character` is not yet stablized but
>>  used in proc-macro2. Downgrading proc-macro2 to 1.0.79 [1] and syn to
>>  2.0.58 fixes that issue for me.
>>
>> This is handled by patch 5. Try "meson subprojects update --reset".
>>
>
> Yes, that works. Thanks for the info!

After cleaning everything to build from scratch, I met another issue:

  bilge-0.2-rs| Downloading bilge-impl-0.2-rs source from 
https://crates.io/api/v1/crates/bilge-impl/0.2.0/download
  Download size: 24524
  Downloading: ..........
  bilge-0.2-rs| Applying diff file "bilge-impl-1.63.0.patch"
  bilge-0.2-rs| patching file src/shared/discriminant_assigner.rs
  bilge-0.2-rs| Hunk #1 FAILED at 26 (different line endings).
  bilge-0.2-rs| 1 out of 1 hunk FAILED -- saving rejects to file 
src/shared/discriminant_assigner.rs.rej
  bilge-0.2-rs| patching file src/shared/fallback.rs
  bilge-0.2-rs| Hunk #1 FAILED at 22 (different line endings).
  bilge-0.2-rs| 1 out of 1 hunk FAILED -- saving rejects to file 
src/shared/fallback.rs.rej

  ../subprojects/bilge-0.2.0/meson.build:9:0: ERROR: Failed to apply diff file 
"bilge-impl-1.63.0.patch"

It turns out that the sources in bilge-impl have CRLF line endings and
`patch` does not ignore that even with the `-l` option:

  ~/Projects/qemu/subprojects$ tar xf packagecache/bilge-impl-0.2.0.tar.gz
  ~/Projects/qemu/subprojects$ cd bilge-impl-0.2.0/
  ~/Projects/qemu/subprojects/bilge-impl-0.2.0$ patch -l -f -p1 -i 
../packagefiles/bilge-impl-1.63.0.patch
  patching file src/shared/discriminant_assigner.rs
  Hunk #1 FAILED at 26 (different line endings).
  1 out of 1 hunk FAILED -- saving rejects to file 
src/shared/discriminant_assigner.rs.rej
  patching file src/shared/fallback.rs
  Hunk #1 FAILED at 22 (different line endings).
  1 out of 1 hunk FAILED -- saving rejects to file src/shared/fallback.rs.rej
  ~/Projects/qemu/subprojects/bilge-impl-0.2.0$ file 
src/shared/discriminant_assigner.rs
  src/shared/discriminant_assigner.rs: ASCII text, with CRLF line terminators

Meson uses patch with the command above as the first preference to apply
diffs. That command is not yet customizable.

--
Best Regards
Junjie Mao

Reply via email to