Subject: Re: [PATCH] fix Desmume on newer GCC

From: Jakub Kądziołka <[email-masked]>
Date: Sat, 22 Feb 2020 16:39:49 +0100

On Sat, Feb 22, 2020 at 10:31:31AM +0100, raingloom wrote:
> Ah, I forgot to leave a blank line in the commit message.
> 
> Here is a patch for the current master as of a few minutes ago.

Something is still off:

patching file src/MMU_timing.h
Hunk #1 FAILED at 155 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/MMU_timing.h.rej
patching file src/ctrlssdl.cpp
patching file src/wifi.cpp
Hunk #1 succeeded at 314 (offset -6 lines).
source is under 'desmume-0.9.11'
applying '/gnu/store/yc9991nl8vgkyszbb77ywr9idikyi5lj-desmume-gcc6-fixes.patch'...
Backtrace:
           3 (primitive-load "/gnu/store/zxjsjnfbzqqz2zgks5xgkh63m30…")
In ice-9/eval.scm:
    619:8  2 (_ #(#<directory (guile-user) 7ffff5c70140> "desmume-…"))
In srfi/srfi-1.scm:
    640:9  1 (for-each #<procedure apply-patch (a)> ("/gnu/store/…" …))
In guix/build/utils.scm:
    652:6  0 (invoke _ . _)

guix/build/utils.scm:652:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [program: "/gnu/store/v76scv4n63ip08g119rczh2mrw31zwpd-patch-2.7.6/bin/patch" arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input" "/gnu/store/yc9991nl8vgkyszbb77ywr9idikyi5lj-desmume-gcc6-fixes.patch") exit-status: 1 term-signal: #f stop-signal: #f] 7ffff6022d00>)'.

`file src/MMU_timing.h` in the build directory suggests that the header
file is shipped with CRLF line endings. Could `git format-patch` be
converting \r\n in your files into plain \n?

I tried to work around this with some combinations of
(origin (patch-flags '("--ignore-whitespace" "-p1"))), but no results.