Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 648248 - =dev-libs/protobuf-3.5* fails to build on ia64: .libs/libprotobuf.so: undefined reference to `google::protobuf::internal::Release_CompareAndSwap(long volatile*, long, long)'
Summary: =dev-libs/protobuf-3.5* fails to build on ia64: .libs/libprotobuf.so: undefin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 647462
  Show dependency tree
 
Reported: 2018-02-20 09:53 UTC by Sergei Trofimovich (RETIRED)
Modified: 2018-02-21 20:34 UTC (History)
3 users (show)

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


Attachments
dev-libs-protobuf-3.5.1.1-build.log (dev-libs-protobuf-3.5.1.1-build.log,182.58 KB, text/x-log)
2018-02-20 09:56 UTC, Sergei Trofimovich (RETIRED)
Details
0001-Adding-Release_CompareAndSwap-64-bit-variant.patch (0001-Adding-Release_CompareAndSwap-64-bit-variant.patch,1.15 KB, patch)
2018-02-21 08:02 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2018-02-20 09:53:25 UTC
Looks like ifdef branch does not use generic c11 implementation (gcc-6.4.0):

guppy /var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64 # make
make  all-recursive
make[1]: Entering directory '/var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64'
Making all in .
make[2]: Entering directory '/var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64'
make[2]: Leaving directory '/var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64'
Making all in src
make[2]: Entering directory '/var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64/src'
/bin/sh ../libtool  --tag=CXX   --mode=link ia64-unknown-linux-gnu-g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare  -O2 -pipe -pthread -Wl,-O1 -Wl,--hash-style=gnu -o protoc google/protobuf/compiler/main.o -lpthread libprotobuf.la libprotoc.la -lz
libtool: link: ia64-unknown-linux-gnu-g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -pipe -pthread -Wl,-O1 -Wl,--hash-style=gnu -o .libs/protoc google/protobuf/compiler/main.o  ./.libs/libprotobuf.so ./.libs/libprotoc.so /var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64/src/.libs/libprotobuf.so -lpthread -lz -pthread
./.libs/libprotobuf.so: undefined reference to `google::protobuf::internal::Release_CompareAndSwap(long volatile*, long, long)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3364: protoc] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64/src'
make[1]: *** [Makefile:1554: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-libs/protobuf-3.5.1.1/work/protobuf-3.5.1.1-.ia64'
make: *** [Makefile:1461: all] Error 2
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-02-20 09:54:46 UTC
# emerge --info
Portage 2.3.19 (python 3.5.4-final-0, default/linux/ia64/17.0, gcc-6.4.0, glibc-2.25-r10, 4.9.72-gentoo ia64)
=================================================================
System uname: Linux-4.9.72-gentoo-ia64-Dual-Core_Intel-R-_Itanium-R-_Processor_9040-with-gentoo-2.4.1
KiB Mem:    16658832 total,    804272 free
KiB Swap:    1999184 total,   1998384 free
Timestamp of repository gentoo: Tue, 20 Feb 2018 02:15:01 +0000
Head commit of repository gentoo: 7af3e0c8da764351c0760608e11f9ea91aedcba1
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r10::gentoo
Repositories:

gentoo
    location: /bound/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:

crossdev
    location: /co
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="ia64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /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="/bound/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict stricter test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"
MAKEOPTS="-j5 -l5"
PKGDIR="/usr/portage/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 acl berkdb bzip2 cairo cli corefonts crypt cxx dbus dri fortran gd gdbm glamor gtk ia64 iconv ipv6 jpeg modules ncurses nls nptl openmp pam pcre png pulseaudio python readline sqlite ssl systemd tcpd text truetype unicode xattr xvfb zlib" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock 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" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23 ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga nv r128 radeon savage vesa dummy v4l" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2018-02-20 09:56:26 UTC
Created attachment 520276 [details]
dev-libs-protobuf-3.5.1.1-build.log
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-02-21 08:02:44 UTC
Created attachment 520368 [details, diff]
0001-Adding-Release_CompareAndSwap-64-bit-variant.patch

0001-Adding-Release_CompareAndSwap-64-bit-variant.patch is the upstream patch extracted as-is.

Fixes build failure on ia64 and passes all tests \o/
Comment 4 Larry the Git Cow gentoo-dev 2018-02-21 20:34:07 UTC
The bug has been closed via the following commit(s):

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

commit 34f2b3a8006ca31bcc03364066ec7dcd68d2950e
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2018-02-21 17:57:00 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-02-21 20:32:17 +0000

    dev-libs/protobuf: Fix building on IA64.
    
    Closes: https://bugs.gentoo.org/648248

 .../files/protobuf-3.5.0-atomic_operations.patch    | 21 +++++++++++++++++++++
 dev-libs/protobuf/protobuf-3.5.1.1.ebuild           |  7 ++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)