How to compile Mono in Debian Wheezy

2019-08-29 02:45发布

Trying to fix Mono SIGSEGV as described in

How to fix SIGSEGV which prevents MVC application running in Mono

I tried to compile newer mono from source codes:

wget http://download.mono-project.com/sources/mono/mono-5.18.0.225.tar.bz2
cd /usr/local/src
tar jxf mono-5.18.0.225.tar.bz2
cd mono-5.18.0.225
./autogen.sh --prefix=/opt/m518

autogen stops with error that CMake 2.8.10 is required:

....
Making install in btls
make[2]: Entering directory `/usr/local/src/mono-5.18.0.268/mono/btls'
mkdir -p build-shared
(cd build-shared && CC="gcc" CXX="g++" /usr/bin/cmake -D CMAKE_MAKE_PROGRAM=/usr/bin/make -D CMAKE_INSTALL_PREFIX:PATH=/opt/m518 -D BTLS_ROOT:PATH=/usr/local/src/mono-5.18.0.268/external/boringssl -D SRC_DIR:PATH=/usr/local/src/mono-5.18.0.268/mono/btls -D BTLS_CFLAGS:STRING=""  -DBTLS_ARCH="x86_64" -DBUILD_SHARED_LIBS=1 /usr/local/src/mono-5.18.0.268/mono/btls)
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 2.8.10 or higher is required.  You are running version 2.8.9

I havent found CMake 2.8.10 version for my debian. So I tried to compile CMake using

cd /usr/local/src
wget  https://github.com/Kitware/CMake/releases/download/v3.14.0-rc4/cmake-3.14.0-rc4.tar.gz
tar -xzf cmake-3.14.0-rc4.tar.gz
cd cmake-3.14.0-rc4
./configure
make

but make fails with error

g++  -std=gnu++11      -I/usr/local/src/cmake-3.14.0-rc4/Bootstrap.cmk   -I/usr/local/src/cmake-3.14.0-rc4/Source   -I/usr/local/src/cmake-3.14.0-rc4/Source/LexerParser   -I/usr/local/src/cmake-3.14.0-rc4/Utilities  -c /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx -o cmCommands.o
In file included from /usr/local/src/cmake-3.14.0-rc4/Source/cmFindBase.h:11:0,
                 from /usr/local/src/cmake-3.14.0-rc4/Source/cmFindPathCommand.h:11,
                 from /usr/local/src/cmake-3.14.0-rc4/Source/cmFindFileCommand.h:8,
                 from /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx:29:
/usr/local/src/cmake-3.14.0-rc4/Source/cmFindCommon.h:28:3: error: looser throw specifier for ‘virtual cmFindCommon::~cmFindCommon()’
In file included from /usr/local/src/cmake-3.14.0-rc4/Source/cmAddCompileDefinitionsCommand.h:11:0,
                 from /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx:7:
/usr/local/src/cmake-3.14.0-rc4/Source/cmCommand.h:36:11: error:   overriding ‘virtual cmCommand::~cmCommand() noexcept (true)’
In file included from /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx:34:0:
/usr/local/src/cmake-3.14.0-rc4/Source/cmForEachCommand.h:22:3: error: looser throw specifier for ‘virtual cmForEachFunctionBlocker::~cmForEachFunctionBlocker()’
In file included from /usr/local/src/cmake-3.14.0-rc4/Source/cmForEachCommand.h:12:0,
                 from /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx:34:
/usr/local/src/cmake-3.14.0-rc4/Source/cmFunctionBlocker.h:29:11: error:   overriding ‘virtual cmFunctionBlocker::~cmFunctionBlocker() noexcept (true)’
In file included from /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx:81:0:
/usr/local/src/cmake-3.14.0-rc4/Source/cmWhileCommand.h:22:3: error: looser throw specifier for ‘virtual cmWhileFunctionBlocker::~cmWhileFunctionBlocker()’
In file included from /usr/local/src/cmake-3.14.0-rc4/Source/cmForEachCommand.h:12:0,
                 from /usr/local/src/cmake-3.14.0-rc4/Source/cmCommands.cxx:34:
/usr/local/src/cmake-3.14.0-rc4/Source/cmFunctionBlocker.h:29:11: error:   overriding ‘virtual cmFunctionBlocker::~cmFunctionBlocker() noexcept (true)’
make: *** [cmCommands.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /usr/local/src/cmake-3.14.0-rc4/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
make: *** No targets specified and no makefile found.  Stop.

I trid also to compile CMake older version

cd /usr/local/src
wget https://cmake.org/files/v3.10/cmake-3.10.0.tar.gz
tar -xzf cmake-3.10.0.tar.gz
cd cmake-3.10.0
./configure
make

but same error occurs.

I have also very old Debian Squeeze in other computer. It does not have cmake installed but compiles Mono without issues. Compiling in Wheezy throws error in cmake is not installed.

I to compile newer mono or if this helps, newer cmake in Debian Wheezy ?

0条回答
登录 后发表回答