如何在Solaris上构建Git

如何在Solaris上构建Git,git,makefile,solaris,Git,Makefile,Solaris,我从以下网站下载了Git源代码: https://github.com/git/git 现在正尝试在Solaris 10g上构建 我不确定我需要在Makefile中更改什么,如果有的话,因为没有配置文件。当我运行make时,我得到: cc: illegal option -Wall make: *** [credential-store.o] Error 1 我确实安装了gcc,但我不确定如何告诉Makefile使用它 更新: 根据下面的答案更新了Makefile,但我仍然无法将其编译: m

我从以下网站下载了Git源代码:

https://github.com/git/git
现在正尝试在Solaris 10g上构建

我不确定我需要在Makefile中更改什么,如果有的话,因为没有配置文件。当我运行make时,我得到:

cc: illegal option -Wall
make: *** [credential-store.o] Error 1
我确实安装了gcc,但我不确定如何告诉Makefile使用它

更新:

根据下面的答案更新了Makefile,但我仍然无法将其编译:

make
CC credential-store.o
cc1: error: unrecognized command line option "-fprofile-correction"
make: *** [credential-store.o] Error 1
将的第396行修改为

关于-fprofile更正问题,您可以通过从的第1558行删除有问题的选项来解决它。 也就是说,改变

CFLAGS += -fprofile-use=$(PROFILE_DIR) -fprofile-correction -DNO_NORETURN=1
进入

将的第396行修改为

关于-fprofile更正问题,您可以通过从的第1558行删除有问题的选项来解决它。 也就是说,改变

CFLAGS += -fprofile-use=$(PROFILE_DIR) -fprofile-correction -DNO_NORETURN=1
进入


看一看。您可以获得一个工作的git包以及关于如何构建它的源代码。

看看。你可以得到一个工作的git包以及如何构建它的源代码。

2年后,git的当前版本是2.9.3,但Google将我发送到这里作为参考

我最初的编译错误是:

    LINK git-credential-store
ld: fatal: library -liconv: not found
ld: fatal: file processing errors. No output written to git-credential-store
collect2: ld returned 1 exit status
make: *** [Makefile:2018: git-credential-store] Error 1
$
它使用gnu make编译,在路径方面领先于Solaris make:

make configure      # creates the configure script
./configure --with-iconv=/usr/local --with-openssl=/usr/local --with-zlib=/usr/local --with-python=/usr/sfw/bin
make ICONV_LINK='-L/usr/local/lib -lintl' CC=gcc
编译GNU软件需要gmake或同等软件。由于其他项目的原因,我最近将/usr/sfw/中的大部分内容重新编译成/usr/local,包括最新的gnu版本。发现了iconv和gettext相互关联的其他引用,它们需要在了解彼此存在的情况下进行编译,因此每个引用编译了两次

安装文件和./configure-help对我来说是不足够的参考资料,但它们给了我90%的帮助

直到找到这个引用,我才找到成功编译所需的ICONV_链接='-L/usr/local/lib-lintl'。第一次,我完全遵循它,进行了所有编辑,直到我将其缩小到我上面发布的内容:

主机和编译器:

$ uname -a
SunOS mysunbox 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Blade-1500 Solaris
$
$ gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
$

希望这对别人有帮助!也许再过2年

2年后,git的当前版本是2.9.3,但谷歌把我送到这里作为参考

我最初的编译错误是:

    LINK git-credential-store
ld: fatal: library -liconv: not found
ld: fatal: file processing errors. No output written to git-credential-store
collect2: ld returned 1 exit status
make: *** [Makefile:2018: git-credential-store] Error 1
$
它使用gnu make编译,在路径方面领先于Solaris make:

make configure      # creates the configure script
./configure --with-iconv=/usr/local --with-openssl=/usr/local --with-zlib=/usr/local --with-python=/usr/sfw/bin
make ICONV_LINK='-L/usr/local/lib -lintl' CC=gcc
编译GNU软件需要gmake或同等软件。由于其他项目的原因,我最近将/usr/sfw/中的大部分内容重新编译成/usr/local,包括最新的gnu版本。发现了iconv和gettext相互关联的其他引用,它们需要在了解彼此存在的情况下进行编译,因此每个引用编译了两次

安装文件和./configure-help对我来说是不足够的参考资料,但它们给了我90%的帮助

直到找到这个引用,我才找到成功编译所需的ICONV_链接='-L/usr/local/lib-lintl'。第一次,我完全遵循它,进行了所有编辑,直到我将其缩小到我上面发布的内容:

主机和编译器:

$ uname -a
SunOS mysunbox 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Blade-1500 Solaris
$
$ gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
$

希望这对别人有帮助!也许在未来2年

Thx,这确实让我可以使用gcc,但它仍然无法构建。更新了问题。有了这个+gmake,我就可以构建它了。Thx,这确实让我可以使用gcc,但它仍然无法构建。更新了问题。有了这个+gmake,我就可以构建它了。Thx.nit:这是Solaris 10,不是Solaris 10g。该后缀用于Oracle rdbms,而不是Oracle Solaris。timrau re gcc的回答是您需要的,elsewise.nit:它是Solaris 10,而不是Solaris 10g。该后缀用于Oracle rdbms,而不是Oracle Solaris。timrau re gcc的回答是您所需要的,elsewise.OpenCSW版本的git比Solaris软件包管理器的版本稍新,但仍然很旧。例如,它仍然没有worktrees功能。git的OpenCSW版本比Solaris软件包管理器中的版本稍新,但仍然非常旧。例如,它仍然没有worktrees功能。