Summary: | sys-devel/binutils-2.28-r2 - glibc fails to build on ARM (error "must write pt-vfork for this machine or get IFUNC support") | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexander Tsoy <alexander> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aldo.mazzeo, alexandref75, dennis.lissov, herrtimson, jbowler, nerdboy, philipp.psurek+gentoo, slyfox, uzytkownik2 |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4b48e2f6a50e85e5acc316289c4a6af693ad98f0 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=622710 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
glibc-2.23-r3:20170617-154415.log.gz
Suggested patch for binutils-2.28 |
Description
Alexander Tsoy
2017-06-17 16:46:36 UTC
Created attachment 476756 [details]
glibc-2.23-r3:20170617-154415.log.gz
configure fails to detect IFUNC support:
...
checking for assembler and linker STT_GNU_IFUNC support... no
...
The following patch fixed this issue for me: https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=4b48e2f6a50e85e5acc316289c4a6af693ad98f0;hp=7dba9362c172f1073487536eb137feb2da30b0ff CC-ing @toolchain The patch mentioned works for me too on glibc-2.25-r1 I have same error on 32-on-64 build with glibc-2.24-r3. I can confirm the bug to occur for armv6zk-hardfloat-linux-gnueabi and armv7ve-hardfloat-linux-gnueabi, testing with glibc from 2.25-r1, 2.24-rX, and 2.22-r3 (the latter only on armv7). The proposed patch worked for me too. Thanks! Another option was to use gcc 5.4.0, with which I was able to compile cross glibc, too. Is this fixed for glibc-2.23-r4? *** Bug 622710 has been marked as a duplicate of this bug. *** The referenced binutils patch resolved this for me as well. (In reply to Maciej Piechotka from comment #4) > I have same error on 32-on-64 build with glibc-2.24-r3. Linked patch did not solve the issue for me. Should I fill separate bug? Perhaps the problem is that it is not immediately obvious how to apply the patch. Firstly this bug report only refers to the crossdev build of glibc. A normal, hosted, ARM build has no issues; I have unpatched, working, builds with: armv7a-hardfloat-linux-gnueabi (systemd), glibc-2.24-r3, armv7a-hardfloat-linux-gnueabi (openrc), glibc-2.24-r4, armv6j-hardfloat-linux-gnueabi (openrc), glibc-2.24-r4, binutils 2.28-r2 gcc-6.3.0 The problem is with the crossdev build of the cross-binutils which, if not patched, causes the crossdev configure of the new glibc to fail (incorrectly). The patch itself won't apply to binutils-2.28 because the ChangeLog part fails, so it is necessary to strip that out leaving what just a one-line change. That patch then has to be put into the crossdev overlay for binutils. The way I did this was to change the crossdev overlay by hand so that rather than having a symbolic link for binutils which points into the portage tree it points at a binutils in my overlay which contains 'binutils-2.28-r3' with the patch. It may be that crossdev will find the overlay itself if it is re-run; I didn't try that and I don't know enough about crossdev to know. It would help if the portage binutils-2.28 was rev'ed to include the patch, then the crossdev build would automatically update binutils on the next emerge --update. Alternatively if that isn't acceptable to the binutils maintainer maybe a crossdev expert could document the correct way to get the patch from a regular overlay. (In reply to John Bowler from comment #10) > maybe a crossdev expert could document the correct way to get the > patch from a regular overlay. For armv7a-hardfloat-linux-gnueabi the following should work: # mkdir -p /etc/portage/patches/cross-armv7a-hardfloat-linux-gnueabi/binutils-2.28/ # curl 'https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=4b48e2f6a50e85e5acc316289c4a6af693ad98f0;hp=7dba9362c172f1073487536eb137feb2da30b0ff' > /etc/portage/patches/cross-armv7a-hardfloat-linux-gnueabi/binutils-2.28/ifunc-test-fix.patch then remove the Changelog chunk from the patch. And then you can build cross tolchain as usual. (In reply to Alexander Tsoy from comment #11) > For armv7a-hardfloat-linux-gnueabi the following should work: > > # mkdir -p > /etc/portage/patches/cross-armv7a-hardfloat-linux-gnueabi/binutils-2.28/ > # curl > 'https://sourceware.org/git/?p=binutils-gdb.git;a=patch; > h=4b48e2f6a50e85e5acc316289c4a6af693ad98f0; > hp=7dba9362c172f1073487536eb137feb2da30b0ff' > > /etc/portage/patches/cross-armv7a-hardfloat-linux-gnueabi/binutils-2.28/ > ifunc-test-fix.patch > > then remove the Changelog chunk from the patch. And then you can build cross > tolchain as usual. Plus: emerge --oneshot cross-armv7a-hardfloat-linux-gnueabi/binutils Without that binutils won't get updated with the patch because it builds fine without it. I undid my previous changes and tested that with armv7a and armv6j. glibc-2.24-r3 cross-built just fine. Created attachment 481484 [details]
Suggested patch for binutils-2.28
This is the same as the original suggested patch but without the "ChangeLog" addition which would otherwise prevent the patch applying to more recent binutils versions.
Patch applied in 2.28.1 commit cf5003fe2fc3b45f366d0a3c6fdf834ed9d54321 Author: Matthias Maier <tamiko@gentoo.org> Date: Tue Aug 1 19:05:14 2017 -0500 sys-devel/binutils: version bump to 2.28.1, patchset 1.0 Includes fixes for bugs #622036 #622500 #622886 #624524 #624702 Package-Manager: Portage-2.3.6, Repoman-2.3.3 *** Bug 627138 has been marked as a duplicate of this bug. *** *** Bug 626998 has been marked as a duplicate of this bug. *** (In reply to Matthias Maier from comment #14) > Patch applied in 2.28.1 > > > > commit cf5003fe2fc3b45f366d0a3c6fdf834ed9d54321 > Author: Matthias Maier <tamiko@gentoo.org> > Date: Tue Aug 1 19:05:14 2017 -0500 > > sys-devel/binutils: version bump to 2.28.1, patchset 1.0 > > Includes fixes for bugs #622036 #622500 #622886 #624524 #624702 > > Package-Manager: Portage-2.3.6, Repoman-2.3.3 ... which is essentially stable now. |