Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634620 - [gnome-next overlay] sys-libs/binutils-libs-2.29.1-r1: compilation of gnome-extra/evolution-data-server-3.27.1 and other packages fails with undefined symbol: _hex_value when LTO is used
Summary: [gnome-next overlay] sys-libs/binutils-libs-2.29.1-r1: compilation of gnome-e...
Status: RESOLVED DUPLICATE of bug 666100
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2017-10-18 09:25 UTC by David Heidelberg (okias)
Modified: 2018-10-27 21:29 UTC (History)
3 users (show)

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


Attachments
example_build.log (build.log,86.25 KB, text/plain)
2017-10-19 15:03 UTC, David Heidelberg (okias)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Heidelberg (okias) 2017-10-18 09:25:27 UTC
Compiles fine with binutils-libs 2.29 .

[ 27%] Building C object src/camel/providers/imapx/CMakeFiles/camelimapx.dir/camel-imapx-command.c.o
[ 28%] Building C object src/libedataserver/CMakeFiles/edataserver.dir/e-cancellable-locks.c.o
/usr/include/regex.h:568: syntax error, unexpected RESTRICT in '      regmatch_t __pmatch[__restrict],' at '__restrict'
/usr/include/regex.h:568: syntax error, unexpected RESTRICT in '      regmatch_t __pmatch[__restrict],' at '__restrict'
[ 28%] Building C object src/libedataserver/CMakeFiles/edataserver.dir/e-categories.c.o
[ 28%] Building C object src/camel/providers/imapx/CMakeFiles/camelimapx.dir/camel-imapx-conn-manager.c.o
[ 28%] Building C object src/libedataserver/CMakeFiles/edataserver.dir/e-client.c.o
g-ir-scanner: link: /usr/bin/x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel/tmp-introspect96jnqtsm/Camel-1.2 -march=native -O2 -flto -fno-stack-protector -pipe -fno-lto -fno-use-linker-plugin /var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel/tmp-introspect96jnqtsm/Camel-1.2.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lcamel-1.2 -L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build -Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build -L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src -Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src -L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel -Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel -L/usr/lib64 -Wl,-rpath,/usr/lib64 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: symbol lookup error: /usr/lib64/libbfd-2.29.1.so: undefined symbol: _hex_value
collect2: error: ld returned 127 exit status
linking of temporary binary failed: Command '['/usr/bin/x86_64-pc-linux-gnu-gcc', '-o', '/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel/tmp-introspect96jnqtsm/Camel-1.2', '-march=native', '-O2', '-flto', '-fno-stack-protector', '-pipe', '-fno-lto', '-fno-use-linker-plugin', '/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel/tmp-introspect96jnqtsm/Camel-1.2.o', '-L.', '-Wl,-rpath,.', '-Wl,--no-as-needed', '-lcamel-1.2', '-L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build', '-Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build', '-L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src', '-Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src', '-L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel', '-Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel', '-L/usr/lib64', '-Wl,-rpath,/usr/lib64', '-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-lgmodule-2.0', '-pthread', '-lglib-2.0']' returned non-zero exit status 1.
g-ir-scanner: link: /usr/bin/x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel/tmp-introspecti0ikpgx6/Camel-1.2 -march=native -O2 -flto -fno-stack-protector -pipe -fno-lto -fno-use-linker-plugin /var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel/tmp-introspecti0ikpgx6/Camel-1.2.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lcamel-1.2 -L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build -Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build -L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src -Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src -L/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel -Wl,-rpath,/var/tmp/portage/gnome-extra/evolution-data-server-3.27.1/work/evolution-data-server-3.27.1_build/src/camel -L/usr/lib64 -Wl,-rpath,/usr/lib64 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: symbol lookup error: /usr/lib64/libbfd-2.29.1.so: undefined symbol: _hex_value
collect2: error: ld returned 127 exit status
Comment 1 Jonas Stein gentoo-dev 2017-10-18 16:15:29 UTC
Thank you for the report. Please *attach* the logfiles,
https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Report_a_build-time_bug_.28emerge_failed.29
and reopen this ticket (Status:unconfirmed).
Comment 2 David Heidelberg (okias) 2017-10-19 14:20:05 UTC
I'm not able to upload logs (timeout), but I noticed this error shows up when compiling even other software, so it's not gnome related.

Reopened since this causing multiple ebuilds to fail at compilation time.
Comment 3 David Heidelberg (okias) 2017-10-19 15:03:52 UTC
Created attachment 499282 [details]
example_build.log
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2017-10-29 14:28:18 UTC
(In reply to David Heidelberg (okias) from comment #2)
> I'm not able to upload logs (timeout), but I noticed this error shows up
> when compiling even other software, so it's not gnome related.
> 
> Reopened since this causing multiple ebuilds to fail at compilation time.

Can you give us a list of other packages that fail for you with the same error? 
Just the package names for now.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2017-10-29 14:36:51 UTC
(In reply to Andreas K. Hüttel from comment #4)
> (In reply to David Heidelberg (okias) from comment #2)
> > I'm not able to upload logs (timeout), but I noticed this error shows up
> > when compiling even other software, so it's not gnome related.
> > 
> > Reopened since this causing multiple ebuilds to fail at compilation time.
> 
> Can you give us a list of other packages that fail for you with the same
> error? 
> Just the package names for now.

Oh and your emerge --info would be useful too.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2017-10-29 18:15:31 UTC
I can not reproduce this problem. gnome-extra/evolution-data-server emerges fine here in my ~amd64 chroot.

(To be precise, gnome-extra/evolution-data-server-3.24.6 ... no idea where you get your version from...)
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-29 20:05:54 UTC
The problem here is in 'libbfd-2.29.1.so' (or the linker tryng to read it):
> lookup error: /usr/lib64/libbfd-2.29.1.so: undefined symbol: _hex_value

It should get the read-only symbol:

$ gcc-nm -D /usr/lib64/libbfd-2.29.1.so | fgrep hex_val
000000000063e640 R _hex_value

Do you have it? 'ld -v' should also be useful ('emerge --info' will contain it)
Comment 8 David Heidelberg (okias) 2017-10-31 11:26:32 UTC
# gcc-nm -D /usr/lib64/libbfd-2.29.1.so | fgrep hex_val
                 U _hex_value

# ld -v
GNU ld (Gentoo 2.29.1 p2) 2.29.1
Comment 9 David Heidelberg (okias) 2017-10-31 11:40:35 UTC
I figured it out, it's LTO issue. Now question is if it's in binutils-libs or GCC 7.2.0.

# gcc-nm -D /usr/lib64/libbfd-2.29.1.so | fgrep hex_val
000000000010bea0 R _hex_value

# ld -v
GNU ld (Gentoo 2.29.1 p2) 2.29.1
Comment 10 David Heidelberg (okias) 2017-10-31 11:49:59 UTC
when binutils-libs are compiled with 5.4.0 + LTO, it fails same way as with 7.2.0 LTO. It _seems_ to be binutils-libs bug.
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2018-01-24 23:47:01 UTC
(In reply to David Heidelberg (okias) from comment #10)
> when binutils-libs are compiled with 5.4.0 + LTO, it fails same way as with
> 7.2.0 LTO. It _seems_ to be binutils-libs bug.

Can you attach your 'emerge --info' on a failing system?
Is setting CFLAGS/CXXFLAGS/LDFLAGS+=-flto enough to reproduce the failure?
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-27 21:29:35 UTC
Given that error comes from ld itself I'm assuming it's a dupe of bug #666100.

*** This bug has been marked as a duplicate of bug 666100 ***