Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585874 - sys-libs/libunwind-1.1 - ../src/.libs/libunwind-x86_64.so: undefined reference to `_Ux86_64_setcontext'
Summary: sys-libs/libunwind-1.1 - ../src/.libs/libunwind-x86_64.so: undefined referenc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-13 22:52 UTC by Bassam Tabbara
Modified: 2016-06-17 16:03 UTC (History)
1 user (show)

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


Attachments
build log (libwunwind-build-failure.log,110.12 KB, text/plain)
2016-06-13 22:52 UTC, Bassam Tabbara
Details
build.log for sys-libs/libunwind-1.2_rc1 (build.log,94.64 KB, text/plain)
2016-06-14 02:12 UTC, Matt Whitlock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bassam Tabbara 2016-06-13 22:52:25 UTC
Created attachment 437452 [details]
build log

I am building libunwind-1.1 on a CoreOS machine (based on gentoo and uses the same ebuilds) and getting the following error:

/bin/sh ../libtool --tag=CC   --mode=link x86_64-cros-linux-gnu-gcc  -O2 -pipe -mtune=generic -g -fexceptions -Wall -Wsign-compare  -Wl,-O1 -Wl,--as-needed -o test-coredump-unwind test-coredump-unwind.o ../src/libunwind-coredump.la ../src/libunwind-x86_64.la 
libtool: link: x86_64-cros-linux-gnu-gcc -O2 -pipe -mtune=generic -g -fexceptions -Wall -Wsign-compare -Wl,-O1 -o .libs/test-coredump-unwind test-coredump-unwind.o  -Wl,--as-needed ../src/.libs/libunwind-coredump.so ../src/.libs/libunwind-x86_64.so
/usr/libexec/gcc/x86_64-cros-linux-gnu/ld: warning: libunwind.so.8, needed by ../src/.libs/libunwind-x86_64.so, not found (try using -rpath or -rpath-link)
../src/.libs/libunwind-x86_64.so: undefined reference to `_Ux86_64_setcontext'
collect2: error: ld returned 1 exit status
Makefile:794: recipe for target 'test-coredump-unwind' failed
make[1]: *** [test-coredump-unwind] Error 1

If I emerge libunwind-1.0.1 it seems to work, but not libunwind-1.1. Build logs attached. Any help appreciated.
Comment 1 Matt Whitlock 2016-06-14 02:12:16 UTC
Created attachment 437464 [details]
build.log for sys-libs/libunwind-1.2_rc1

