Board index FlightGear Support Compiling

Terragear compilation - Ubuntu 16.04

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

Terragear compilation - Ubuntu 16.04

Postby rleibner » Fri May 26, 2017 9:19 pm

Hi all,
I'm enjoying FGFS 2017 v.2.0 and I am very interested in improving my local Scenery.
I've run:
Code: Select all
$ cd terragear
$ git pull
$ cd ..
$ rm -rf ./tgbuild
$ sudo cmake ../terragear -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH="../fgbin"

All fine. I got the msg "-- Build files have been written to: /home/rodolfo/terragear"
So,
Code: Select all
$ cd ../terragear
$ sudo make -j2 install

That begins OK but it crash with:
Code: Select all
[ 38%] Building CXX object src/Lib/terragear/CMakeFiles/terragear.dir/tg_nodes.cxx.o
/home/rodolfo/terragear/src/Lib/terragear/tg_misc.cxx: In function ‘SGGeod OffsetPointMiddle(const SGGeod&, const SGGeod&, const SGGeod&, double, int&)’:
/home/rodolfo/terragear/src/Lib/terragear/tg_misc.cxx:177:74: error: ‘isnan’ was not declared in this scope
     if ( (abs(theta - 180.0) < 0.1) || (abs(theta) < 0.1) || (isnan(theta)) ) {
                                                                          ^


I have read many posts about this and tried several scripts unsuccessfully.
So far I've come and my ideas are over.

Am I missing something ?
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4

Re: Terragear compilation - Ubuntu 16.04

Postby elgaton » Sat May 27, 2017 9:28 am

In /home/rodolfo/terragear/src/Lib/terragear/tg_misc.cxx, line 177, replace "isnan" with "std::isnan" and it should compile.

(I'm currently compiling TerraGear on my system; as soon as I have a patch ready, I'll submit the fixes).

By the way, you might want to use the scenery/ws2.0 branch of TerraGear (the one used to create the current World Scenery): the master branch is pretty unstable. (Before executing "git pull", do a "git checkout scenery/ws2.0" to switch to that branch: you will need to do this only once).
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: Terragear compilation - Ubuntu 16.04

Postby rleibner » Sat May 27, 2017 7:57 pm

elgaton wrote in Sat May 27, 2017 9:28 am:In /home/rodolfo/terragear/src/Lib/terragear/tg_misc.cxx, line 177, replace "isnan" with "std::isnan" and it should compile..

Thanks elgaton,
I've made the 2 replacements (lines 177 and 278) and it worked :D
Next step: TerragearGUI - I'll open a specific post for that.
Thanks again.
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4


Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests