Board index FlightGear Support Compiling

CMake error  Topic is solved

Building FlightGear from source, and in the need for help?

CMake error

Postby Sergey » Fri Jul 01, 2016 10:43 am

Hi. I'm trying to compile FlightGear for the first time. I can't pass this error.
I run cmake ../simgear -DCMAKE_BUILD_TYPE=Release in sgbuild as install file says.

Code: Select all
CMake Error at bucket/CMakeLists.txt:2 (include):
  include could not find load file:

    SimGearComponent


CMake Error at bucket/CMakeLists.txt:7 (simgear_component):
  Unknown CMake command "simgear_component".


Did I miss anything?
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby elgaton » Fri Jul 01, 2016 12:08 pm

Hi and welcome!

  • Can you double check you have created the sgbuild folder alongside the simgear one, as in the following example:
    Code: Select all
    <parent directory>
    |- simgear
    |- sgbuild
  • What version of CMake are you running, and on which distribution?
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: CMake error

Postby Sergey » Fri Jul 01, 2016 3:37 pm

I am running CMake 3.5.2
Yes, simgear and sgbuild are hierarchically equal.
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby elgaton » Fri Jul 01, 2016 3:55 pm

Could you please copy and paste the complete output of the compilation process here (between "code" tags)?
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: CMake error

Postby Sergey » Sat Jul 02, 2016 5:12 am

Code: Select all
-- The C compiler identification is GNU 6.1.1
-- The CXX compiler identification is GNU 6.1.1
-- 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
CMake Error at bucket/CMakeLists.txt:2 (include):
  include could not find load file:

    SimGearComponent


CMake Error at bucket/CMakeLists.txt:7 (simgear_component):
  Unknown CMake command "simgear_component".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby Sergey » Sat Jul 02, 2016 5:25 am

Code: Select all
should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/sergey/simgear-2016.2.1/sgbuild/CMakeFiles/CMakeOutput.log".
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby elgaton » Sat Jul 02, 2016 7:42 am

Are you trying to compile the SimGear Git version or the .tar.bz2 version from SourceForge?
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: CMake error

Postby erik » Sat Jul 02, 2016 7:45 am

I seem to remember there was a chance of getting a CMake error in SimGear. And the workaround was to run cmake again. But I can't remember if it was about this error.
At some point that error has to be fixed though.

Erik
erik
 
Posts: 1522
Joined: Thu Nov 01, 2007 1:41 pm

Re: CMake error

Postby Sergey » Sat Jul 02, 2016 7:50 am

This one is from SourceForge, but I tried git version with the same outcome.
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby elgaton » Sat Jul 02, 2016 8:00 am

I've just compiled the SimGear tarball from SourceForge on my machine (a fully up-to-date Arch Linux box) and I was unable to reproduce the bug you're seeing. I'll download the Fedora 24 ISO this night (my ISP imposes a data cap during the day, but I've got unlimited Internet by night) and try to compile it again in a VM to check if this depends on your distribution.

What puzzles me is the fact that CMake:
  • reports that it can not find the SimGearComponent file (which is definitely there, in CMakeModules...)
  • as well as the cmake_minimum_required command (it's in the very first line of CMakeLists.txt).
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: CMake error

Postby Sergey » Sat Jul 02, 2016 8:33 am

Thank you so much!
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby elgaton » Sun Jul 03, 2016 7:55 am

A quick update - I was unable to download the ISO as I had to get other files for work, I'll do it this night/next morning.
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1107
Joined: Tue Mar 19, 2013 4:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: CMake error  

Postby Sergey » Mon Jul 04, 2016 8:15 am

Yay, I passed the error under /usr/local/src! Then CMake said I was missing libcurl-devel and boost-devel.
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby Sergey » Mon Jul 04, 2016 8:53 am

Now it stops at 77% during compilation
Code: Select all
No rule to make target '/usr/lib64/libGL.so', needed by 'simgear/bucket/test_bucket'.  Stop
recipe for target 'simgear/bucket/CMakeFiles/test_bucket.dir/all' failed
[simgear/bucket/CMakeFiles/test_bucket.dir/all] Error 2
No rule to make target '/usr/lib64/libGL.so', needed by 'simgear/io/test_dns'.  Stop.
recipe for target 'all' failed
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Re: CMake error

Postby Sergey » Mon Jul 04, 2016 9:20 am

So I am missing libGL.so.1.2.0. Is that somehow related to proprietary Nvidia driver I have installed?
Sergey
 
Posts: 11
Joined: Fri Jul 01, 2016 10:08 am
OS: Fedora 24

Next

Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest