Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692444 - dev-db/mysql-connector-c-8.0.17-r1: emake failed: my_thr_init.cc:function my_thread_end: error: TLS relocation against invalid instruction
Summary: dev-db/mysql-connector-c-8.0.17-r1: emake failed: my_thr_init.cc:function my_...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-18 10:26 UTC by Conrad Kostecki
Modified: 2019-10-24 21:28 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,222.66 KB, text/plain)
2019-08-18 10:26 UTC, Conrad Kostecki
Details
build.log from successfully build using ld.gold (gold_build.log,299.73 KB, text/plain)
2019-08-18 13:16 UTC, Thomas Deutschmann (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2019-08-18 10:26:00 UTC
[153/213] : && /usr/bin/cmake -E remove archive_output_directory/libdbug.a && /usr/bin/ar qc archive_output_directory/libdbug.a  dbug/CMakeFiles/dbug_objlib.dir/dbug.cc.o dbug/CMakeFiles/dbug_objlib.dir/trace.cc.o && /usr/bin/ranlib archive_output_directory/libdbug.a && :
[154/213] : && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -m32  -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden -Wall -Wextra -Wformat-security -Wvla -Wundef -Woverloaded-virtual -Wimplicit-fallthrough=2 -Wlogical-op  -fuse-ld=gold -Wl,--gc-sections -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,-z,now mysys/CMakeFiles/thr_lock.dir/thr_lock.cc.o  -o runtime_output_directory/thr_lock  -lpthread archive_output_directory/libmysys.a archive_output_directory/libdbug.a archive_output_directory/libmysys.a archive_output_directory/libdbug.a archive_output_directory/libmytime.a archive_output_directory/libstrings.a /usr/lib/libz.so -lm -lrt /usr/lib/libssl.so /usr/lib/libcrypto.so -ldl -lpthread && :
FAILED: runtime_output_directory/thr_lock
: && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -m32  -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden -Wall -Wextra -Wformat-security -Wvla -Wundef -Woverloaded-virtual -Wimplicit-fallthrough=2 -Wlogical-op  -fuse-ld=gold -Wl,--gc-sections -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,-z,now mysys/CMakeFiles/thr_lock.dir/thr_lock.cc.o  -o runtime_output_directory/thr_lock  -lpthread archive_output_directory/libmysys.a archive_output_directory/libdbug.a archive_output_directory/libmysys.a archive_output_directory/libdbug.a archive_output_directory/libmytime.a archive_output_directory/libstrings.a /usr/lib/libz.so -lm -lrt /usr/lib/libssl.so /usr/lib/libcrypto.so -ldl -lpthread && :
archive_output_directory/libmysys.a(my_thr_init.cc.o):my_thr_init.cc:function my_thread_end: error: TLS relocation against invalid instruction
collect2: Fehler: ld gab 1 als Ende-Status zurück
ninja: build stopped: subcommand failed.
 * ERROR: dev-db/mysql-connector-c-8.0.17-r1::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed
 *
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 2597:  Called cmake-multilib_src_compile
 *   environment, line  761:  Called multilib-minimal_src_compile
 *   environment, line 1901:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2145:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 1836:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 1834:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  629:  Called multilib-minimal_abi_src_compile
 *   environment, line 1895:  Called multilib_src_compile
 *   environment, line 2365:  Called cmake-utils_src_compile
 *   environment, line  781:  Called cmake-utils_src_make
 *   environment, line  962:  Called _cmake_ninja_src_make
 *   environment, line  478:  Called eninja
 *   environment, line 1261:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 *
 * If you need support, post the output of `emerge --info '=dev-db/mysql-connector-c-8.0.17-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-connector-c-8.0.17-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-db/mysql-connector-c-8.0.17-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-connector-c-8.0.17-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/mysql-connector-c-8.0.17-r1/work/mysql-8.0.17-abi_x86_32.x86'
 * S: '/var/tmp/portage/dev-db/mysql-connector-c-8.0.17-r1/work/mysql-8.0.17'
Comment 1 Conrad Kostecki gentoo-dev 2019-08-18 10:26:13 UTC
Portage 2.3.71 (python 3.7.4-final-0, default/linux/amd64/17.1/desktop, gcc-9.1.0, glibc-2.29-r4, 5.2.7-gentoo x86_64)
=================================================================
System uname: Linux-5.2.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    32641464 total,  11576448 free
KiB Swap:   17301500 total,  17301500 free
Timestamp of repository gentoo: Sun, 18 Aug 2019 00:45:01 +0000
Head commit of repository gentoo: 2198a5527a90c8c7c9a48d62a4f05c297792a21b
sh bash 5.0_p9
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.3 [enabled]
app-shells/bash:          5.0_p9::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo, 3.7.4-r1::gentoo
dev-util/ccache:          3.7.3::gentoo
dev-util/cmake:           3.15.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0-r1::gentoo, 9.2.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

crossdev
    location: /usr/local/crossdev
    masters: gentoo

serenity
    location: /usr/local/portage
    masters: gentoo

sattvik
    location: /var/lib/layman/sattvik
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/user/sattvik.git
    masters: gentoo
    priority: 50

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

tlp
    location: /var/lib/layman/tlp
    sync-type: laymansync
    sync-uri: git://github.com/dywisor/tlp-portage.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /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/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/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="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
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="-frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox protect-owned sandbox sfperms sign strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-frecord-gcc-switches"
GENTOO_MIRRORS="https://mirror.netcologne.de/gentoo/"
INSTALL_MASK="/etc/systemd/* /etc/xinetd.d/* /usr/lib/systemd/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,-z,now"
LINGUAS="de de_DE"
MAKEOPTS="-j5 -l4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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 aalib accessibility acl adns alsa amd64 berkdb bidi bluetooth bzip2 cairo calendar caps cdda cddb cgi cjk cracklib crypt cups curl cvs cxx dbus dga djvu dri dts dv dvb dvd eds encode exif fbcon ffmpeg fftw flac fontconfig fortran ftp gd gdbm geolocation gif git gmp gnome-keyring gnutls gphoto2 gpm graphviz gsm gstreamer gtk iconv icu idn ieee1394 imagemagick imap imlib inotify introspection ipv6 java javascript jbig jemalloc jit joystick jpeg jpeg2k lame latex lcms ldap libass libcaca libnotify libsamplerate lm_sensors lua luajit lzma lzo mad maildir matroska mhash mikmod milter mmap mms mng modplug mono mp3 mpeg mplayer mtp musepack mysql mysqli ncurses networkmanager nls nntp nptl nsplugin offensive ogg openal openexr opengl openmp opus orc oss pam pcre pdf perl pie png policykit posix postscript pulseaudio python qt5 quicktime raw rdp readline rtmp samba sasl scanner sctp sdl seccomp session slang slp smartcard sndfile snmp soap sockets sound sox speex spell split-usr sqlite ssl startup-notification subversion suid svg symlink syslog taglib tcpd theora threads tiff truetype udev udisks unicode upnp usb v4l vaapi vcd vdpau vim-syntax vnc vorbis vpx wavpack wayland webkit webp wifi wmf wxwidgets x264 xattr xcb xcomposite xface xft xinetd xml xmp xpm xscreensaver xv xvid zeroconf zip zlib zsh-completion zstd" ABI_X86="32 64" COLLECTD_PLUGINS="apcups battery cgroups conntrack contextswitch cpu cpufreq cpusleep df disk dns entropy ethstat exec fhcount filecount gps hddtemp hugepages interface ipc ipmi iptables irq load lvm java mcelog md memory mysql netlink nfs nginx ntpd openldap openvpn ping postgresql processes protocols rrdcached sensors serial smart snmp swap syslog tcpconns thermal turbostat unixsock uptime users wireless" CPU_FLAGS_X86="aes avx avx2 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="garmin garmintxt nmea0183" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="cfontzpacket crystalfontz glcd2usb hd44780 lcd2usb" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher" NGINX_MODULES_HTTP="access auth_basic autoindex brotli browser charset fancyindex fastcgi geo geoip geoip2 gunzip gzip gzip_static headers_more image_filter javascript limit_conn limit_req map metrics proxy realip referer rewrite secure_link sticky stub_status upload_progress upstream_keepalive vhost_traffic_status xslt" NGINX_MODULES_MAIL="imap pop3 smtp" NGINX_MODULES_STREAM="access geo geoip geoip2 javascript limit_conn map realip return ssl_preread" PHP_TARGETS="php7-3" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby26" SANE_BACKENDS="hp net" USERLAND="GNU" VIDEO_CARDS="i965 intel iris"
Unset:  CC, CPPFLAGS, CTARGET, CXX, PORTAGE_BINHOST
Comment 2 Conrad Kostecki gentoo-dev 2019-08-18 10:26:47 UTC
Created attachment 587354 [details]
build.log
Comment 3 Tomáš Mózes 2019-08-18 12:26:40 UTC
What is your openssl version please?
Comment 4 Conrad Kostecki gentoo-dev 2019-08-18 12:27:35 UTC
(In reply to Tomáš Mózes from comment #3)
> What is your openssl version please?

[ebuild   R    ] dev-libs/openssl-1.1.1c:0/1.1::gentoo  USE="asm sctp static-libs tls-heartbeat zlib -bindist -rfc3779 -sslv3 -test -vanilla" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB
Comment 5 Tomáš Mózes 2019-08-18 12:29:59 UTC
Sorry, I just saw TLS and I thought it's openssl 1.1.x related, but this TLS is different, it's probably due to your linker being gold?
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-18 12:40:00 UTC
Don't use ld.gold for now.
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-18 12:46:47 UTC
Not a ld.gold problem, works for me. But you are also using ccache...
Comment 8 Conrad Kostecki gentoo-dev 2019-08-18 12:57:46 UTC
That seems to be a ld.gold problem for me?
After I switched via LDFLAGS manually for test to "-Wl,-fuse-ld=bfd", it did worked?
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-18 13:16:05 UTC
Created attachment 587358 [details]
build.log from successfully build using ld.gold

Like said, it's working for more with ld.gold. Even with your exotic flags. So I don't think it's a general problem.


Portage 2.3.71 (python 3.6.9-final-0, default/linux/amd64/17.1, gcc-9.1.0, glibc-2.29-r4, 4.19.66-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-4.19.66-gentoo-x86_64-x86_64-AMD_Ryzen_Threadripper_2950X_16-Core_Processor-with-gentoo-2.6
KiB Mem:   131952972 total, 118471060 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sun, 18 Aug 2019 12:30:01 +0000
Head commit of repository gentoo: 4af779aaf591fb57d4e381e75c4dbde7f77be023
sh bash 5.0_p9
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p9::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo
dev-util/cmake:           3.15.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r4::gentoo
Comment 10 Matt Whitlock 2019-08-18 17:58:01 UTC
dev-db/mysql-connector-c-8.0.17-r1 builds fine for me with ld.gold as my default linker.

$ ld --version | head -n1
GNU gold (Gentoo 2.32 p2 2.32.0) 1.16

I'm using ccache too.

$ emerge --info
Portage 2.3.71 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.2.0, glibc-2.29-r4, 4.18.0-rc3-00211-gc77ec61ca0a4-dirty x86_64)
=================================================================
System uname: Linux-4.18.0-rc3-00211-gc77ec61ca0a4-dirty-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.6
KiB Mem:     8161916 total,    749224 free
KiB Swap:   12582904 total,  12540052 free
Timestamp of repository gentoo: Sun, 18 Aug 2019 07:15:01 +0000
Head commit of repository gentoo: 7ad680707d92549830aeef412ba94f7d99bd4237
sh dash 0.5.10.2
ld GNU gold (Gentoo 2.32 p2 2.32.0) 1.16
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.2 [enabled]
app-shells/bash:          5.0_p7::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo
dev-util/ccache:          3.7.2::gentoo
dev-util/cmake:           3.15.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r4::gentoo


@Conrad Kostecki: Your system default linker doesn't actually appear to be Gold, judging by your 'emerge --info' output in Comment 1. Did you set USE="default-gold" on sys-devel/binutils?
Comment 11 Conrad Kostecki gentoo-dev 2019-08-18 21:15:13 UTC
> dev-db/mysql-connector-c-8.0.17-r1 builds fine for me with ld.gold as my
> default linker.

I have no clou, why it fails for me with gold.
 
> @Conrad Kostecki: Your system default linker doesn't actually appear to be
> Gold, judging by your 'emerge --info' output in Comment 1. Did you set
> USE="default-gold" on sys-devel/binutils?

Correct, default-gold is not enabled.
-> [ebuild   R    ] sys-devel/binutils-2.32-r1:2.32::gentoo  USE="cxx gold nls plugins -default-gold -doc -multitarget -static-libs -test" 20.431 KiB
Comment 12 Conrad Kostecki gentoo-dev 2019-10-24 20:51:00 UTC
What shall we do here? Close as INVALID, since not reproducable?
Comment 13 Thomas Deutschmann (RETIRED) gentoo-dev 2019-10-24 21:28:19 UTC
Closing as INVALID because nobody, including report, is able to reproduce.