Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686704 - net-libs/grpc-1.20.1 fails to build raising a std::system_error
Summary: net-libs/grpc-1.20.1 fails to build raising a std::system_error
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-gold
  Show dependency tree
 
Reported: 2019-05-24 22:50 UTC by Jan Ziak (atomsymbol)
Modified: 2019-06-05 17:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (net-libs:grpc-1.20.1:20190524-224557.log.gz,38.43 KB, application/gzip)
2019-05-24 22:50 UTC, Jan Ziak (atomsymbol)
Details
backtrace.txt (backtrace.txt,2.76 KB, text/plain)
2019-05-24 22:51 UTC, Jan Ziak (atomsymbol)
Details
emerge-info.txt (emerge-info.txt,7.57 KB, text/plain)
2019-05-28 12:43 UTC, Jan Ziak (atomsymbol)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2019-05-24 22:50:32 UTC
Created attachment 577726 [details]
build.log.gz

Hello.

The error snippet seems to be:

make: *** [Makefile:2626: /var/tmp/portage/net-libs/grpc-1.20.1/work/grpc-1.20.1/gens/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc] Error 1
make: *** Waiting for unfinished jobs....
third_party/protobuf/src: warning: directory does not exist.
terminate called after throwing an instance of 'std::system_error'
  what():  Unknown error -1
--grpc_out: protoc-gen-grpc: Plugin killed by signal 6.

Please also see the attached gdb backtrace.
Comment 1 Jan Ziak (atomsymbol) 2019-05-24 22:51:47 UTC
Created attachment 577728 [details]
backtrace.txt
Comment 2 Jan Ziak (atomsymbol) 2019-05-24 23:00:17 UTC
This bug is caused by having "-fuse-ld=gold" in LDFLAGS in make.conf.

dev-libs/protobuf fails to build with "-fuse-ld=gold" as well.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2019-05-25 23:56:51 UTC
seems to be known issue

https://github.com/protocolbuffers/protobuf/issues/5902
https://sourceware.org/bugzilla/show_bug.cgi?id=24527

and protobuf in gentoo has a workaround

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4be8cdbce708604f34fd8d9018198027e353a011


currently working 1.21.x bump, it will have a workaround.
maybe I'll add it to old versions.
thanks for reporting this.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2019-05-28 04:42:20 UTC
can't reproduce with gold on my system.
please provide emerge --info output
Comment 5 Jan Ziak (atomsymbol) 2019-05-28 12:43:07 UTC
Created attachment 577928 [details]
emerge-info.txt

Installed dependency: dev-libs/protobuf-3.6.1.3
Comment 6 Georgy Yakovlev archtester gentoo-dev 2019-06-05 07:29:48 UTC
well, still can't reproduce with gold.
try disabling ricer flags, rebuild all direct and indirect grpc deps and report back if you still have a failure with gold.
Comment 7 Jan Ziak (atomsymbol) 2019-06-05 15:02:14 UTC
Hi. I don't have spare time to deal with this issue right now. I am no longer using -fuse-ld=gold in make.conf due to incompatibility with several packages. We can reopen this issue if somebody else encounters it and provides the necessary info to reproduce it. Thank you for your time spent on this issue.
Comment 8 Georgy Yakovlev archtester gentoo-dev 2019-06-05 17:48:46 UTC
sure.  feel free to re-open if you ever find a reliable reproducer. just gold is not enough and I'm not enabling those flags you have.

just wanted to way that the main issue with using unsafe optimizations is that not the app itself immediately breaks, but something deep down the chain can break in unpredictable way or return wrong results at runtime.
this is likely what we are seeing here. flags broke something, but the build failure only manifests with gold. total PITA to debug.

it's much better to enable those only for apps/libs that benefit directly and known not to break.

good luck!