0

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 ?

Andrus
  • 26,339
  • 60
  • 204
  • 378
  • Is the question about building Mono or CMake? 2 of 3 attempts described in the question are unrelated to Mono... – Tsyvarev Mar 10 '19 at 08:59
  • Ultimate goal is to run MVC applicaton in Mono. Currently it causes SIGSEGV in mono. Question asks for this solution and describes one way which may solve this. This way requires compiling CMake which fails. Compiling CMake is stopper issue preventing Mono to compile. – Andrus Mar 10 '19 at 13:47
  • Mono 5.x has been accepted in debian recently, just upgrade to a version of Debian that has it – knocte Mar 10 '19 at 14:56
  • Upgrading is a lot of work. I compiled Mono 5 in old Debian squeeze without issues. Squeeze does not have cmake installed. Why cmake is required in debian wheezy and how to compile mono in wheezy ? – Andrus Mar 10 '19 at 20:40
  • don't upgrade, install a new debian version from scratch; it's going to be much less work than solving this problem; why do you need a new version of Mono instead of the one that Wheezy brings? – knocte Mar 11 '19 at 12:51
  • If Mono needs a minimum version of 2.8.10 for CMake, why don't you [just download that](https://cmake.org/files/v2.8/cmake-2.8.10.tar.gz)? – nega Mar 11 '19 at 20:28
  • @knocte Trying to run application in Wheezy mono causes SIGSEGV as described in referenced question and application does not start. I thought that maybe Mono new version works. – Andrus Mar 12 '19 at 13:08
  • @nega I donwloaded CMake as you recommended. This containf source code and question is that this source code wont compile, compile time error occurs. – Andrus Mar 12 '19 at 13:10
  • CMake 2.8.x compiles perfectly fine on Wheezy with the default `gcc/g++`. – nega Mar 12 '19 at 13:53
  • In my case it does not compile. ´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´ throws error shown in question. I asked how to solve this. Compiling CMake 2.8 throws same error – Andrus Mar 13 '19 at 11:05

0 Answers0