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

Bug 903415

Summary: dev-db/mysql-connector-c-8.0.31 fails to build
Product: Gentoo Linux Reporter: Piotr Maciej Kabata <kabasny>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: amd64, ionen, orbea
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=885035
https://github.com/gentoo/gentoo/pull/30517
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build.log
environment
CMakeError.log

Description Piotr Maciej Kabata 2023-03-28 21:33:04 UTC
Created attachment 859205 [details]
Build.log

Help please. I have a fresh Gentoo installation. However I got stuck on installing most of things, as sooner or later i hit the wall with emerging mysql-connector-c.

Here are my specs and log

emerge --info '=dev-db/mysql-connector-c-8.0.31::gentoo'
Portage 3.0.44 (python 3.10.10-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.36-r7, 6.1.19-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.1.19-gentoo-dist-x86_64-Intel-R-_Core-TM-_i3-3220_CPU_@_3.30GHz-with-glibc2.36
KiB Mem:    12116708 total,    606592 free
KiB Swap:   24575996 total,  24575996 free
Timestamp of repository gentoo: Tue, 28 Mar 2023 06:30:01 +0000
Head commit of repository gentoo: a44e5272c9b6b7197d7d90201584380b39adbd82
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_p3::gentoo, 3.11.2_p2::gentoo
dev-lang/rust-bin:         1.66.1-r1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.1::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/gcc:             12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7-r1::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-r7::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-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* @FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
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 -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 multilib-strict network-sandbox news parallel-fetch 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 -pipe"
LANG="pl_PL"
LC_ALL="pl_PL"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j1"
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="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif git gpm gtk gui iconv icu ipv6 jpeg kde lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xft xml xv xvid 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="mmx mmxext sse sse2" 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" L10N="pl_PL" 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="ruby30" 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, INSTALL_MASK, 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

emerge -pqv '=dev-db/mysql-connector-c-8.0.31::gentoo'
[ebuild  N    ] dev-db/mysql-connector-c-8.0.31  USE="-ldap -static-libs" ABI_X86="(64) -32 (-x32)"
Comment 1 Piotr Maciej Kabata 2023-03-28 21:34:05 UTC
Created attachment 859207 [details]
environment
Comment 2 Ionen Wolkens gentoo-dev 2023-03-28 22:05:57 UTC
>/usr/bin/eu-readelf -n ./build_id_test | grep "Build ID:"
LANG should be harmless but I see you have a aggressive LC_ALL=pl_PL which makes "Build ID" go away even during the build process, aka:

$ eu-readelf -n build_id_test | head -n +11 | tail -n 1
    Build ID: 0ee9e0113df6d3a4090d4533c01e731db983e105
$ LC_ALL=pl_PL eu-readelf -n build_id_test | head -n +11 | tail -n 1
    Identyfikator kopii: 0ee9e0113df6d3a4090d4533c01e731db983e105

Try to remove LC_ALL wherever you're setting it.

On an unrelated note, you probably want to generate and replace pl_PL by pl_PL.utf8
Comment 3 Piotr Maciej Kabata 2023-03-29 20:53:47 UTC
(In reply to Ionen Wolkens from comment #2)
> >/usr/bin/eu-readelf -n ./build_id_test | grep "Build ID:"
> LANG should be harmless but I see you have a aggressive LC_ALL=pl_PL which
> makes "Build ID" go away even during the build process, aka:
> 
> $ eu-readelf -n build_id_test | head -n +11 | tail -n 1
>     Build ID: 0ee9e0113df6d3a4090d4533c01e731db983e105
> $ LC_ALL=pl_PL eu-readelf -n build_id_test | head -n +11 | tail -n 1
>     Identyfikator kopii: 0ee9e0113df6d3a4090d4533c01e731db983e105
> 
> Try to remove LC_ALL wherever you're setting it.
> 
> On an unrelated note, you probably want to generate and replace pl_PL by
> pl_PL.utf8

I have tried that, ufortunately didn't change anything
Comment 4 Piotr Maciej Kabata 2023-03-29 20:56:55 UTC
One of build logs has shown:
collect2: fatal error: cannot find 'ld' compilation terminated.

I have tried rebuilding binutils, but it didn't help.
I also emerged ldd - still nothing
Comment 5 Ionen Wolkens gentoo-dev 2023-03-29 21:14:50 UTC
Are you sure LC_ALL was unset? It may still be in your environment.

`echo $LC_ALL` should return nothing, likewise for `portageq envvar LC_ALL`
Comment 6 Ionen Wolkens gentoo-dev 2023-03-29 21:16:16 UTC
(In reply to Piotr Maciej Kabata from comment #4)
> One of build logs has shown:
> collect2: fatal error: cannot find 'ld' compilation terminated.
Also that's different than the previous error, would need a new build.log
Comment 7 Piotr Maciej Kabata 2023-03-30 07:01:15 UTC
(In reply to Ionen Wolkens from comment #5)
> Are you sure LC_ALL was unset? It may still be in your environment.
> 
> `echo $LC_ALL` should return nothing, likewise for `portageq envvar LC_ALL`

it was unset. NULL for both commands
Comment 8 Piotr Maciej Kabata 2023-03-30 07:05:13 UTC
Created attachment 859256 [details]
CMakeError.log
Comment 9 Larry the Git Cow gentoo-dev 2023-04-09 05:31:08 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(+)