Re: Build issues due to patch "gprofng: a new GNU profiler" – CLOCK_MONOTONIC_RAW not defined
Vladimir Mezentsev
vladimir.mezentsev@oracle.com
Mon Mar 14 21:52:44 GMT 2022
On 3/14/22 13:53, Joseph Myers wrote:
> 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 sent the patch to Tobias Burnus <tobias@codesourcery.com> to check
that the build issues are fixed on old libc.
> 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.)
I understood.
Give me time to understand what need to do to fix this.
>
> 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*'
We tested with gcc-8 - gcc-11.
I am looking for gcc-5 to fix the problems.
>
> (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.)
OK. I will fix this.
We need bison 3.6 or late.
The user cannot simply install this version. `yum install` installs an
old bison.
The user should download and build sources . It is why we checked in
these files.
Thank you,
-Vladimir
>
More information about the Binutils
mailing list