Gentoo-prefix was installed on the Mac before. But when emerge git, it will be found that if you add subversion to this use, the compilation fails.
from a compilation failure error, you can see that the source of the compilation failure is SVN-related code, and then when the error is linked, some symbols are not found:
code is as follows |
copy code |
undefined Symbols for Architecture x86_64: "_libintl_ngettext", referenced from: _ Show_date_relative in Libgit.a (DATE.O) "_libintl_gettext", referenced from: _show_date_relative in Libgit.a (DATE.O) _warn_on_inaccessible in Libgit.a ( WRAPPER.O) _xgetpwuid_self in Libgit.a (WRAPPER.O) Ld:symbol (s) not found for Architecture x86_64 |
As can be seen, there are no links to intl related libraries. Similar bugs have been found on the bugzilla of Gentoo. According to the patch provided by the attachment, you need to determine the current system for Mac, add-lintl to link intl This library.
In addition to this library, there is a iconv-related symbol that cannot be found. There is no description in the bug. After querying with E-file on another Gentoo machine, it was found that the iconv of native Linux was provided by GLIBC. But prefix is not free to install GLIBC's library. However, the DEV-LIBS/LIBICONV package has been installed inside the system, providing a iconv related library. So as before, you need to manually add-liconv to the link.
The last modified Ebuild file is roughly:
The code is as follows |
Copy Code |
---git-1.9.2.ebuild .old 2014-04-20 15:10:34.000000000 +0800 +++ git-1.9.2.ebuild 2014-04-20 15:09:54.000000000 +0800 @@ -324,6 +324,7 @@ -324,6 if use subversion; then &nbs p; CD "${s}"/contrib/svn-fe + [[${CHOST} = *- Darwin*]] && extlibs= "${extlibs}-lintl-liconv" git_emake extlibs= "${extlibs}" | | Die "Emake Svn-fe failed" if use doc; then & nbsp; Git_emake Svn-fe. {1,html} | | Die "Emake svn-fe.1 svn-fe.html failed" No Comments |