在mac上gentoo-prefix系统安装git svn分布式

  本文是记录在mac的gentoo-prefix上安装git svn的问题总结,感兴趣的朋友可以参考一下,或许你也会遇到这些小问题折腾,之前在mac上安装了gentoo-prefix,但是在emerge git的时候,会发现如果增加了subversion这个USE,就会编译失败.
 
  从编译失败的错误上,可以看出,编译失败的来源是svn相关的代码,然后错误是链接的时候提示一些符号找不到,代码如下:
 
  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
  --phpfensi.com
    
       大致可以看出,是intl相关的库没有链接,在gentoo的bugzilla上也查到了类似的bug,按照附件提供的补丁,需要判断当前系统为mac的时候,增加-lintl,以链接intl这个库.
 
  最后修改完的ebuild文件大致为,代码如下:
 
  --- 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 @@
  
      if use subversion ; then
          cd "${S}"/contrib/svn-fe
  +       [[ ${CHOST} = *-darwin* ]] && EXTLIBS="${EXTLIBS} -lintl -liconv"
          git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed"
          if use doc ; then
              git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
  No Comments。
 

dawei

【声明】:站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。