sys-libs/libunwind-1.2_rc1 also fails, with a different but seemingly related error:

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/os-linux.o mi/.libs/init.o mi/.libs/flush_cache.o mi/.libs/mempool.o mi/.libs/strerror.o x86_64/.libs/is_fpreg.o x86_64/.libs/regname.o x86_64/.libs/Los-linux.o mi/.libs/_ReadULEB.o mi/.libs/_ReadSLEB.o mi/.libs/backtrace.o mi/.libs/dyn-cancel.o mi/.libs/dyn-info-list.o mi/.libs/dyn-register.o mi/.libs/Ldyn-extract.o mi/.libs/Lfind_dynamic_proc_info.o mi/.libs/Lget_accessors.o mi/.libs/Lget_proc_info_by_ip.o mi/.libs/Lget_proc_name.o mi/.libs/Lput_dynamic_unwind_info.o mi/.libs/Ldestroy_addr_space.o mi/.libs/Lget_reg.o mi/.libs/Lset_reg.o mi/.libs/Lget_fpreg.o mi/.libs/Lset_fpreg.o mi/.libs/Lset_caching_policy.o unwind/.libs/Backtrace.o unwind/.libs/DeleteException.o unwind/.libs/FindEnclosingFunction.o unwind/.libs/ForcedUnwind.o unwind/.libs/GetBSP.o unwind/.libs/GetCFA.o unwind/.libs/GetDataRelBase.o unwind/.libs/GetGR.o unwind/.libs/GetIP.o unwind/.libs/GetLanguageSpecificData.o unwind/.libs/GetRegionStart.o unwind/.libs/GetTextRelBase.o unwind/.libs/RaiseException.o unwind/.libs/Resume.o unwind/.libs/Resume_or_Rethrow.o unwind/.libs/SetGR.o unwind/.libs/SetIP.o unwind/.libs/GetIPInfo.o x86_64/.libs/setcontext.o x86_64/.libs/Lcreate_addr_space.o x86_64/.libs/Lget_save_loc.o x86_64/.libs/Lglobal.o x86_64/.libs/Linit.o x86_64/.libs/Linit_local.o x86_64/.libs/Linit_remote.o x86_64/.libs/Lget_proc_info.o x86_64/.libs/Lregs.o x86_64/.libs/Lresume.o x86_64/.libs/Lstash_frame.o x86_64/.libs/Lstep.o x86_64/.libs/Ltrace.o x86_64/.libs/getcontext.o  -Wl,--whole-archive ./.libs/libunwind-dwarf-local.a ./.libs/libunwind-elf64.a -Wl,--no-whole-archive  -Wl,--as-needed -lc -lgcc_s -llzma  -march=native -O3 -nostartfiles -nostdlib -Wl,-O2   -Wl,-soname -Wl,libunwind.so.8 -o .libs/libunwind.so.8.0.1
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: ./.libs/libunwind-dwarf-local.a(Lstep.o): multiple definition of '_ULx86_64_step'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: x86_64/.libs/Lstep.o: previous definition here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2571: libunwind.la] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-libs/libunwind-1.2_rc1/work/libunwind-1.2-rc1/src'
make[1]: *** [Makefile:1634: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-libs/libunwind-1.2_rc1/work/libunwind-1.2-rc1/src'
make: *** [Makefile:584: all-recursive] Error 1


# emerge --info '=sys-libs/libunwind-1.2_rc1::gentoo'
Portage 2.3.0_rc1 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r2, 4.6.1-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.6.1-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     8166136 total,    586784 free
KiB Swap:    8388604 total,   6336292 free
Timestamp of repository gentoo: Mon, 13 Jun 2016 22:00:01 +0000
sh dash 0.5.8.2
ld GNU gold (Gentoo 2.25.1 p1.1 2.25.1) 1.11
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.2.5 [enabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.4::gentoo
dev-util/ccache:          3.2.5::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

local
    location: /usr/local/portage/overlay
    masters: gentoo
    priority: -2000

bitcoin
    location: /var/lib/layman/bitcoin
    sync-type: laymansync
    sync-uri: https://gitlab.com/bitcoin/gentoo.git
    masters: gentoo
    priority: -1500

fw-overlay
    location: /var/lib/layman/fw-overlay
    sync-type: laymansync
    sync-uri: https://github.com/no-hope/fw-overlay.git
    masters: gentoo
    priority: -1500

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo
    priority: -1500

vmware
    location: /var/lib/layman/vmware
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/vmware.git
    masters: gentoo
    priority: -1500

x11
    location: /var/lib/layman/x11
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/x11
    masters: gentoo
    priority: -1500

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

lbry
    location: /usr/local/portage/overlays/lbry
    sync-type: git
    sync-uri: https://github.com/lbryio/lbry-gentoo-overlay.git
    masters: gentoo

jmesmon
    location: /var/lib/layman/jmesmon
    sync-type: laymansync
    sync-uri: git://github.com/jmesmon/overlay.git
    masters: gentoo jmesmon
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/X11/xkb /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/yp/Makefile"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dbus-1 /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O3 -ggdb -pipe"
DISTDIR="/usr/local/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --unordered-display --usepkg"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://mirrors.rit.edu/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ http://gentoo.mirrors.pair.com/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
MAKEOPTS="-j5 -l8"
PKGDIR="/usr/local/portage/packages"
PORTAGE_COMPRESS="xz"
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 acpi alsa amd64 berkdb branding bzip2 cairo cdda cdparanoia cdr cli consolekit cracklib crypt cups curl cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fontconfig gdbm gif git glamor gmp gstreamer gtk iconv icu ipv6 java jpeg kde kipi lame lcms libnotify libsamplerate lzma mad matroska mmx mmxext mng modules mp3 mp4 mpeg multilib mysql ncurses nptl nsplugin ogg opengl openmp pango pcre pdf phonon php plasma png policykit ppds qml qt3support qt4 qt5 quicktime readline sdl seccomp session smp spell sse sse2 ssl startup-notification subversion svg taglib tcmalloc theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vnc vorbis vpx webkit widgets x264 xcb xcomposite xml xscreensaver xv xvid xvmc yahoo zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" LIRC_DEVICES="mceusb" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 SpanKY gentoo-dev 2016-06-16 15:00:26 UTC
this is fixed in 1.1-r1 already
Comment 3 Matt Whitlock 2016-06-16 15:32:24 UTC
(In reply to SpanKY from comment #2)
> this is fixed in 1.1-r1 already

sys-libs/libunwind-1.2_rc1 still fails. Shall I open a new bug?
Comment 4 SpanKY gentoo-dev 2016-06-16 16:13:56 UTC
(In reply to Matt Whitlock from comment #3)

i've pushed a commit already for 1.2_rc1 to pull the change from 1.1-r1

the test failures are still covered in bug 461958
Comment 5 Matt Whitlock 2016-06-17 14:16:30 UTC
(In reply to SpanKY from comment #4)
> i've pushed a commit already for 1.2_rc1 to pull the change from 1.1-r1

When should I expect to be able to rsync your fix? I've just sync'd a few minutes ago, and I'm still getting the same failure in 1.1, 1.1-r1, and 1.2_rc1.

/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: ./.libs/libunwind-dwarf-local.a(Lstep.o): multiple definition of '_ULx86_64_step'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: x86_64/.libs/Lstep.o: previous definition here
collect2: error: ld returned 1 exit status

This same failure occurs even if I force usage of the BFD linker (instead of Gold), although the error message is phrased a little differently:

./.libs/libunwind-dwarf-local.a(Lstep.o): In function `_ULx86_64_step':
/var/tmp/portage/sys-libs/libunwind-1.2_rc1/work/libunwind-1.2-rc1/src/x86_64/Gstep.c:57: multiple definition of `_ULx86_64_step'
x86_64/.libs/Lstep.o:/var/tmp/portage/sys-libs/libunwind-1.2_rc1/work/libunwind-1.2-rc1/src/x86_64/Gstep.c:57: first defined here
collect2: error: ld returned 1 exit status
Comment 6 SpanKY gentoo-dev 2016-06-17 15:38:44 UTC
(In reply to Matt Whitlock from comment #5)

then it's not the same error as any reported thus far, so you should open a new bug report
Comment 7 Matt Whitlock 2016-06-17 15:46:19 UTC
(In reply to SpanKY from comment #6)
> you should open a new bug report

https://bugs.gentoo.org/show_bug.cgi?id=586208
Comment 8 Bassam Tabbara 2016-06-17 16:03:02 UTC
FWIW, I can verify that 1.1-r1 fixed the problem I was seeing. Thank you!