media-sound/clementine-1.3.1_p20180523 failed to compile with dev-libs/protobuf-3.6.1, while there is no problem with dev-libs/protobuf-3.5.2. part of build.log: [ 5%] Running C++ protocol buffer compiler on remotecontrolmessages.proto cd /var/tmp/portage/media-sound/clementine-1.3.1_p20180523/work/clementine-1.3.1_p20180523_build/ext/libclementine-remote && /usr/bin/protoc --cpp_out=/var/tmp/portage/media-sound/clementine-1.3.1_p20180523/work/clementine-1.3.1_p20180523_build/ext/libclementine-remote -I /var/tmp/portage/media-sound/clementine-1.3.1_p20180523/work/Clementine-4619a4c1ab3b17b13d4b2327ad477912917eaf36/ext/libclementine-remote /var/tmp/portage/media-sound/clementine-1.3.1_p20180523/work/Clementine-4619a4c1ab3b17b13d4b2327ad477912917eaf36/ext/libclementine-remote/remotecontrolmessages.proto terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 make[2]: *** [ext/libclementine-spotifyblob/CMakeFiles/clementine-spotifyblob-messages.dir/build.make:63: ext/libclementine-spotifyblob/spotifymessages.pb.cc] Aborted
Created attachment 552090 [details] build.log
Not reproducible here, looks like a protobuf problem? >-- Found Threads: TRUE >terminate called after throwing an instance of 'std::system_error' > what(): Unknown error -1 >CMake Warning at /usr/share/cmake/Modules/FindProtobuf.cmake:429 (message): > Protobuf compiler version doesn't match library version 3.6.1 >Call Stack (most recent call first): > CMakeLists.txt:56 (find_package) > > >-- Found Protobuf: /usr/lib/libprotobuf.so;-lpthread (found version "3.6.1") $ protoc --version
Please show 'emerge --info'.
(In reply to Andreas Sturmlechner from comment #2) > Not reproducible here, looks like a protobuf problem? > > > >-- Found Threads: TRUE > >terminate called after throwing an instance of 'std::system_error' > > what(): Unknown error -1 > >CMake Warning at /usr/share/cmake/Modules/FindProtobuf.cmake:429 (message): > > Protobuf compiler version doesn't match library version 3.6.1 > >Call Stack (most recent call first): > > CMakeLists.txt:56 (find_package) > > > > > >-- Found Protobuf: /usr/lib/libprotobuf.so;-lpthread (found version "3.6.1") > > > $ protoc --version $ protoc --version: terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 Neúspěšně ukončen (SIGABRT)
Created attachment 552512 [details] emerge --info
Created attachment 552514 [details] strace protoc
So it's look like problem in protobuf and not clementine...
Reporter of bug #669258 said that there was no problem after switching to BFD linker and rebuilding dev-libs/protobuf. Could you test it? (By switching ld or x86_64-pc-linux-gnu-ld symlinks and -fuse-ld=gold from *FLAGS)
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #8) > (By switching ld or x86_64-pc-linux-gnu-ld symlinks and -fuse-ld=gold from > *FLAGS) (By switching ld or x86_64-pc-linux-gnu-ld symlinks and dropping -fuse-ld=gold from *FLAGS)
Yep, you're right. Adding CFLAGS="${CFLAGS} -fuse-ld=bfd" and LDFLAGS="${LDFLAGS} -Wl,-fuse-ld=bfd" into /etc/portage/package.env/ was enough. So for >dev-libs/protobuf-3.5.2 it is necessary to insert tc-ld-disable-gold into src_configure() in both ebuilds.
So after fixing protobuf-3.6.0.1.ebuild and protobuf-3.6.1.ebuild, this bugreport can be changed into RESOLVED/FIXED.
Created attachment 552690 [details, diff] protobuf-3.6.0.1 ebuild patch
Created attachment 552692 [details, diff] protobuf-3.6.1 ebuild patch
Same for net-p2p/bitcoin-qt. Building dev-libs/protobuf with ld.gold, will make net-p2p/bitcoin-qt fail. Rebuilding dev-libs/protobuf with ld.bfd and net-p2p/bitcoin-qt builds fine.
I have rebuilt dev-libs/protobuf (3.6.1, 3.6.1.1, 3.6.1.2) with -fuse-ld=gold flag and I CANNOT reproduce this bug. Please check if building with GCC 8.* (and GOLD) makes any difference.
*** Bug 669258 has been marked as a duplicate of this bug. ***
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #15) > I have rebuilt dev-libs/protobuf (3.6.1, 3.6.1.1, 3.6.1.2) with > -fuse-ld=gold flag and I CANNOT reproduce this bug. > > > Please check if building with GCC 8.* (and GOLD) makes any difference. I just emerged latest dev-libs/protobuf-3.6.1.3::gentoo and then tried to compile clementine. Same error: terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 And emerging net-p2p/bitcoin-qt spit out same thing... So on my system with gcc-8.2/binutils-2.31.1(ld.gold default), it's still necessary to go back to ld.bfd when building even latest protobuf-3.6.1.3. So I still need workaround proposed in #c12/#c13. :-(
Please check if it matters which linker was used for building sys-devel/gcc (which provides libstdc++.so): 1. Rebuild sys-devel/gcc with BFD linker 2. Rebuild dev-libs/protobuf with GOLD linker 3. Check 'protoc --version'
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #18) > Please check if it matters which linker was used for building sys-devel/gcc > (which provides libstdc++.so): > 1. Rebuild sys-devel/gcc with BFD linker > 2. Rebuild dev-libs/protobuf with GOLD linker > 3. Check 'protoc --version' 1) binutils-config --linker ld.bfd 2) disabling CFLAGS="${CFLAGS} -fuse-ld=gold" line in /etc/portage/make.conf 3) emerge -v1 =sys-devel/gcc-8.2.0-r5::gentoo 4) binutils-config --linker ld.gold 5) enabling CFLAGS="${CFLAGS} -fuse-ld=gold" line in /etc/portage/make.conf 6) emerge -v1 =dev-libs/protobuf-3.6.1.3::gentoo still: $ protoc --version terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1
I discovered that building protobuf with LTO (gcc-8.2) also causes this exact same error when running "protoc --version". Unlike most LTO problems, there were no errors during the building of protobuf. However, protoc failed with this error and Clementine won't build. So on my own system, it was not enough merely to ensure that dev-libs/protobuf was build with the BFD linker. I had to also disable LTO. Now Clementine builds successfully and running "protoc --version" produces the expected output.
I had this problem too, which caused trouble when trying to rebuild media-libs/opencv. To fix this, I added "LD=ld.bfd" to /etc/portage/env/bfd.conf, with "sys-devel/gcc bfd.conf" to package.env. Then I re-emerged gcc and the other packages mentioned in the instructions on https://wiki.gentoo.org/wiki/Upgrading_GCC. I then added "dev-libs/protobuf bfd.conf" to my package.env, and attempted to re-emerge protobuf. This did not work. I had to run "binutils-config --linker ld.bfd" before re-emerging dev-libs/protobuf and then put it back to ld.gold when the emerge finished (I have to do it this way when compiling the kernel as well, see my comments at 678224). After doing all this, media-libs/opencv emerges properly with ld.gold set as default linker.