Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 707852 - dev-db/mariadb-10.4.12 : my_addr_resolve.c:(.text+<snip>): undefined reference to bfd_get_section_flags
Summary: dev-db/mariadb-10.4.12 : my_addr_resolve.c:(.text+<snip>): undefined referenc...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux MySQL bugs team
Keywords: PATCH
: 707914 707962 708070 (view as bug list)
Depends on:
Blocks: binutils-2.34
  Show dependency tree
Reported: 2020-02-02 04:13 UTC by Toralf Förster
Modified: 2020-02-04 08:12 UTC (History)
13 users (show)

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

emerge-info.txt (emerge-info.txt,17.92 KB, text/plain)
2020-02-02 04:13 UTC, Toralf Förster
dev-db:mariadb-10.4.12:20200202-005923.log (dev-db:mariadb-10.4.12:20200202-005923.log,675.38 KB, text/plain)
2020-02-02 04:14 UTC, Toralf Förster
emerge-history.txt (emerge-history.txt,284.15 KB, text/plain)
2020-02-02 04:14 UTC, Toralf Förster
environment (environment,184.16 KB, text/plain)
2020-02-02 04:14 UTC, Toralf Förster
etc.portage.tbz2 (etc.portage.tbz2,18.83 KB, application/x-bzip)
2020-02-02 04:14 UTC, Toralf Förster
logs.tbz2 (logs.tbz2,23.33 KB, application/x-bzip)
2020-02-02 04:14 UTC, Toralf Förster
temp.tbz2 (temp.tbz2,65.07 KB, application/x-bzip)
2020-02-02 04:14 UTC, Toralf Förster
mariadb-10.4.12-binutils-2.34.patch (mariadb-10.4.12-binutils-2.34.patch,586 bytes, patch)
2020-02-02 12:06 UTC, Sergei Trofimovich (RETIRED)
Details | Diff
binutils-2.34.patch (bfd.patch,672 bytes, patch)
2020-02-03 15:48 UTC, Brian Evans
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-02-02 04:13:54 UTC
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: mysys/libmysys.a(my_addr_resolve.c.o): in function `my_addr_resolve':
my_addr_resolve.c:(.text+0x45): undefined reference to `bfd_get_section_flags'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: my_addr_resolve.c:(.text+0x5a): undefined reference to `bfd_get_section_vma'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: my_addr_resolve.c:(.text+0x6c): undefined reference to `bfd_get_section_size'
collect2: error: ld returned 1 exit status


  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop-libressl-20200125-232521


gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.40.0 *
The following VMs are available for generation-2:
*)	IcedTea JDK 3.14.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
The Glorious Glasgow Haskell Compilation System, version 8.0.2

==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Sat, 01 Feb 2020 23:27:56 +0000

emerge -qpvO dev-db/mariadb
[ebuild     U ] dev-db/mariadb-10.4.12 [10.4.10] USE="backup libressl pam perl server xml -bindist -cracklib -debug -extraengine -galera -innodb-lz4 -innodb-lzo -innodb-snappy -jdbc -jemalloc -kerberos -latin1 -mroonga -numa -odbc -oqgraph -profiling -rocksdb (-selinux) -sphinx -sst-mariabackup -sst-rsync -static -systemd -systemtap -tcmalloc -test -tokudb -yassl"
Comment 1 Toralf Förster gentoo-dev 2020-02-02 04:13:57 UTC
Created attachment 610818 [details]
Comment 2 Toralf Förster gentoo-dev 2020-02-02 04:14:01 UTC
Created attachment 610820 [details]
Comment 3 Toralf Förster gentoo-dev 2020-02-02 04:14:04 UTC
Created attachment 610822 [details]
Comment 4 Toralf Förster gentoo-dev 2020-02-02 04:14:08 UTC
Created attachment 610824 [details]
Comment 5 Toralf Förster gentoo-dev 2020-02-02 04:14:11 UTC
Created attachment 610826 [details]
Comment 6 Toralf Förster gentoo-dev 2020-02-02 04:14:14 UTC
Created attachment 610828 [details]
Comment 7 Toralf Förster gentoo-dev 2020-02-02 04:14:17 UTC
Created attachment 610830 [details]
Comment 8 A Blamey 2020-02-02 10:22:34 UTC
I see the same thing.  I'm ~amd64.  mariadb-10.4.12 is already previously installed successfully a couple of days ago.  This failure is happening on rebuild caused by binutils-libs-2.34 upgrade.
Comment 9 Geoff Leach 2020-02-02 10:37:17 UTC
Also see #707830
Comment 10 Xu Weiping 2020-02-02 10:39:56 UTC
Hi Toralf:
  Your last line of emerge-history.txt shows that
> 2020-02-02T01:56:38 >>> sys-libs/binutils-libs-2.34
  At my testing, binutils-libs-2.34 breaks something about bfd.h, making mariadb build failed. And it also fail my cairo build.
  Masking binutils-libs-2.34 resolves my problem, hoping it may also help you.
Comment 11 PrSo 2020-02-02 11:38:53 UTC
I can confirm that masking binutils-libs-2.34 let my system to do all the updates as for now with mariadb 10.4.12 included.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 11:55:11 UTC
binutils-2.34 will need some porting for downstream users:
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 12:06:26 UTC
Created attachment 611014 [details, diff]
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 12:08:12 UTC
mariadb-10.4.12-binutils-2.34.patch should allow building mariadb with binutils-libs-2.34. Note: that patch breaks compatibility with older binutils.

You might want to use either conditional patching or add extra checks against missing macros.
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 13:54:37 UTC
*** Bug 707914 has been marked as a duplicate of this bug. ***
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2020-02-02 19:46:23 UTC
*** Bug 707962 has been marked as a duplicate of this bug. ***
Comment 17 Brian Evans Gentoo Infrastructure gentoo-dev 2020-02-03 15:48:53 UTC
Created attachment 611192 [details, diff]

Proposed patch inspired by slyfox's previous patch
Comment 18 Larry the Git Cow gentoo-dev 2020-02-03 18:22:25 UTC
The bug has been closed via the following commit(s):

commit d2431f4d5ba383997c1fdfd92ad33a923d00f9f3
Author:     Brian Evans <>
AuthorDate: 2020-02-03 18:08:03 +0000
Commit:     Brian Evans <>
CommitDate: 2020-02-03 18:22:17 +0000

    dev-db/mariadb: Fix building with binutil-libs-2.34
    binutil-libs changed its API and a patch is added to accomodate both macro sets
    Also unify the patch downloads
    Signed-off-by: Brian Evans <>

 dev-db/mariadb/Manifest               | 1 +
 dev-db/mariadb/mariadb-10.1.44.ebuild | 3 ++-
 dev-db/mariadb/mariadb-10.2.31.ebuild | 3 ++-
 dev-db/mariadb/mariadb-10.3.22.ebuild | 3 ++-
 dev-db/mariadb/mariadb-10.4.12.ebuild | 3 ++-
 dev-db/mariadb/mariadb-5.5.67.ebuild  | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)
Comment 19 Brian Evans Gentoo Infrastructure gentoo-dev 2020-02-03 19:19:27 UTC
*** Bug 708070 has been marked as a duplicate of this bug. ***