Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 712718 - dev-util/bazel-0.29.1 fails to build with glibc-2.30+
Summary: dev-util/bazel-0.29.1 fails to build with glibc-2.30+
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-15 16:11 UTC by foufou33
Modified: 2020-03-26 01:38 UTC (History)
2 users (show)

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


Attachments
build log (build.log,538.53 KB, text/x-log)
2020-03-15 16:13 UTC, foufou33
Details

Note You need to log in before you can comment on or make changes to this bug.
Description foufou33 2020-03-15 16:11:35 UTC
excerpt from build log (the rest will be attached)
ERROR: /var/tmp/portage/dev-util/bazel-0.29.1/work/third_party/grpc/BUILD:386:1: C++ compilation of rule '//third_party/grpc:gpr_base' failed (Exit 1)
third_party/grpc/src/core/lib/gpr/log_linux.cc:43:13: error: ambiguating new declaration of 'long int gettid()'
   43 | static long gettid(void) { return syscall(__NR_gettid); }
      |             ^~~~~~
In file included from /usr/include/unistd.h:1170,
                 from third_party/grpc/src/core/lib/gpr/log_linux.cc:41:
/usr/include/bits/unistd_ext.h:34:16: note: old declaration '__pid_t gettid()'
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~
third_party/grpc/src/core/lib/gpr/log_linux.cc:43:13: warning: 'long int gettid()' defined but not used [-Wunused-function]
   43 | static long gettid(void) { return syscall(__NR_gettid); }
      |             ^~~~~~
Target //src:bazel_nojdk failed to build


tensorflow 2.1.0 require this particular version

this patch seems to work 
https://github.com/mjlbach/nixpkgs/blob/b05125b77a5858dfe027ac615ebfb243dff65ad4/pkgs/development/tools/build-managers/bazel/bazel_1/glibc.patch

Reproducible: Always

Steps to Reproduce:
1. FEATURES='-ccache' emerge =dev-util/bazel-0.29.1

Actual Results:  
build fails

Expected Results:  
build succeeds 

GENTOO_VM=openjdk-8  CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""


emerge --info '=dev-util/bazel-0.29.1::gentoo'
Portage 2.3.92 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-9.2.0, glibc-2.30-r4, 5.5.2-gentoo-r1-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.5.2-gentoo-r1-x86_64-x86_64-Intel-R-_Core-TM-_i5-2500_CPU_@_3.30GHz-with-gentoo-2.7
KiB Mem:     3992116 total,   2102200 free
KiB Swap:    4008052 total,   4006004 free
Timestamp of repository gentoo: Thu, 05 Mar 2020 05:30:01 +0000
Head commit of repository gentoo: fc4627af5fec1be2a77c1256503d6079bc005fb6
Timestamp of repository R_Overlay: Thu, 05 Mar 2020 08:14:51 +0000
Head commit of repository R_Overlay: d0dca0b6bdaa22fe2d4689a02b812030e8fdd133

Timestamp of repository octave: Wed, 12 Feb 2020 17:43:11 +0000
Head commit of repository octave: d94c7e4080d80ff27f490a1eb70751ebf94be7ba

Timestamp of repository science: Thu, 05 Mar 2020 08:14:50 +0000
Head commit of repository science: 99f1c2141e6b231921048c97c8cbdb7708a65a96

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
ccache version 3.7.7 [enabled]
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.5.9::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.2::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.4::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo, 9.1.0-r1::gentoo, 9.2.0-r4::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://grenier.iro.umontreal.ca/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

R_Overlay
    location: /var/db/repos/R_Overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/R_Overlay.git
    masters: gentoo

octave
    location: /var/db/repos/octave
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/octave.git
    masters: gentoo

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en fr"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="http://grenier.iro.umontreal.ca/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode eselect-ldso evo exif flac fortran gdbm gif gles gnome gnome-keyring gnome-online-accounts gpm gssapi gstreamer gtk iconv icu introspection ipv6 jpeg kerberos lcms ldap libglvnd libnotify libsecret libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nscd ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sasl sdl seccomp spell split-usr ssl sssd startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en en-CA fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7 python3_8" RUBY_TARGETS="ruby24 ruby25 ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="intel amdgpu nouveau radeon radeonsi i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 foufou33 2020-03-15 16:13:32 UTC
Created attachment 619862 [details]
build log
Comment 2 Zac Medico gentoo-dev 2020-03-20 05:46:28 UTC
I see there was a backport of the fix posted in bug 693986 comment 17.
Comment 3 Larry the Git Cow gentoo-dev 2020-03-26 01:38:01 UTC
The bug has been closed via the following commit(s):

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

commit 698fb8eb416f848dff3553d21bae2b445f003370
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2020-03-26 01:36:13 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2020-03-26 01:37:49 +0000

    dev-util/bazel: backport gettid patch to 0.29.1.
    
    bazel-0.29.1 is still relevant because sci-libs/tensorflow-2.1.0
    depends on it.
    
    Reported-By: foufou33@gmail.com, Zheng Dong
    Closes: https://bugs.gentoo.org/712718
    Package-Manager: Portage-2.3.88, Repoman-2.3.18
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-util/bazel/Manifest            | 1 +
 dev-util/bazel/bazel-0.29.1.ebuild | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)