Bug: rustc cargo compilation failure: mozilla/third_party/rust/dns-parser
Status: RESOLVED
Priority: --
Resolution: WORKSFORME
Created: 2020-06-28 23:57:20+00:00
Resolved: 2020-07-28 06:53:22+00:00

I am building C-C TB on my local linux PC (Debian GNU/Linux amd64).

After updating M-C and C-C in the last 12 hours or so,
I can't build C-C TB because dns-parser cannot be compiled due to
compiler failure(?).

I am using GCC version 9, but the error is probably unrelated to it
since the issue is rustc compiler.

My version of rustc:
$ rustc --version
rustc 1.44.1 (c7087fe00 2020-06-17)

It was upgraded after |mach configure| complained that my rustc
version was too old. cbindgen was also updated.

Basically, I did the following. |./do-make-tb.sh|
is a wrapper to invoke |mach| after setting up proper environment variables, etc. for my
local build.

```
 3154  06/29/20 06 35:  ./do-make-tb.sh clobber
 3155  06/29/20 06 36:  ./do-make-tb.sh configure
 3156  06/29/20 06 36:  rustup update
 3157  06/29/20 06 37:  ./do-make-tb.sh configure
 3158  06/29/20 06 37:  cargo install cbindgen --force
 3159  06/29/20 06 39:  ./do-make-tb.sh configure
 3160  06/29/20 06 41:  ./do-make-tb.sh
```

 Now, I get the compilation faiure.

The error message is not very helpful.
It simply says the process didn't exit successfully.
Since it did not print any syntax error or something, maybe a rustc compiler error?
As I write this, the error message says "(exit code: 2)" at the end.
Does this ring a bell?
OK, I checked the linux errno.
2 is 
```
#define	ENOENT		 2	/* No such file or directory */
```
Hmm... I have no idea if a file is missing or something in the directory.
If so, the compiler ought to print a helpful message.


Local log:
```
   Compiling dns-parser v0.8.0
     Running `CARGO=/home/ishikawa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_MANIFEST_DIR=/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/dns-parser CARGO_PKG_AUTHORS='Paul Colomiets <paul@colomiets.name>' CARGO_PKG_DESCRIPTION='    Pure-rust DNS protocol parser library. This does not support network, only
    raw protocol parser.
' CARGO_PKG_HOMEPAGE='https://github.com/tailhook/dns-parser' CARGO_PKG_NAME=dns-parser CARGO_PKG_REPOSITORY= CARGO_PKG_VERSION=0.8.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=8 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE= LD_LIBRARY_PATH='/NEW-SSD/moz-obj-dir/objdir-tb3/debug/deps:/home/ishikawa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib::/usr/local/lib:/usr/local/lib' sccache /home/ishikawa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name dns_parser /NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/dns-parser/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C panic=abort -C debuginfo=2 -C debug-assertions=on -C metadata=76aac579aee90bdf -C extra-filename=-76aac579aee90bdf --out-dir /NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C linker=/NEW-SSD/NREF-COMM-CENTRAL/mozilla/build/cargo-linker -L dependency=/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps -L dependency=/NEW-SSD/moz-obj-dir/objdir-tb3/debug/deps --extern byteorder=/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps/libbyteorder-79701cc361696db7.rmeta --extern quick_error=/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps/libquick_error-479b173f92149bbb.rmeta --cap-lints warn -C opt-level=2 -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -C codegen-units=1`
error: failed to execute compile
caused by: error reading compile response from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
error: could not compile `dns-parser`.
Caused by:
  process didn't exit successfully: `CARGO=/home/ishikawa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_MANIFEST_DIR=/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/dns-parser CARGO_PKG_AUTHORS='Paul Colomiets <paul@colomiets.name>' CARGO_PKG_DESCRIPTION='    Pure-rust DNS protocol parser library. This does not support network, only
    raw protocol parser.
' CARGO_PKG_HOMEPAGE='https://github.com/tailhook/dns-parser' CARGO_PKG_NAME=dns-parser CARGO_PKG_REPOSITORY= CARGO_PKG_VERSION=0.8.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=8 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE= LD_LIBRARY_PATH='/NEW-SSD/moz-obj-dir/objdir-tb3/debug/deps:/home/ishikawa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib::/usr/local/lib:/usr/local/lib' sccache /home/ishikawa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name dns_parser /NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/dns-parser/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C panic=abort -C debuginfo=2 -C debug-assertions=on -C metadata=76aac579aee90bdf -C extra-filename=-76aac579aee90bdf --out-dir /NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C linker=/NEW-SSD/NREF-COMM-CENTRAL/mozilla/build/cargo-linker -L dependency=/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps -L dependency=/NEW-SSD/moz-obj-dir/objdir-tb3/debug/deps --extern byteorder=/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps/libbyteorder-79701cc361696db7.rmeta --extern quick_error=/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/deps/libquick_error-479b173f92149bbb.rmeta --cap-lints warn -C opt-level=2 -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -C codegen-units=1` (exit code: 2)
make[4]: *** [/NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/makefiles/rust.mk:294: force-cargo-library-build] Error 101
make[4]: Leaving directory '/NEW-SSD/moz-obj-dir/objdir-tb3/toolkit/library/rust'
make[3]: *** [/NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/recurse.mk:72: toolkit/library/rust/target] Error 2
make[3]: *** Waiting for unfinished jobs....
```
OK, I am using sccache. Is it possible that sccache may have a bad cache data due to ^-C interrupt or something?

This is the second time a third party software bit local mozilla build this
year. The first time it was librnp.

Any tips to work around this bug will be appreciated.

TIA