在CentOS上编译Mono源树时出错 - 6.X

时间:2013-11-20 09:34:40

标签: gcc compilation compiler-errors mono centos

我想在我的CentOS(i686)上安装最新的Mono版本。由于没有准备使用二进制分发,我试图从here中提取最新的Mono Source 3.2.3。拉动源后,我将其解压缩,将目录更改为它并尝试下面的命令序列 -

[root@localhost mono-3.2.3]# ./configure

未报告任何问题

[root@localhost mono-3.2.3]# make
make[3]: Entering directory `/usr/local/src/mono-3.2.3/mono/metadata'
  CCLD     pedump
./.libs/libmonoruntime.a(libmonoruntime_la-assembly.o): In function `InterlockedDecrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:66: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-assembly.o): In function `InterlockedIncrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:61: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-cominterop.o): In function `InterlockedDecrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:66: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-cominterop.o): In function `InterlockedIncrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:61: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-cominterop.o): In function `InterlockedDecrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:66: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-image.o):/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:61: more undefined references to `__sync_add_and_fetch_4' follow
./.libs/libmonoruntime.a(libmonoruntime_la-marshal.o): In function `InterlockedCompareExchangePointer':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:56: undefined reference to `__sync_val_compare_and_swap_4'
./.libs/libmonoruntime.a(libmonoruntime_la-marshal.o): In function `InterlockedExchangePointer':

在尝试解决此问题时,我找到了thisthisthis。我试图实现那里提到的解决方案,但没有运气。 有人面对过这个吗?

此致 Omky

1 个答案:

答案 0 :(得分:1)

我在make文件中添加了两个编译器开关。

CPPFLAGS = -m32 -march = i686

这对我有用。