Opened 2 years ago

Closed 2 years ago

#65977 closed defect (invalid)

git @2.38 patch fails on M2 macbook

Reported by: markabney Owned by: ci42
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: markabney, herbygillot (Herby Gillot)
Port: git

Description

Installing git 2.38 on a new M2 macbook (Monterey 12.6) fail with the following,

--->  Applying patches to git
--->  Applying patch-Makefile.diff
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_git/git/work/git-2.38.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/git/files/patch-Makefile.diff'
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/Makefile.orig
|+++ b/Makefile
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_git/git/work/git-2.38.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/git/files/patch-Makefile.diff'
Exit code: 1
Error: Failed to patch git: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_git/git/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a
bug.
Error: Processing of port git failed

This may not be relevant, but when calling git after the failed install this error occurs, which seems to suggest the wrong architecture for libpcre2, though I hesitate to report this as a bug since it results after a failed install of git.

$ git --version
dyld[16084]: Library not loaded: '/opt/local/lib/libpcre2-8.0.dylib'
  Referenced from: '/opt/local/bin/git'
  Reason: tried: '/opt/local/lib/libpcre2-8.0.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/usr/local/lib/libpcre2-8.0.dylib' (no such file), '/usr/lib/libpcre2-8.0.dylib' (no such file)
Abort trap: 6

Change History (5)

comment:1 Changed 2 years ago by markabney

Cc: markabney added
Keywords: git install Monterey removed

comment:2 Changed 2 years ago by markabney

Owner: set to ciserlohn@…
Status: newassigned

comment:3 Changed 2 years ago by jmroot (Joshua Root)

Cc: herbygillot added
Owner: changed from ciserlohn@… to ci42
Summary: git 2.38 install fails on M2 macbookgit @2.38 patch fails on M2 macbook

If you migrated from a different machine, please follow wiki:Migration. Otherwise please clean git, try the installation again, and attach the log if it fails.

comment:4 Changed 2 years ago by markabney

That worked. I thought I had intentionally not migrated macports from the old machine but apparently I failed at that. I think this ticket can be closed.

comment:5 Changed 2 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: assignedclosed

OK, glad you got it working.

Note: See TracTickets for help on using tickets.