Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900769 - dev-lang/swig tests fail to link on sparc: relocation truncated to fit: R_SPARC_GOT13
Summary: dev-lang/swig tests fail to link on sparc: relocation truncated to fit: R_SPA...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-11 06:33 UTC by matoro
Modified: 2023-06-10 21:33 UTC (History)
3 users (show)

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


Attachments
build.log (file_900769.txt,211.77 KB, text/plain)
2023-03-11 06:35 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2023-03-11 06:33:23 UTC
Many of the unit test for dev-lang/swig (~20%) fail to link on sparc with the error "relocation truncated to fit: R_SPARC_GOT13".  One example (linking against c++ std library):

checking tcl testcase primitive_types (with run test)
primitive_types_wrap.o: in function `var_init()':
primitive_types_wrap.cxx:(.text+0x4be8): relocation truncated to fit: R_SPARC_GOT13 against symbol `var_pchar' defined in .bss section in primitive_types_wrap.o
primitive_types_wrap.cxx:(.text+0x4bf0): relocation truncated to fit: R_SPARC_GOT13 against symbol `var_pcharc' defined in .bss section in primitive_types_wrap.o
primitive_types_wrap.cxx:(.text+0x4bf8): relocation truncated to fit: R_SPARC_GOT13 against symbol `var_pint' defined in .bss section in primitive_types_wrap.o
primitive_types_wrap.cxx:(.text+0x4c00): relocation truncated to fit: R_SPARC_GOT13 against symbol `var_namet' defined in .bss section in primitive_types_wrap.o
primitive_types_wrap.o: in function `v_check()':
primitive_types_wrap.cxx:(.text+0x5c48): relocation truncated to fit: R_SPARC_GOT13 against symbol `std::cout@@GLIBCXX_3.4' defined in .bss section in /usr/lib/gcc/sparc64-unknown-linux-gnu/12/libstdc++.so
primitive_types_wrap.cxx:(.text+0x5cd4): relocation truncated to fit: R_SPARC_GOT13 against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<ch
ar> >&)@@GLIBCXX_3.4' defined in .text section in /usr/lib/gcc/sparc64-unknown-linux-gnu/12/libstdc++.so
primitive_types_wrap.cxx:(.text+0x5e44): relocation truncated to fit: R_SPARC_GOT13 against symbol `std::cout@@GLIBCXX_3.4' defined in .bss section in /usr/lib/gcc/sparc64-unknown-linux-gnu/12/libstdc++.so
primitive_types_wrap.cxx:(.text+0x5ed0): relocation truncated to fit: R_SPARC_GOT13 against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4' defined in .text section in /usr/lib/gcc/sparc64-unknown-linux-gnu/12/libstdc++.so
primitive_types_wrap.cxx:(.text+0x6044): relocation truncated to fit: R_SPARC_GOT13 against symbol `std::cout@@GLIBCXX_3.4' defined in .bss section in /usr/lib/gcc/sparc64-unknown-linux-gnu/12/libstdc++.so
primitive_types_wrap.cxx:(.text+0x60d0): relocation truncated to fit: R_SPARC_GOT13 against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)@@GLIBCXX_3.4' defined in .text section in /usr/lib/gcc/sparc64-unknown-linux-gnu/12/libstdc++.so
primitive_types_wrap.cxx:(.text+0x624c): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
make[2]: *** [../../../Examples/Makefile:1577: tcl_cpp] Error 1
make[1]: *** [Makefile:36: primitive_types.cpptest] Error 2

Another example, linking against libpython:

checking python testcase li_std_pair_extra (with run test)
li_std_pair_extra_wrap.o: in function `SWIG_Python_ErrorType(int)':
li_std_pair_extra_wrap.cxx:(.text+0x12fc): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_MemoryError'
li_std_pair_extra_wrap.cxx:(.text+0x1310): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_IOError'
li_std_pair_extra_wrap.cxx:(.text+0x1324): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_RuntimeError'
li_std_pair_extra_wrap.cxx:(.text+0x1338): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_IndexError'
li_std_pair_extra_wrap.cxx:(.text+0x134c): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_TypeError'
li_std_pair_extra_wrap.cxx:(.text+0x1360): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_ZeroDivisionError'
li_std_pair_extra_wrap.cxx:(.text+0x1374): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_OverflowError'
li_std_pair_extra_wrap.cxx:(.text+0x1388): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_SyntaxError'
li_std_pair_extra_wrap.cxx:(.text+0x139c): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_ValueError'
li_std_pair_extra_wrap.cxx:(.text+0x13b0): relocation truncated to fit: R_SPARC_GOT13 against undefined symbol `PyExc_SystemError'
li_std_pair_extra_wrap.cxx:(.text+0x13c4): additional relocation overflows omitted from the output
checking python testcase python_abstractbase (with run test)
collect2: error: ld returned 1 exit status
make[2]: *** [../../../Examples/Makefile:1283: python_cpp] Error 1
make[1]: *** [Makefile:120: li_std_pair_extra.cpptest] Error 2

Reproducible: Always




Portage 3.0.44 (python 3.10.10-final-0, default/linux/sparc/17.0/64ul, gcc-12, glibc-2.36-r5, 6.2.3-gentoo-sparc64 sparc64)
=================================================================
System uname: Linux-6.2.3-gentoo-sparc64-sparc64-sun4v-with-glibc2.36
KiB Mem:    32650568 total,  29354920 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 11 Mar 2023 00:45:01 +0000
Head commit of repository gentoo: 53e7eb032401e1f10a5248c5f214082a8f0f47b9
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.10.10_p2::gentoo, 3.11.2_p1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.45.2-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           15.0.7-r1::gentoo
sys-devel/gcc:             12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/llvm:            15.0.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="sparc"
ACCEPT_LICENSE="@FREE"
CBUILD="sparc64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe"
CHOST="sparc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-continue=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -mcpu=ultrasparc -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news 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 -mcpu=ultrasparc -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j36"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/sbin/nologin"
USE="acl big-endian bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc llvm-libunwind ncurses nls nptl openmp pam pcre readline sparc split-usr ssl test-rust unicode xattr zlib" ADA_TARGET="gnat_2021" 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" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="fbdev mga r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 matoro archtester 2023-03-11 06:35:42 UTC
Created attachment 857253 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-11 22:18:59 UTC
Any better with binutils-2.40?
Comment 3 matoro archtester 2023-03-12 17:48:25 UTC
(In reply to Sam James from comment #2)
> Any better with binutils-2.40?

No, unfortunately.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-10 21:33:31 UTC
We didn't run the tests before, so I'm not worried about this as a regression at least.