jimeh / build-emacs-for-macos

Somewhat hacky script to automate building of Emac.app on macOS.
484 stars 50 forks source link

Build failing while retriving patches #84

Closed CsBigDataHub closed 1 year ago

CsBigDataHub commented 1 year ago

==> CMD: patch -f -p1 -i /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-003.diff patching file 'src/frame.c' patching file 'src/frame.h' patching file 'src/nsfns.m' patching file 'src/nsterm.h' patching file 'src/nsterm.m' 1 out of 3 hunks failed--saving rejects to 'src/nsterm.m.rej' ERROR: Exit code: 1

Command used -

./build-emacs-for-macos --native-full-aot --git-sha 5e5f5b28e92a3bb927bb03c783c426c6c3baeadc master

entire logs

==> INFO: Fetching info for git ref: 5e5f5b28e92a3bb927bb03c783c426c6c3baeadc
==> INFO: Downloading tarball from GitHub. This could take a while, please be patient.
==> CMD: curl -H "Authorization: Token $GITHUB_TOKEN" -L https://github.com/emacs-mirror/emacs/tarball/5e5f5b28e92a3bb927bb03c783c426c6c3baeadc -o /Users/ckoneru/Documents/build-emacs-for-macos/tarballs/emacs-mirror-emacs-5e5f5b2.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 44.8M    0 44.8M    0     0  3635k      0 --:--:--  0:00:12 --:--:-- 4878k
==> INFO: Extracting tarball...
==> CMD: tar -xzf /Users/ckoneru/Documents/build-emacs-for-macos/tarballs/emacs-mirror-emacs-5e5f5b2.tgz -C /Users/ckoneru/Documents/build-emacs-for-macos/sources
==> CMD: mkdir -p /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches
==> INFO: Downloading patch: https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-30/fix-window-role.patch
==> CMD: curl -L# https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-30/fix-window-role.patch -o /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-001.diff
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                                                                                                                                                                      -=O#-   #        #           #                                                                                                                                                                                                                                 -=O=-#      #        #  ######################################################################################################################################################################################################################################################### 100.0%
==> INFO: patch is symlink to ../emacs-28/fix-window-role.patch
==> CMD: mkdir -p /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches
==> INFO: Downloading patch: https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-28/fix-window-role.patch
==> CMD: curl -L# https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-28/fix-window-role.patch -o /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-001.diff
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                                                                                                                                                                      -=O#-   #        #           #                                                                                                                                                                                                                                 -=O=-#      #        #  ######################################################################################################################################################################################################################################################### 100.0%
==> INFO: Applying patch...
==> CMD: patch -f -p1 -i /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-001.diff
patching file 'src/nsterm.m'
==> CMD: mkdir -p /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches
==> INFO: Downloading patch: https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-30/system-appearance.patch
==> CMD: curl -L# https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-30/system-appearance.patch -o /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-002.diff
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                                                                                                                                                                      -=O#-   #        #           #                                                                                                                                                                                                                                 -=O=-#      #        #  ######################################################################################################################################################################################################################################################### 100.0%
==> INFO: patch is symlink to ../emacs-28/system-appearance.patch
==> CMD: mkdir -p /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches
==> INFO: Downloading patch: https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-28/system-appearance.patch
==> CMD: curl -L# https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-28/system-appearance.patch -o /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-002.diff
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                                                                                                                                                                      -=O#-   #        #           #                                                                                                                                                                                                                                 -=O=-#      #        #  ######################################################################################################################################################################################################################################################### 100.0%
==> INFO: Applying patch...
==> CMD: patch -f -p1 -i /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-002.diff
patching file 'src/frame.h'
patching file 'src/nsfns.m'
patching file 'src/nsterm.m'
==> CMD: mkdir -p /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches
==> INFO: Downloading patch: https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-30/round-undecorated-frame.patch
==> CMD: curl -L# https://github.com/d12frosted/homebrew-emacs-plus/raw/master/patches/emacs-30/round-undecorated-frame.patch -o /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-003.diff
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                                                                                                                                                                                                                                      -=O#-   #        #           #                                                                                                                                                                                                                                 -=O=-#      #        #  ######################################################################################################################################################################################################################################################### 100.0%
==> INFO: Applying patch...
==> CMD: patch -f -p1 -i /Users/ckoneru/Documents/build-emacs-for-macos/sources/emacs-mirror-emacs-5e5f5b2/macos_patches/patch-003.diff
patching file 'src/frame.c'
patching file 'src/frame.h'
patching file 'src/nsfns.m'
patching file 'src/nsterm.h'
patching file 'src/nsterm.m'
1 out of 3 hunks failed--saving rejects to 'src/nsterm.m.rej'
ERROR: Exit code: 1
jimeh commented 1 year ago

Ah, right, it's the round-undecorated-frame patch that's failing.

The reason is that the patch was updated two weeks due to changes in master that caused the patch to fail. But the commit she you're trying to build is from the 6th of April, so no longer compatible with the patch.

Short term, I'd say simplest thing you can try is just remove the --git-sha option and build the latest master commit. In my experience they're fine like 99% of the time and causes no issues.

In the longer-term, I will try and update the known-good-commit list more frequently. I simply haven't been updating my local build as often as I used to the last few months. I'll try to improve on that :)

Finally, I'll also have a look at adding CLI flags for all the patches, so those that are automatically enabled based on Emacs version, can all be forcibly disabled if you so desire.

CsBigDataHub commented 1 year ago

Ah, right, it's the round-undecorated-frame patch that's failing.

The reason is that the patch was updated two weeks due to changes in master that caused the patch to fail. But the commit she you're trying to build is from the 6th of April, so no longer compatible with the patch.

Short term, I'd say simplest thing you can try is just remove the --git-sha option and build the latest master commit. In my experience they're fine like 99% of the time and causes no issues.

In the longer-term, I will try and update the known-good-commit list more frequently. I simply haven't been updating my local build as often as I used to the last few months. I'll try to improve on that :)

Finally, I'll also have a look at adding CLI flags for all the patches, so those that are automatically enabled based on Emacs version, can all be forcibly disabled if you so desire.

@jimeh, Thank you for looking in to this.