<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>hi everyone,</p>
<p>I don't know what was changed recently, the built-in git command
from Xcode stopped working with the following error</p>
<blockquote>
<p><b><code>fangq@jinwy:~/space/git/Project/autobuild/mcx$ git
pull</code></b><code><br>
</code><code>dyld: lazy symbol binding failed: Symbol not found:
_iconv_open</code><code><br>
</code><code> Referenced from:
/Library/Developer/CommandLineTools/usr/libexec/git-core/git</code><code><br>
</code><code> Expected in: /opt/local/lib/libiconv.2.dylib</code><code><br>
</code><code><br>
</code><code>dyld: Symbol not found: _iconv_open</code><code><br>
</code><code> Referenced from:
/Library/Developer/CommandLineTools/usr/libexec/git-core/git</code><code><br>
</code><code> Expected in: /opt/local/lib/libiconv.2.dylib</code><code><br>
</code><code><br>
</code><code>error: fetch died of signal 6</code><br>
</p>
</blockquote>
<p>I can only fix this if I put /usr/lib in the front of
DYLD_LIBRARY_PATH, but this breaks tons of other command. So, I
decided to install a git from macports, however, this attempt
failed with the following error:</p>
<blockquote>
<p><b><code>fangq@jinwy:~/space/git/Project/autobuild/mcx$ sudo
port install git</code></b><code><br>
</code><code>Warning: xcodebuild exists but failed to execute</code><code><br>
</code><code>Warning: Xcode does not appear to be installed;
most ports will likely fail to build.</code><code><br>
</code><code>---> Computing dependencies for git</code><code><br>
</code><code>---> Applying patches to git</code><code><br>
</code><code>Error: Failed to patch git: command execution
failed</code><code><br>
</code><code>Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git/git/main.log
for details.</code><code><br>
</code><code>Error: Follow
<a class="moz-txt-link-freetext" href="https://guide.macports.org/#project.tickets">https://guide.macports.org/#project.tickets</a> to report a bug.</code><code><br>
</code><code>Error: Processing of port git failed</code><br>
</p>
</blockquote>
<p>look at the main.log file, I found the error message attached at
the end.</p>
<p>My macport version is 2.4.2, OS is Sierra, already ran port
selfupdate. <br>
</p>
<p>I have an old version of xcode (7.3) in order to compile cuda
code, but I don't think it was the issue.</p>
<p>can someone let me know how to fix this? alternative approaches,
such as portable git binaries are also welcome, thanks a lot!<br>
</p>
<p>Qianqian<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><code>:debug:main Executing org.macports.main (git)</code><code></code><br>
<code></code><code>:debug:main dropping privileges: euid changed
to 502, egid changed to 505.</code><code></code><br>
<code></code><code>:debug:main Skipping completed
org.macports.archivefetch (git)</code><code></code><br>
<code></code><code>:debug:main Privilege de-escalation not
attempted as not running as root.</code><code></code><br>
<code></code><code>:debug:main Skipping completed
org.macports.fetch (git)</code><code></code><br>
<code></code><code>:debug:main Privilege de-escalation not
attempted as not running as root.</code><code></code><br>
<code></code><code>:debug:main Skipping completed
org.macports.checksum (git)</code><code></code><br>
<code></code><code>:debug:main Privilege de-escalation not
attempted as not running as root.</code><code></code><br>
<code></code><code>:debug:main Skipping completed
org.macports.extract (git)</code><code></code><br>
<code></code><code>:debug:main Privilege de-escalation not
attempted as not running as root.</code><code></code><br>
<code></code><code>:debug:patch patch phase started at Mon Feb 19
14:27:42 EST 2018</code><code></code><br>
<code></code><code>:debug:patch Executing org.macports.patch (git)</code><code></code><br>
<code></code><code>:notice:patch ---> Applying patches to git</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> ---> Applying
patch-Makefile.diff</code><code></code><br>
<code></code><code>:debug:patch Environment: </code><code></code><br>
<code></code><code>:debug:patch CC_PRINT_OPTIONS='YES'</code><code></code><br>
<code></code><code>:debug:patch
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git/git/work/.CC_PRINT_OPTIONS'</code><code></code><br>
<code></code><code>:debug:patch CPATH='/opt/local/include'</code><code></code><br>
<code></code><code>:debug:patch LIBRARY_PATH='/opt/local/lib'</code><code></code><br>
<code></code><code>:debug:patch MACOSX_DEPLOYMENT_TARGET='10.12'</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> Executing: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git/git/work/git-2.16.2"
&& /usr/bin/patch -p1 <
'/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/git/files/patch-Makefile.diff'</code><code></code><br>
<code></code><code>:debug:patch system: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git/git/work/git-2.16.2"
&& /usr/bin/patch -p1 <
'/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/git/files/patch-Makefile.diff'</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> can't find file to patch at input
line 3</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> Perhaps you used the wrong -p or
--strip option?</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> The text leading up to this was:</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> --------------------------</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> |--- a/Makefile.orig</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> |+++ b/Makefile</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> --------------------------</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> File to patch: </code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> Skip this patch? [y] </code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> Skipping patch.</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> 2 out of 2 hunks ignored</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git/git/work/git-2.16.2"
&& /usr/bin/patch -p1 <
'/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/git/files/patch-Makefile.diff'</code><code></code><br>
<code></code><code>:<a class="moz-txt-link-freetext" href="info:patch">info:patch</a> Exit code: 1</code><code></code><br>
<code></code><code>:error:patch Failed to patch git: command
execution failed</code><code></code><br>
<code></code><code>:debug:patch Error code: CHILDSTATUS 81845 1</code><code></code><br>
<code></code><code>:debug:patch Backtrace: command execution
failed</code><code></code><br>
<code></code><code>:debug:patch while executing</code><code></code><br>
<code></code><code>:debug:patch "system {*}$notty {*}$nice
$fullcmdstring"</code><code></code><br>
<code></code><code>:debug:patch invoked from within</code><code></code><br>
<code></code><code>:debug:patch "command_exec patch "" "<
'$patch'""</code><code></code><br>
<code></code><code>:debug:patch (procedure
"portpatch::patch_main" line 33)</code><code></code><br>
<code></code><code>:debug:patch invoked from within</code><code></code><br>
<code></code><code>:debug:patch "$procedure $targetname"</code><code></code><br>
<code></code><code>:error:patch See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git/git/main.log
for details.</code><code></code><br>
<code></code><br>
</p>
</body>
</html>