Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827018 - dev-embedded/lpc21isp-1.97 fails to compile: patch -p1 failed with lpc21isp-1.97-makefile-tc-vars.patch
Summary: dev-embedded/lpc21isp-1.97 fails to compile: patch -p1 failed with lpc21isp-1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-24 06:54 UTC by Agostino Sarubbo
Modified: 2021-11-24 09:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,38.42 KB, text/plain)
2021-11-24 06:54 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-11-24 06:54:09 UTC
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.
Comment 1 Agostino Sarubbo gentoo-dev 2021-11-24 06:54:11 UTC
Created attachment 755766 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-11-24 06:54:13 UTC
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
Comment 3 Marek Szuba archtester gentoo-dev 2021-11-24 08:31:11 UTC
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.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-24 08:38:22 UTC
(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!
Comment 5 Marek Szuba archtester gentoo-dev 2021-11-24 08:52:35 UTC
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.
Comment 6 Larry the Git Cow gentoo-dev 2021-11-24 08:57:50 UTC
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(-)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-24 08:58:06 UTC
(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.
Comment 8 Marek Szuba archtester gentoo-dev 2021-11-24 09:08:41 UTC
(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.