Reputation: 193
I am building gcc-8.1.0 cross-compiler for arm, for Ubuntu Xenial 16.04.
That package exists as a debian package but only for Ubuntu 18.04 bionic which is why I am building it.
But there is a problem - namely, gcc-8.1.0 exists as a package for x86_64 system for Ubuntu 16.04 (for native architecture). It downloads all the dependencies, among which glibc-2.23.
When I want to build gcc cross-compiler for arm architecture according to the instructions given here: http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
at step 6 when making standard C library glibc fails to be build because of an error /tmp/ccs9D1VT.s: Error: `loc1@GLIBC_2.17' can't be versioned to common symbol 'loc1'
.
I tried with older versions of gcc (4.9.3 & 5.4.0) in the previous steps according to manual given in the link, but seems that glibc has this bug.
So, I am wondering - if that's the bug in glibc-2.23 how is it being built at all? Since I have it installed with my debian package for x86_64 Ubuntu Xenial.
Upvotes: 5
Views: 2996
Reputation: 33694
You need to backport this upstream commit:
commit 388b4f1a02f3a801965028bbfcd48d905638b797 Author: H.J. Lu <[email protected]> Date: Fri Jun 23 14:38:46 2017 -0700
Avoid .symver on common symbols [BZ #21666]
The .symver directive on common symbol just creates a new common symbol, not an alias and the newer assembler with the bug fix for
https://sourceware.org/bugzilla/show_bug.cgi?id=21661
will issue an error. Before the fix, we got […]
This commit is already included on the release/2.23/master
branch, so you could just that.
Upvotes: 6