Solaris 下面 gcc 编译失败的处理

由 徐永久 发表于 2001年10月28日 14:29。

在安装一些 Perl 模块时,如果 OS 为 Solaris 的话,Perl 认为编译器命令是 cc ,即使我们对 gcc 做了软连接到 cc ,但是发现还是编译错误。

我们需要做以下的检查:

* 确保路径中包含 /usr/local/bin 和 /usr/ccs/bin ,但是不包含 /usr/ucb 。
* 运行 perl Makefile.PL 后不要马上运行 make 。
* 编辑生成的 Makefile:
o 把 CC 的定义从 cc 修改为 gcc 。
o 把 LD 的定义从 cc 修改为 gcc 。
o 把 CCCDLFLAGS 的定义从 -KPIC 修改为 -fPIC 。
o 把 OPTIMIZE 的定义从 -xO3 -xdepend 修改为 -O2 。
* 运行 make, make test 和 make install。

相关文章

您可以 发表评论, 或者从您的网站trackback

发表评论

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image