Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706946 - dev-util/android-tools-9.0.0_p3-r1 : fails to build with -fno-common or gcc-10
Summary: dev-util/android-tools-9.0.0_p3-r1 : fails to build with -fno-common or gcc-10
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: -fno-common
  Show dependency tree
 
Reported: 2020-01-28 18:45 UTC by Toralf Förster
Modified: 2020-05-28 06:21 UTC (History)
6 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.31 KB, text/plain)
2020-01-28 18:45 UTC, Toralf Förster
Details
dev-util:android-tools-9.0.0_p3-r1:20200128-124456.log (dev-util:android-tools-9.0.0_p3-r1:20200128-124456.log,234.15 KB, text/plain)
2020-01-28 18:45 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,87.06 KB, text/plain)
2020-01-28 18:45 UTC, Toralf Förster
Details
environment (environment,157.47 KB, text/plain)
2020-01-28 18:46 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.60 KB, application/x-bzip)
2020-01-28 18:46 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,187.06 KB, application/x-bzip)
2020-01-28 18:46 UTC, Toralf Förster
Details
android-tools-9.0.0-fno-common.patch (android-tools-9.0.0-fno-common.patch,43.09 KB, patch)
2020-05-26 17:48 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-01-28 18:45:48 UTC
FAILED: adb 
x86_64-pc-linux-gnu-g++ -lpthread -lusb-1.0 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed core/base/file.cpp.o core/base/logging.cpp.o core/base/parsenetaddress.cpp.o core/base/stringprintf.cpp.o core/base/strings.cpp.o core/base/errors_unix.cpp.o core/base/test_utils.cpp.o core/liblog/log_event_write.c.o core/liblog/fake_log_device.c.o core/liblog/log_event_list.c.o core/liblog/logger_write.c.o core/liblog/config_write.c.o core/liblog/config_read.c.o core/liblog/logger_lock.c.o core/liblog/local_logger.c.o core/liblog/fake_writer.c.o core/liblog/logger_name.c.o core/liblog/stderr_write.c.o core/liblog/logprint.c.o core/libcutils/load_file.cpp.o core/libcutils/socket_local_client_unix.cpp.o core/libcutils/socket_network_client_unix.cpp.o core/libcutils/socket_local_server_unix.cpp.o core/libcutils/sockets_unix.cpp.o core/libcutils/socket_inaddr_any_server_unix.cpp.o core/libcutils/sockets.cpp.o core/libcutils/android_get_control_file.cpp.o core/libcutils/threads.cpp.o core/libcutils/fs_config.cpp.o core/libcutils/canned_fs_config.cpp.o core/adb/adb.cpp.o core/adb/adb_io.cpp.o core/adb/adb_listeners.cpp.o core/adb/adb_trace.cpp.o core/adb/adb_utils.cpp.o core/adb/bugreport.cpp.o core/adb/line_printer.cpp.o core/adb/sockets.cpp.o core/adb/transport.cpp.o core/adb/transport_local.cpp.o core/adb/transport_usb.cpp.o core/adb/transport_mdns_unsupported.cpp.o core/adb/fdevent.cpp.o core/adb/adb_auth_host.cpp.o core/adb/shell_service_protocol.cpp.o core/adb/console.cpp.o core/adb/socket_spec.cpp.o core/adb/commandline.cpp.o core/adb/adb_client.cpp.o core/adb/services.cpp.o core/adb/file_sync_client.cpp.o core/adb/sysdeps_unix.cpp.o core/adb/sysdeps/errno.cpp.o core/adb/client/main.cpp.o core/adb/client/usb_dispatch.cpp.o core/adb/client/usb_linux.cpp.o core/adb/client/usb_libusb.cpp.o core/adb/sysdeps/posix/network.cpp.o core/adb/diagnose_usb.cpp.o core/libcrypto_utils/android_pubkey.c.o boringssl/build/crypto/libcrypto.a -o adb
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: core/liblog/config_write.c.o:(.bss+0x0): multiple definition of `__android_log_transport'; core/liblog/logger_write.c.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: core/liblog/config_write.c.o:(.bss+0x20): multiple definition of `__android_log_readers_lock'; core/liblog/logger_write.c.o:(.bss+0x20): first defined here

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-20200126-201521

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.6
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.40.0 *
java-config:
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.242_p08 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Tue, 28 Jan 2020 12:06:25 +0000

emerge -qpvO dev-util/android-tools
[ebuild  N    ] dev-util/android-tools-9.0.0_p3-r1  USE="-python" PYTHON_TARGETS="python2_7 python3_6 -python3_7"
Comment 1 Toralf Förster gentoo-dev 2020-01-28 18:45:51 UTC
Created attachment 606756 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-28 18:45:54 UTC
Created attachment 606758 [details]
dev-util:android-tools-9.0.0_p3-r1:20200128-124456.log
Comment 3 Toralf Förster gentoo-dev 2020-01-28 18:45:57 UTC
Created attachment 606760 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-01-28 18:46:00 UTC
Created attachment 606762 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-01-28 18:46:04 UTC
Created attachment 606764 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-01-28 18:46:08 UTC
Created attachment 606766 [details]
logs.tbz2
Comment 7 Peter Levine 2020-05-26 17:48:09 UTC
Created attachment 641948 [details, diff]
android-tools-9.0.0-fno-common.patch
Comment 8 Matt Whitlock 2020-05-27 19:09:42 UTC
(In reply to Peter Levine from comment #7)
> Created attachment 641948 [details, diff] [details, diff]
> android-tools-9.0.0-fno-common.patch

Thanks for the patch. The build still fails for me on ~amd64 with GCC 10.1.

FAILED: crypto/asn1/CMakeFiles/asn1.dir/tasn_enc.c.o 
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc -DBORINGSSL_IMPLEMENTATION -I../third_party/googletest/include -I../crypto/../include -I../crypto/asn1/../../include  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -pipe -O3 -march=native -ggdb -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wall -ggdb -fvisibility=hidden -fno-common -Wno-free-nonheap-object -Wimplicit-fallthrough -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -Wshadow -std=c11 -D_XOPEN_SOURCE=700 -MD -MT crypto/asn1/CMakeFiles/asn1.dir/tasn_enc.c.o -MF crypto/asn1/CMakeFiles/asn1.dir/tasn_enc.c.o.d -o crypto/asn1/CMakeFiles/asn1.dir/tasn_enc.c.o -c ../crypto/asn1/tasn_enc.c
../crypto/asn1/tasn_enc.c: In function 'ASN1_item_ex_i2d':
../crypto/asn1/tasn_enc.c:193:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
  193 |         if (aclass & ASN1_TFLG_NDEF)
      |            ^
../crypto/asn1/tasn_enc.c:197:5: note: here
  197 |     case ASN1_ITYPE_SEQUENCE:
      |     ^~~~
cc1: all warnings being treated as errors


It generally isn't a good idea for ebuilds to pass -Werror to the compiler. New versions of GCC implement new warnings that can break a build that uses -Werror.
Comment 9 Peter Levine 2020-05-27 20:21:37 UTC
(In reply to Matt Whitlock from comment #8)
> (In reply to Peter Levine from comment #7)
> > Created attachment 641948 [details, diff] [details, diff] [details, diff]
> > android-tools-9.0.0-fno-common.patch
> 
> Thanks for the patch. The build still fails for me on ~amd64 with GCC 10.1.

I can't reproduce it on my end but something like this at the end of src_prepare() should fix it:
> sed -i -e '/set(C_CXX_FLAGS \"-Werror/d' "${WORKDIR}"/boringssl/CMakeLists.txt || die
Comment 10 Peter Levine 2020-05-27 20:24:28 UTC
(In reply to Peter Levine from comment #9)
> (In reply to Matt Whitlock from comment #8)
> > (In reply to Peter Levine from comment #7)
> > > Created attachment 641948 [details, diff] [details, diff] [details, diff] [details, diff]
> > > android-tools-9.0.0-fno-common.patch
> > 
> > Thanks for the patch. The build still fails for me on ~amd64 with GCC 10.1.
> 
> I can't reproduce it on my end but something like this at the end of
> src_prepare() should fix it:
> > sed -i -e '/set(C_CXX_FLAGS \"-Werror/d' "${WORKDIR}"/boringssl/CMakeLists.txt || die

Sorry, meant this;
> sed -i -e '/set(C_CXX_FLAGS \"-Werror/s/-Werror//' /var/tmp/portage/dev-util/android-tools-9.0.0_p3-r1/work/boringssl/CMakeLists.txt
Comment 11 Peter Levine 2020-05-27 20:25:28 UTC
(In reply to Peter Levine from comment #10)
> (In reply to Peter Levine from comment #9)
> > (In reply to Matt Whitlock from comment #8)
> > > (In reply to Peter Levine from comment #7)
> > > > Created attachment 641948 [details, diff] [details, diff] [details, diff] [details, diff] [details, diff]
> > > > android-tools-9.0.0-fno-common.patch
> > > 
> > > Thanks for the patch. The build still fails for me on ~amd64 with GCC 10.1.
> > 
> > I can't reproduce it on my end but something like this at the end of
> > src_prepare() should fix it:
> > > sed -i -e '/set(C_CXX_FLAGS \"-Werror/d' "${WORKDIR}"/boringssl/CMakeLists.txt || die
> 
> Sorry, meant this;
> > sed -i -e '/set(C_CXX_FLAGS \"-Werror/s/-Werror//' /var/tmp/portage/dev-util/android-tools-9.0.0_p3-r1/work/boringssl/CMakeLists.txt

> sed -i -e '/set(C_CXX_FLAGS \"-Werror/s/-Werror//' "${WORKDIR}"/boringssl/CMakeLists.txt || die
Comment 12 Larry the Git Cow gentoo-dev 2020-05-28 06:21:26 UTC
The bug has been referenced in the following commit(s):

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

commit b0e6ca5b5a6abc85d0e0415455cc1e7986a99586
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-05-28 06:13:10 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-05-28 06:21:19 +0000

    dev-util/android-tools: remove -Werror (bug 706946)
    
    Bug: https://bugs.gentoo.org/706946
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/android-tools/android-tools-9.0.0_p3-r1.ebuild | 2 ++
 1 file changed, 2 insertions(+)