Board index FlightGear Support Compiling

simgear fg-next :cmake compile error Ubuntu 16.04 x64

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

simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby yanes » Thu Feb 09, 2017 11:28 pm

Hi guys ,
I'm totally inexperienced in cmake source compiling , and in fact to c/cpp coding as well .
(I did a lot of Pascal for both win & linux and dealt with Deb packaging issues via some alternatives ).
I cloned the flightgear and simgear repos from SF by running :
git clone https://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear
git clone https://git.code.sf.net/p/flightgear/simgear flightgear-simgear

and run in the simgear clone :
Code: Select all
mkdir build-sg
cd build-sg
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" ~/Documents/fgsrc/flightgear-simgear


the latter command failed with the following output :
Code: Select all
-- CMAKE Build type:
-- Setting build type to 'Debug' as none was specified.
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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
-- version is 2017 dot 1 dot 0
-- Library installation directory: lib
-- Looking for pthread.h
-- Looking for 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 
-- Boost version: 1.58.0
-- SimGear mode: NORMAL
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindOpenGL.cmake:172 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:206 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/x/Documents/fgsrc/CMakeFiles/CMakeOutput.log".
See also "/home/x/Documents/fgsrc/CMakeFiles/CMakeError.log".

It looks like it's searching for Open-GL symbols, lib paths or may be a someOpenGLpackage-dev (no clue!!).
So how to solve the issue?

thanks in advance ,
Yanes Bechir
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby elgaton » Fri Feb 10, 2017 8:28 pm

Try installing libgl1-mesa-dev and mesa-common-dev:
Code: Select all
sudo apt-get install libgl1-mesa-dev mesa-common-dev
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1106
Joined: Tue Mar 19, 2013 5:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby yanes » Sat Feb 11, 2017 11:59 pm

Thank you @elgaton this solved the issue , simgear compiled linked successfully .
(there was some other issues due to lack of some -dev packages on my system, but when installed every thing went fine .

However, when coming to flightgear source, the make process ("cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" ~/Documents/fgsrc/flightgear-flightgear")
finshed successfully, but the linking/install process aborted with
Code: Select all
/home/xx/Documents/fgsrc/flightgear-flightgear/utils/fgelev/fgelev.cxx:30:35:
fatal error: simgear/props/props.hxx: No such file or directory
compilation terminated.
utils/fgelev/CMakeFiles/fgelev.dir/build.make:62: recipe for target 'utils/fgelev/CMakeFiles/fgelev.dir/fgelev.cxx.o' failed
make[2]: *** [utils/fgelev/CMakeFiles/fgelev.dir/fgelev.cxx.o] Error 1
CMakeFiles/Makefile2:442: recipe for target 'utils/fgelev/CMakeFiles/fgelev.dir/all' failed
make[1]: *** [utils/fgelev/CMakeFiles/fgelev.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs
....
....
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

To be fair , I tried to make a link of simgear source dir in the flightgear src dir but other errors popped out so ,
please tell me if I'm missing somtething .

Thanks in advance
Yanes Bechir.
Last edited by yanes on Mon Feb 13, 2017 1:23 am, edited 1 time in total.
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby elgaton » Sun Feb 12, 2017 10:57 am

After compiling SimGear, did you install it into your prefix by running "make install"?
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1106
Joined: Tue Mar 19, 2013 5:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby yanes » Mon Feb 13, 2017 1:22 am

Thanks for your answer, I really appreciate your help ,
Yes buddy , just as suggested in the Ubuntu wiki page
Code: Select all
make -j2 install

and I checked the binary files there .

regards,
Yanes
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby FlugHund » Mon Feb 13, 2017 3:59 pm

AFAICS there were changes recently int that area of code, mayhap you just cloned the source at a bad time. Try updating it: http://wiki.flightgear.org/FlightGear_G ... it_current

Also, I assume $prefix is the same for both, SG and FG?
User avatar
FlugHund
 
Posts: 568
Joined: Thu Mar 01, 2007 4:27 pm
Location: Inside ground effect
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby yanes » Tue Feb 14, 2017 4:33 am

Thanks for replying @FlugHund , I try to re-pull the repo and bring back the results
Thanks again .
Yanes Bechir
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby FlugHund » Fri Feb 17, 2017 9:45 pm

The past few days the ML ran hot with problems compiling FG on linux. The issue should™ be fixed now. So, update the source and try again.

Make sure the build directories are clean (ideally rm -Rf * there) before running the cmake commands.

The wiki's Debian page has a tad more explanation on how to compile it, though basically it's the same as the link to Ubunut you've posted earlier. All the commands there are made to just copy'n'paste them into the console. Except for the two 'export' ones, which define src and install dirs. If you go through that guide step by step (the plib step can be omitted), without altering anything except you really know what you're doing, and the process still fails, please run the cmake and make commands as such:

cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git 2>&1 | tee SG_cmake.log
make -j2 && make install 2>&1 | tee SG_make.log
cmake -D FG_DATA_DIR:PATH="$FG_INSTALL_DIR/fgdata" -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git 2>&1 | tee FG_cmake.log
make -j2 && make install 2>&1 | tee FG_make.log

Paste the resulting .log files on some pastie (like https://dpaste.de/) so we can have a look at them. Make sure, the pastes will stay online for a week at least. Also, sometimes there are knowledgeable people on IRC who are willing to help in such cases. IRC makes it a bit more interactive which might speed things up with odd compilation issues.
User avatar
FlugHund
 
Posts: 568
Joined: Thu Mar 01, 2007 4:27 pm
Location: Inside ground effect
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby yanes » Thu Feb 23, 2017 10:20 pm

Thank you all guys ,
Re-pulling the source tree solved the issue really ,

I know I 'm a bit late , this is how our lives are ,
Thanks again
Yanes Bechir.
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby C032H272JB » Tue Jul 25, 2017 8:44 pm

*
Last edited by C032H272JB on Sat Aug 26, 2017 10:05 am, edited 1 time in total.
C032H272JB
 
Posts: 25
Joined: Sat Jun 10, 2017 9:30 am

Re: simgear fg-next :cmake compile error Ubuntu 16.04 x64

Postby wkitty42 » Fri Jul 28, 2017 9:24 pm

@C032H272JB: no one can help you further because of the lack of requested information in your other topic(s)... your paranoia is too high... my systems are connected 24x7 and we've had no problems with infestations but we've all been trained not to click on random guff that comes up... we filter everything but things like FG don't really face such problems... it is just not the low hanging fruit like winwhatever and other things are...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests