https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-embedded/lpc21isp-1.97 fails to compile. Discovered on: amd64 (internal ref: ci) NOTE: If you think this is a GCC-11 related issue, please block bug 732706.
Created attachment 755766 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: * environment, line 383: Called __helpers_die 'patch -p1 failed with /var/tmp/portage/dev-embedded/lpc21isp-1.97/files/lpc21isp-1.97-makefile-tc-vars.patch' * patch -p1 failed with /var/tmp/portage/dev-embedded/lpc21isp-1.97/files/lpc21isp-1.97-makefile-tc-vars.patch
Upstream makefile has got DOS line endings. These are present in the patch committed to g.g.o but are absent in the main-tree version. Hilarity ensues.
(In reply to Marek Szuba from comment #3) > Upstream makefile has got DOS line endings. These are present in the patch > committed to g.g.o but are absent in the main-tree version. Hilarity ensues. git has frustrating default behaviour where it’ll silently strip these on commit. I can never make sense of, or remember, the toggle needed to fix it but I think it was autocrlf. Huge pain in the arse when doing games in particular which has loads of these!
Git itself is fine here (for me anyway - I've had core.autocrlf=input in my ~/.gitconfig for years), the problem is that we cannot rely on this particular behaviour having been configured on the side of things handling the synchronisation of the main tree with the g.g.o repo. Will just use sed instead.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8ed0435911386a99176204c60cf36ca94e51ecb commit f8ed0435911386a99176204c60cf36ca94e51ecb Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2021-11-24 08:53:54 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2021-11-24 08:57:44 +0000 dev-embedded/lpc21isp: use sed to patch the Makefile DOS line endings, patch files and git do not always mix. Closes: https://bugs.gentoo.org/827018 Signed-off-by: Marek Szuba <marecki@gentoo.org> .../lpc21isp/files/lpc21isp-1.97-makefile-tc-vars.patch | 11 ----------- dev-embedded/lpc21isp/lpc21isp-1.97.ebuild | 12 ++++++++---- 2 files changed, 8 insertions(+), 15 deletions(-)
(In reply to Marek Szuba from comment #5) > Git itself is fine here (for me anyway - I've had core.autocrlf=input in my > ~/.gitconfig for years), the problem is that we cannot rely on this > particular behaviour having been configured on the side of things handling > the synchronisation of the main tree with the g.g.o repo. Will just use sed > instead. I’m not sure that part is right, I’ve committed patches with Windows line endings plenty of times, even recently. It should also change the commit hash, I think? If that were the case, it would be a rather serious infra bug.
(In reply to Sam James from comment #7) > It should also change the commit hash, I think? No, it does not - Git handles CRLF conversion between the work tree and the local repo, and whether the conversion is to be performed or not is handled by Git attributes. Let's take further discussion on this to IRC, though.