Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 885035

Summary: dev-db/mysql-connector-c-8.0.31: FAILED: runtime_output_directory/build_id_test
Product: Gentoo Linux Reporter: Stijn Tintel <stijn+gentoo>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: grobian, orbea
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=903415
https://github.com/gentoo/gentoo/pull/30517
https://bugs.gentoo.org/show_bug.cgi?id=922808
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Stijn Tintel 2022-12-09 10:59:57 UTC
dev-db/mysql-connector-c-8.0.31 fails to build

FAILED: runtime_output_directory/build_id_test
: && /usr/bin/x86_64-gentoo-linux-musl-g++ -O2 -pipe -march=ivybridge -maes -ggdb -D_GNU_SOURCE -std=c++17 -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Woverloaded-virtual -Wcast-qual -Wimplicit-fallthrough=5 -Wstringop-truncation -Wsuggest-override -Wmissing-include-dirs -Wextra-semi -Wlogical-op -DNDEBUG -Wl,-O1 -Wl,--as-needed     -Wl,--build-id=sha1 mysys/CMakeFiles/build_id_test.dir/build_id_test.cc.o mysys/CMakeFiles/build_id_test.dir/build_id.cc.o -o runtime_output_directory/build_id_test   && cd /var/tmp/portage/dev-db/mysql-connector-c-8.0.31/work/mysql-connector-c-8.0.31_build-abi_x86_64.amd64/runtime_output_directory && ./build_id_test | egrep -o [0-9a-f]{40} > build_id_test_1 && /usr/bin/eu-readelf -n ./build_id_test | grep "Build ID:" | egrep -o [0-9a-f]{40} > build_id_test_2 && diff build_id_test_1 build_id_test_2
1c1
< 2524f44f126098ec3a2aaae2e5338fce0ecc18bf
---
> eecb45be853b8afcfb86588b3ce2c2f02a456f98



Reproducible: Always

Steps to Reproduce:
1. emerge dev-db/mysql-connector-c
2.
3.
Actual Results:  
 >>> Failed to emerge dev-db/mysql-connector-c-8.0.31


This is on a musl system which I suspect might be related, as it builds fine on my glibc workstation.
Comment 1 Stijn Tintel 2022-12-09 11:00:46 UTC
Created attachment 841091 [details]
build.log
Comment 2 Viorel Munteanu gentoo-dev 2022-12-09 11:48:50 UTC
Please also attach the output of emerge --info
Comment 3 Stijn Tintel 2022-12-09 12:05:03 UTC
# emerge --info dev-db/mysql-connector-c 
Portage 3.0.38.1 (python 3.10.9-final-0, default/linux/amd64/17.0/musl/hardened, gcc-11.3.0, musl-1.2.3, 5.15.74-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.74-gentoo-x86_64-x86_64-Intel_Xeon_E3-12xx_v2_-Ivy_Bridge,_IBRS-with-libc
KiB Mem:     6093388 total,   1960508 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 08 Dec 2022 22:45:01 +0000
Head commit of repository gentoo: 60ee58e8661dafcd39f3ad022920ca78cb3e33c5
Head commit of repository musl: 0961df2746fd9b5ec612cd0d560f51b7266de060

Head commit of repository stintel: c6621439cf7f2d177e570b73f1490abb6d8a2d07

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.38 p4) 2.38
ccache version 4.6.3 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.34.1-r4::gentoo
dev-lang/python:           3.8.16::gentoo, 3.9.13::gentoo, 3.10.9::gentoo, 3.11.1::gentoo
dev-lang/rust-bin:         1.65.0::gentoo
dev-util/ccache:           4.6.3::gentoo
dev-util/cmake:            3.24.3::gentoo
dev-util/meson:            0.63.3::gentoo
sys-apps/baselayout:       2.9::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.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.3::gentoo
Repositories:

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

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

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

stintel
    location: /var/repo/stintel
    sync-type: git
    sync-uri: https://github.com/stintel/gentoo-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-gentoo-linux-musl"
CFLAGS="-O2 -pipe -march=ivybridge -maes -ggdb"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php7.4/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php7.4/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=ivybridge -maes -ggdb"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirror.leaseweb.com/gentoo https://gentoo.adlevio.net"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_BINHOST="https://gentoo.adlevio.net/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync.exclude"
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="/bin/bash"
USE="acl aes amd64 avx bzip2 caps cli crypt dri f16c fortran hardened iconv ipv6 libglvnd libtirpc lto mmx mmxext ncurses nls nptl openmp pam pclmul pcre pie popcnt rdrand readline sctp seccomp smp split-usr sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 test-rust unicode xattr xtpax zlib" ABI_X86="64" 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" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="musl" 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" GRUB_PLATFORMS="pc" 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" NGINX_MODULES_HTTP="access addition auth_basic autoindex browser charset dav empty_gif fancyindex fastcgi geo geoip gzip gzip_static headers_more limit_req limit_zone map memcached mp4 proxy realip referer rewrite scgi spdy split_clients ssi stub_status upload upload_progress upstream_ip_hash userid uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

dev-db/mysql-connector-c-8.0.27-r1::gentoo was built with the following:
USE="-ldap -static-libs"
CFLAGS="-O2 -pipe -march=ivybridge -maes -ggdb -D_GNU_SOURCE"
CXXFLAGS="-O2 -pipe -march=ivybridge -maes -ggdb -D_GNU_SOURCE -std=c++17"
Comment 4 Fabian Groffen gentoo-dev 2022-12-14 08:36:51 UTC
seeing this here on musl too.
Comment 5 Fabian Groffen gentoo-dev 2022-12-20 19:54:36 UTC
we can solve/work around this by adding
        -DWITH_BUILD_ID=OFF
to mycmakeargs for musl builds
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-20 20:09:52 UTC
(In reply to Fabian Groffen from comment #5)
> we can solve/work around this by adding
>         -DWITH_BUILD_ID=OFF
> to mycmakeargs for musl builds

We can probably do this unconditionally, it's too risky for any sort of different configuration to have this on.
Comment 7 Larry the Git Cow gentoo-dev 2023-04-09 05:31:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=016648eda578932e93becd587cbc9bc4e376c9e3

commit 016648eda578932e93becd587cbc9bc4e376c9e3
Author:     orbea <orbea@riseup.net>
AuthorDate: 2023-04-07 19:55:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-09 05:27:14 +0000

    dev-db/mysql-connector-c: Build fixes
    
    * Adds -DWITH_BUILD_ID=OFF to workaround various build issues
    * Patches the source to work with musl
    
    Upstream-PR: https://github.com/mysql/mysql-server/pull/455
    Closes: https://bugs.gentoo.org/886474
    Closes: https://bugs.gentoo.org/903415
    Closes: https://bugs.gentoo.org/885035
    Signed-off-by: orbea <orbea@riseup.net>
    Closes: https://github.com/gentoo/gentoo/pull/30517
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/mysql-connector-c-8.0.32-musl.patch      | 25 ++++++++++++++++++++++
 .../mysql-connector-c-8.0.32-r1.ebuild             |  2 ++
 2 files changed, 27 insertions(+)