New issue
Advanced search Search tips

Issue 722901 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 642230
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

emerge QA notice when building packages with non-C/C++ binaries

Project Member Reported by za...@chromium.org, May 16 2017

Issue description

I encountered this case when the package (dev-util/cargo) I was building was made with rustc. The error message:

readelf: Warning: Section '.GCC.command.line' was not dumped because it does not exist!
File not built with -frecord-gcc-switches: /var/tmp/portage/dev-util/cargo-0.17.0/image/usr/bin/cargo
File not built with gold: /var/tmp/portage/dev-util/cargo-0.17.0/image/usr/bin/cargo

Clearly the binchecks rely on binaries being built with a command line section in the elf. It would be nice if the binchecks would skip the steps that rely on that section if it is not present.
 

Comment 1 by vapier@chromium.org, May 16 2017

i'm pretty sure rust is producing ELFs.  it seems extremely unlikely it's producing any other executable format since the kernel only supports ELFs, and we aren't allowing any new interpreters onto the system.

which means we still want ELF checks, and disabling the binchecks in the eclass is incorrect.

Comment 2 by za...@chromium.org, May 16 2017

It's correct to still have binchecks, but it appears this failing check is looking for a section labeled '.GCC.command.line' which, by my naive interpretation, is something only gcc-compatible compilers would include. It wouldn't even make sense for rustc to output that section as its command line options are totally different.

Comment 3 by vapier@chromium.org, May 16 2017

which is mostly what issue 642230 is about

the gold check does not rely on command line flag tracking

Comment 4 by za...@chromium.org, May 16 2017

I think this issue is totally independent of the one you mentioned. Fundamentally, it makes no sense to check certain GCC flags were used to build a binary that GCC had no part in producing.
It's true that the binary was not built with gold because it was linked with  x86_64-pc-linux-gnu-gcc (which seems like a contradiction of my previous sentence but this gcc invocation is purely for linking purposes), which after some interrogation with -print-prog-name=ld, said it uses the bfd version of ld.

Comment 5 by vapier@chromium.org, May 16 2017

that issue covers builds by clang too which are impacted.  i don't think special casing rust is worth the effort.

Comment 6 by za...@chromium.org, May 16 2017

So we're in agreement that disabling binchecks is the correct choice for non-gcc packages that build binaries?

Comment 7 by vapier@chromium.org, May 16 2017

of course not.  the *one* bad check you highlighted is just a single check.  turning off all binchecks disables a lot more checks that do make sense.

you should just ignore it and wait for issue 642230 to be resolved.

Comment 8 by za...@chromium.org, May 16 2017

Mergedinto: 642230
Status: Duplicate (was: Untriaged)
I'll just merge it with that then.

Sign in to add a comment