Re: Build issues due to patch "gprofng: a new GNU profiler" – CLOCK_MONOTONIC_RAW not defined
Joseph Myers
joseph@codesourcery.com
Mon Mar 14 20:53:36 GMT 2022
On Mon, 14 Mar 2022, Tobias Burnus wrote:
> Hi Vladimir, hi Nick,
>
> Friday's commit "gprofng: a new GNU profiler",
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bb368aad297fe3ad40cf397e6fc85aa471429a28
>
> broke the build here (build server using on purpose an older Linux/glibc):
I'm seeing other errors as well from my glibc bot
<https://sourceware.org/pipermail/libc-testresults/2022q1/009449.html>.
Building a cross from x86_64-linux-gnu to aarch64-linux-gnu, I get:
libtool: link: gcc -shared -fPIC -DPIC .libs/synctrace.o -Wl,--version-script -Wl,/scratch/jmyers/bmg/many12/src/binutils/gprofng/libcollector/mapfile.aarch64-Linux -Wl,--no-as-needed -Wl,-lrt -Wl,-ldl -Wl,-soname -Wl,libgp-sync.so -o .libs/libgp-sync.so
/usr/bin/ld: .libs/libgp-sync.so: version node not found for symbol pthread_cond_wait@@GLIBC_2.3.2
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make[6]: *** [Makefile:573: libgp-sync.la] Error 1
Using mapfile.aarch64-Linux - which has symbol versions appropriate for
the target - is fundamentally incorrect when building a library for the
host. (You can't build libraries for the target at all when building
binutils; binutils is an early bootstrap step, before building GCC, before
building glibc.)
And on a system with older host compiler (GCC 5),
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-glibc-linux-gnu, I get a series of errors of the form:
QLParser.yy: In function 'QL::Parser::symbol_type QL::yylex(QL::Result&)':
QLParser.yy:267:82: error: invalid initialization of non-const reference of type 'const Expression*&' from an rvalue of type 'const Expression*'
(I might ask incidentally why the Bison output files QLParser.tab.cc and
QLParser.tab.hh are checked in - normally binutils doesn't commit Bison
output files to the repository on master, although it makes sure to
include them in release tarballs. If there's a Bison version dependency
issue, then arrange not to build gprofng when the installed Bison is too
old.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Binutils
mailing list