signalapp / libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible.
GNU Affero General Public License v3.0
3.62k stars 420 forks source link

Error in cargo test: could not find canonical-backup.binproto #583

Closed anirbanc3 closed 4 months ago

anirbanc3 commented 4 months ago

Hi,

I have been trying to build libsignal on Ubuntu 22.04. cargo build completes successfully but getting a weird No such file or directory issue while executing cargo test

error: couldn't read rust/message-backup/tests/res/canonical-backup.binproto: No such file or directory (os error 2)
  --> rust/message-backup/tests/test_cases.rs:70:20
   |
70 |     let binproto = include_bytes!("res/canonical-backup.binproto");
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `libsignal-message-backup` (test "test_cases") due to previous error
warning: build failed, waiting for other jobs to finish...

I could manually verify the file canonical-backup.binproto is present as symbolic link in the mentioned directory. I tried uninstalling and then reinstalling rust and cargo, but the error still persists. Any suggestions or leads to resolve this will be highly appreciated.

System details: Architecture: x86_64 \ CPU op-mode(s): 32-bit, 64-bit \ Address sizes: 39 bits physical, 48 bits virtual \ Byte Order: Little Endian \ CPU(s): 12 \ On-line CPU(s) list: 0-11 \ Vendor ID: GenuineIntel \ Model name: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

Operating system: Distributor ID: Ubuntu \ Description: Ubuntu 22.04.4 LTS \ Release: 22.04 \ Codename: jammy

jrose-signal commented 4 months ago

Don't forget to check out (and update) the Signal-Message-Backup-Tests submodule, that's where the symlink is pointing. (We should probably mention the submodule in our readme, thanks for the push.)

anirbanc3 commented 4 months ago

Thanks for the response. cargo test ran successfully after updating git submodule.