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

Bug 707852

Summary: dev-db/mariadb-10.4.12 : my_addr_resolve.c:(.text+<snip>): undefined reference to bfd_get_section_flags
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, djdunn.safety, drmccoy, dschridde+gentoobugs, email200202, hydrapolic, ilmostro7, mark+gentoobugs, mike, reuben-gentoo-bugzilla, soprwa, weiping_xu, xaviermiller
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://jira.mariadb.org/browse/MDEV-21646
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 707898    
Attachments: emerge-info.txt
dev-db:mariadb-10.4.12:20200202-005923.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2
mariadb-10.4.12-binutils-2.34.patch
binutils-2.34.patch

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:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
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 *
java-config:
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
ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /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]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-02-02 04:14:01 UTC
Created attachment 610820 [details]
dev-db:mariadb-10.4.12:20200202-005923.log
Comment 3 Toralf Förster gentoo-dev 2020-02-02 04:14:04 UTC
Created attachment 610822 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-02-02 04:14:08 UTC
Created attachment 610824 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-02-02 04:14:11 UTC
Created attachment 610826 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-02-02 04:14:14 UTC
Created attachment 610828 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-02-02 04:14:17 UTC
Created attachment 610830 [details]
temp.tbz2
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.
Przemek.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 11:55:11 UTC
binutils-2.34 will need some porting for downstream users: https://bugs.gentoo.org/707898
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 12:06:26 UTC
Created attachment 611014 [details, diff]
mariadb-10.4.12-binutils-2.34.patch
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 (RETIRED) gentoo-dev 2020-02-03 15:48:53 UTC
Created attachment 611192 [details, diff]
binutils-2.34.patch

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):

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

commit d2431f4d5ba383997c1fdfd92ad33a923d00f9f3
Author:     Brian Evans <grknight@gentoo.org>
AuthorDate: 2020-02-03 18:08:03 +0000
Commit:     Brian Evans <grknight@gentoo.org>
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
    
    Closes: https://bugs.gentoo.org/707852
    Signed-off-by: Brian Evans <grknight@gentoo.org>

 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 (RETIRED) gentoo-dev 2020-02-03 19:19:27 UTC
*** Bug 708070 has been marked as a duplicate of this bug. ***