Skip to content

Instantly share code, notes, and snippets.

@slawekmikula
Created February 26, 2017 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slawekmikula/0321b1f1997473b9a582638aa16bce2d to your computer and use it in GitHub Desktop.
Save slawekmikula/0321b1f1997473b9a582638aa16bce2d to your computer and use it in GitHub Desktop.
message
Good evening everyone. My first post in the forum, thus greetings to everybody and thanks for a great work with this project.
- I have problem with compiling Terragear from git source. I am using git sources. I've successfully compiled simgear, flightgear but with terragear i've some strange compilation error.
- I was looking at wiki page: http://wiki.flightgear.org/TerraGear, manual compilation from cmake also failed.
Cmake output:
[code]
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- system
-- thread
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- SimGear include directory: /mnt/media/loty/flightgear/source/fgbin/include
-- found SimGear version: 2017.2.0 (needed 3.1.0 or higher)
-- looking for static SimGear libraries
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- found SimGear libraries
-- Performing Test SIMGEAR_COMPILE_TEST
-- Performing Test SIMGEAR_COMPILE_TEST - Failed
CMake Error at CMakeModules/FindSimGear.cmake:222 (message):
Oops, you have installed SimGear includes, however test compiling failed.
Try removing 'CMakeCache.txt' and reconfigure with 'cmake'.
Call Stack (most recent call first):
CMakeLists.txt:95 (find_package)
-- Configuring incomplete, errors occurred!
See also "/mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeOutput.log".
See also "/mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeError.log".
[/code]
Simgear test log (from CMakeError.log):
[code]
Performing C++ SOURCE FILE Test SIMGEAR_COMPILE_TEST failed with the following output:
Change Dir: /mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec1235260834/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1235260834.dir/build.make CMakeFiles/cmTryCompileExec1235260834.dir/build
make[1]: Wejscie do katalogu `/mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec1235260834.dir/src.cxx.o
/usr/bin/c++ -DNO_OPENSCENEGRAPH_INTERFACE -DSIMGEAR_COMPILE_TEST -I/mnt/media/loty/flightgear/source/fgbin/include -o CMakeFiles/cmTryCompileExec1235260834.dir/src.cxx.o -c /mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp/src.cxx
In file included from /usr/include/c++/4.8/cstdint:35:0,
from /mnt/media/loty/flightgear/source/fgbin/include/simgear/math/simd.hxx:25,
from /mnt/media/loty/flightgear/source/fgbin/include/simgear/math/SGVec2.hxx:26,
from /mnt/media/loty/flightgear/source/fgbin/include/simgear/math/SGMath.hxx:31,
from /mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp/src.cxx:3:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
In file included from /mnt/media/loty/flightgear/source/fgbin/include/simgear/math/SGVec2.hxx:26:0,
from /mnt/media/loty/flightgear/source/fgbin/include/simgear/math/SGMath.hxx:31,
from /mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp/src.cxx:3:
/mnt/media/loty/flightgear/source/fgbin/include/simgear/math/simd.hxx: In constructor ‘simd4_t<T, N>::simd4_t(T, T)’:
/mnt/media/loty/flightgear/source/fgbin/include/simgear/math/simd.hxx:144:40: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
simd4_t(T x, T y) : simd4_t(x,y,0,0) {}
^
/mnt/media/loty/flightgear/source/fgbin/include/simgear/math/simd.hxx: In constructor ‘simd4_t<T, N>::simd4_t(T, T, T)’:
/mnt/media/loty/flightgear/source/fgbin/include/simgear/math/simd.hxx:145:45: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
simd4_t(T x, T y, T z) : simd4_t(x,y,z,0) {}
^
make[1]: *** [CMakeFiles/cmTryCompileExec1235260834.dir/src.cxx.o] Błąd 1
make[1]: Opuszczenie katalogu `/mnt/media/loty/flightgear/source/tgbuild/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec1235260834/fast] Błąd 2
Return value: 1
Source file was:
#include <cstdio>
#include "simgear/version.h"
#include "simgear/math/SGMath.hxx"
#define xstr(s) str(s)
#define str(s) #s
#define MIN_MAJOR 3
#define MIN_MINOR 1
#define MIN_MICRO 0
int main() {
int major, minor, micro;
/* printf(%d.%d.%d or greater, , MIN_MAJOR, MIN_MINOR, MIN_MICRO); */
printf("found %s ... ", xstr(SIMGEAR_VERSION));
sscanf( xstr(SIMGEAR_VERSION), "%d.%d.%d", &major, &minor, &micro );
if ( (major < MIN_MAJOR) ||
(major == MIN_MAJOR && minor < MIN_MINOR) ||
(major == MIN_MAJOR && minor == MIN_MINOR && micro < MIN_MICRO) ) {
return -1;
}
return 0;
}
[/code]
It seems that it cannot link the pthread library. What can be wrong ? Thanks for help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment