Board index FlightGear Support Installation Linux

[Script] download_and_compile for TERRAGEAR-CS

Installing FlightGear, scenery, aircraft etc. on Linux systems like Ubuntu.

[Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Fri Dec 30, 2011 8:17 pm

Hi everybody,

Since long time I would like to improve scenery with high detail terrain but I've never successfully compilation.
I thinks many people are in the same case : I want to contribute to Airports/Scenery but terragear is too hard to install for me

In this way, I've decided to bring the download_and_compile script like brisa script.

I will explain what do the script :
  • Update and/or install dependances
  • Download GPC232
  • Patch GPC_EPSILON()
  • Create GPC232 Makefile
  • Compile and install GPC232 in $(pwd)/install/gpc232
  • Download NEWMAT11
  • Compile and install NEWMAT11 in $(pwd)/install/newmat11
  • Download OSG 3.0.1
  • Compile and install OSG in $(pwd)/install/OpenSceneGraph
  • Download SimGear 2.5.0
  • Compile and install SimGear in $(pwd)/install/simgear
  • Download TerraGear-CS
  • Compile and install TerraGear-CS in $(pwd)/install/terragear-cs
  • Download TerraGearGUI
  • Compile and install TerraGearGUI in $(pwd)/terragear-cs
  • Create a launcher "run_terrageargui.sh"

You can download the script here : http://clement.delhamaide.free.fr/downl ... pile_tg.sh

Cheers,
Clément
Last edited by F-JJTH on Thu Apr 10, 2014 8:57 am, edited 5 times in total.
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby f-ojac » Sat Dec 31, 2011 11:25 am

Nice to see you work on this Clément, nice idea. We've just been talking about terragear on the Scenery forum. I think this is where this thread should go for now?

Haven't been compiling tg for a while now and I'm on anothe big project for now, but I'm sure you will find some help.
f-ojac
 
Posts: 1304
Joined: Fri Mar 07, 2008 10:50 am
Version: GIT
OS: GNU/Linux

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby psadro_gm » Sat Dec 31, 2011 3:06 pm

You are so very close. There is a namespace collision with newmat11. You are picking up some other definition of Matrix. Most likely OSG::Matrix. IIRC, I had this trouble as well, and started modifying. terragear code to fix. This was not the right thing to do.

It's been so long since I've set up my fedora machine, now, that I don't remember exactly how I got around this.

One thing I do know about my current setup, is that I installed all of osg and simgear with the default prefix.

Pete
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 751
Joined: Thu Aug 25, 2011 3:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby psadro_gm » Sat Dec 31, 2011 3:31 pm

Looking at the newmat #include.h file, I see that the author has wrappped his definitions in a namespace, but it is disabled by default.
As I know I ran across this same issue before, we should probably fix this the right way by enabling the namespace, then modifying airport_surface to use it.

I believe airport surface is the only file to use netma11 ( for the altitude smoothing operation)

line I would enable is here:

//#define use_namespace // define name spaces

If you don't want to tackle this, I can play with this namespace issue and give it a try.

Pete
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 751
Joined: Thu Aug 25, 2011 3:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Sat Dec 31, 2011 3:52 pm

Thank you for your answers boys.

I have successfully compiled TerraGear-CS with my script ! :!:

I have fixed 2 bugs :
- Now libboost-dev install the good version depending of Linux version (this fix can also be added in brisa script ;) )
- TerraGear is compiled ! I have fixed the newmat error

But is still the bug about missing dependance because I have tested to install TerraGear on other computer with other Linux and OSG compilation crash :/
I have also include GDAL compilation (1.8.1) to be sure we have the good GDAL library because TerraGear use it mainly.

So currently my script work on my workstation :
Linux Mint 11 (Katya) 64 bits
Linux 2.6.38-8-generic
GNOME 2.32.1
Intel Quad Core i5 760@2.80GHz

But don't work on my laptop :
Linux Mint 12 (Lisa) 64 bits
Linux 3.0.0-12-generic
GNOME 3.2.1
AMD Turion 64 X2

On my laptop OSG crash during compilation about :
Code: Select all
make[2]: *** No rule to make target « /usr/lib/x86_64-linux-gnu/libGL.so », necessary to « lib/libosg.so.3.0.1 ». Stop.
make[1]: *** [src/osg/CMakeFiles/osg.dir/all] Error 2
make: *** [all] Error 2


I've checked libGL.so and all is good : libGL.so exist in /usr/lib/x86_64-linux-gnu ! It's amazing :shock:

If someone can say me how to force OSG to read /usr/lib/x86_64-linux-gnu/libGL.so it's very appreciated ;)
I don't understand why it run with Linux Mint 11 but not with Linux Mint 12...

You can dowload the new version of my script here : http://clement.delhamaide.free.fr/terra ... compile.sh (same link as tomorrow but updated)

Cheers,
Clément
Last edited by F-JJTH on Thu Apr 10, 2014 8:57 am, edited 2 times in total.
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Sat Dec 31, 2011 7:39 pm

New update !
- Now the script include TerraGear GUI ;)
- I have removed GDAL compilation and replace it by "apt-get install gdal-bin"

Please test the script and tell me if it work for you (tell me your configuration). Download it here : http://clement.delhamaide.free.fr/fligh ... compile.sh

How to test this script ?
  • Create an empty directory, for exemple "fgfs-tools"
  • Download the script and put it in your "fgfs-tools" directory
  • Open a terminal and go into "fgfs-tools" directory : cd fgfs-tools
  • Launch the script : sh terragear_download_and_compile.sh -j 4 ALL
    (-j 4 = 4 works proc , ALL = compile ALL tools , help is available = sh terragear_download_and_compile.sh -h)
  • When script is ended you can start TerraGearGUI : ./run_terrageargui.sh

You can find "TerraGear Root" in fgfs-tools/install/terragear-cs/bin

Cheers,
Clément
Last edited by F-JJTH on Thu Apr 10, 2014 8:58 am, edited 2 times in total.
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby sgofferj » Sat Dec 31, 2011 8:05 pm

apt-get is only available on debian-based distros. Other distros, e.g. Opensuse have different package management systems.
FG 3.1 GIT / Opensuse 12.3 / Phenom II X4 / GForce GTX560
Stefan's little Flightgear corner | The Finnish Weather Center | Wolves in Finland

Working on: EFTP
COM: IAX2:home.gofferje.net/stefan (MO-FR 0700-2000 UTC, SA+SU 0900-2000 UTC)
sgofferj
 
Posts: 789
Joined: Mon Dec 05, 2011 5:13 pm
Location: EFTP
Callsign: OH-SW
Version: 3.1 GIT
OS: Opensuse

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Sat Dec 31, 2011 8:42 pm

Absolutly correct ;)
We have the same problem with Brisa script and my script is based on Brisa script.

Cheers,
Clément
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Sun Jan 01, 2012 2:07 pm

Hi all,
Happy new year !

I've updated my script. Now my script run on my laptop and on my workstation.
The problem came from libGL.so emplacement, now I have forced standard emplacement (/usr/lib) with : -D OPENGL_INCLUDE_DIR="/usr/lib" -D OPENGL_gl_LIBRARY="/usr/lib/libGL.so" (It will be good to add this in Brisa script too. I will contact the author.)

Also, the TerraGear Root field in TerraGear GUI is auto filled by the script. ( I search to make the most easy script to people who want contribute)

Current version : 0.4 0.6 (18/01/2012)
Download it : http://clement.delhamaide.free.fr/terra ... compile.sh

Cheers,
Clément
Last edited by F-JJTH on Thu Apr 10, 2014 8:58 am, edited 3 times in total.
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby f-ojac » Sun Jan 01, 2012 8:35 pm

Nice work for the new year Clément, hope to test it sometimes. Don't know if Brisa is still working on his script, do you think it would be possible to merge both in a single file, and make of course TG optional?

Thanks.
f-ojac
 
Posts: 1304
Joined: Fri Mar 07, 2008 10:50 am
Version: GIT
OS: GNU/Linux

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Sun Jan 01, 2012 8:58 pm

olivier.jacq wrote in Sun Jan 01, 2012 8:35 pm:do you think it would be possible to merge both in a single file, and make of course TG optional?


Hummm it will be very nice to merge both in a single file ! But Brisa script gives the possibility to compile Simgear in developement version or in stable version but TerraGear need absolutely developement version. If a "noob" choose to execute Brisa script in mode "stable version" Terragear can't compile...

May be other people thinks it will be a good thing to merge both... say it here please ;)

Cheers,
Clément
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby brisa » Mon Jan 02, 2012 9:39 am

Hi,

first of all happy new year :-) and my compliments for your script :D
I remember I tried to compile terragear, but I had no success :-(

Btw, you was asking how to check for ubuntu version, just inside the script take a look at /etc/issue, or look inside my script, it makes some differences between different ubuntu releases.

Yes, I am still working on my script, but there is not much to do now, I tried to modify it for the upcoming aircraft/fg-data split, but I discovered that the split was never done at the end.

If you think you can merge the scripts could be a good idea, but terragear is for scenery dev only, so I will keep it separated (My opinion), it should be easier to be managed too.

I have not tried the script yet, but I will do asap !

cheers
Francesco
User avatar
brisa
 
Posts: 268
Joined: Fri May 16, 2008 8:32 pm
Location: Olgiate Comasco (CO) Italy
Callsign: brisa

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby f-ojac » Mon Jan 02, 2012 7:57 pm

Following your question on the devel, to edit airports in full 8.50 format you need to use Wed, the tool used by XPlane.

Concerning the integration with Brisa's script, as mentioned, TG's compilation would clearly be optional.
f-ojac
 
Posts: 1304
Joined: Fri Mar 07, 2008 10:50 am
Version: GIT
OS: GNU/Linux

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby btw » Wed Jan 18, 2012 12:19 am

I've tried the script in Ubuntu 10.04 unsuccessfully, bellow is what I see at the end of the processing, make just aint makin it !

Code: Select all
****************************************
*************** TERRAGEAR **************
****************************************
Initialized empty Git repository in /home/ben/terragear-cs/.git/
remote: Counting objects: 8788, done.
remote: Compressing objects: 100% (2624/2624), done.
remote: Total 8788 (delta 6380), reused 8056 (delta 5892)
Receiving objects: 100% (8788/8788), 5.09 MiB | 2.00 MiB/s, done.
Resolving deltas: 100% (6380/6380), done.
Branch newconstruct set up to track remote branch newconstruct from origin.
Switched to branch 'newconstruct'
Already up-to-date.
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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
-- Boost version: 1.40.0
-- Found the following Boost libraries:
-- Found ZLIB: /usr/lib/libz.so
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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
-- /home/ben/install/simgear/include
-- Looking for clock_gettime
-- Looking for clock_gettime - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- looking for version: 2.5.0
-- Performing Test SIMGEAR_VERSION_OK
-- Performing Test SIMGEAR_VERSION_OK - Success
-- Found SimGear: optimized;/home/ben/install/simgear/lib/libsgephem.a;debug;/home/ben/install/simgear/lib/libsgephem.a;optimized;/usr/local/lib/libsgsky.a;debug;/usr/local/lib/libsgsky.a;optimized;/usr/local/lib/libsgmaterial.a;debug;/usr/local/lib/libsgmaterial.a;optimized;/usr/local/lib/libsgtgdb.a;debug;/usr/local/lib/libsgtgdb.a;optimized;/usr/local/lib/libsgmodel.a;debug;/usr/local/lib/libsgmodel.a;optimized;/usr/local/lib/libsgscreen.a;debug;/usr/local/lib/libsgscreen.a;optimized;/home/ben/install/simgear/lib/libsgnasal.a;debug;/home/ben/install/simgear/lib/libsgnasal.a;optimized;/home/ben/install/simgear/lib/libsgroute.a;debug;/home/ben/install/simgear/lib/libsgroute.a;optimized;/home/ben/install/simgear/lib/libsgtiming.a;debug;/home/ben/install/simgear/lib/libsgtiming.a;optimized;/home/ben/install/simgear/lib/libsgio.a;debug;/home/ben/install/simgear/lib/libsgio.a;optimized;/home/ben/install/simgear/lib/libsgbucket.a;debug;/home/ben/install/simgear/lib/libsgbucket.a;optimized;/home/ben/install/simgear/lib/libsgserial.a;debug;/home/ben/install/simgear/lib/libsgserial.a;optimized;/home/ben/install/simgear/lib/libsgmath.a;debug;/home/ben/install/simgear/lib/libsgmath.a;optimized;/home/ben/install/simgear/lib/libsgstructure.a;debug;/home/ben/install/simgear/lib/libsgstructure.a;optimized;/home/ben/install/simgear/lib/libsgprops.a;debug;/home/ben/install/simgear/lib/libsgprops.a;optimized;/home/ben/install/simgear/lib/libsgxml.a;debug;/home/ben/install/simgear/lib/libsgxml.a;optimized;/home/ben/install/simgear/lib/libsgmisc.a;debug;/home/ben/install/simgear/lib/libsgmisc.a;optimized;/home/ben/install/simgear/lib/libsgthreads.a;debug;/home/ben/install/simgear/lib/libsgthreads.a;optimized;/home/ben/install/simgear/lib/libsgdebug.a;debug;/home/ben/install/simgear/lib/libsgdebug.a;optimized;/home/ben/install/simgear/lib/libsgmagvar.a;debug;/home/ben/install/simgear/lib/libsgmagvar.a
-- Found GPC: /home/ben/install/gpc232/lib/libgenpolyclip.a
-- Found TIFF: /usr/lib/libtiff.so
-- Found newmat: /home/ben/install/newmat11/lib/libnewmat.a
-- Could NOT find GDAL  (missing:  GDAL_LIBRARY GDAL_INCLUDE_DIR)
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for rint
-- Looking for rint - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ben/terragear-cs
Scanning dependencies of target poly2tri
[  0%] Building C object src/Lib/poly2tri/CMakeFiles/poly2tri.dir/construct.c.o
[  1%] Building C object src/Lib/poly2tri/CMakeFiles/poly2tri.dir/misc.c.o
[  2%] Building C object src/Lib/poly2tri/CMakeFiles/poly2tri.dir/monotone.c.o
[  3%] Building C object src/Lib/poly2tri/CMakeFiles/poly2tri.dir/tri.c.o
Linking C static library libpoly2tri.a
[  3%] Built target poly2tri
Scanning dependencies of target Geometry
[  4%] Building CXX object src/Lib/Geometry/CMakeFiles/Geometry.dir/contour_tree.cxx.o
[  4%] Building CXX object src/Lib/Geometry/CMakeFiles/Geometry.dir/line.cxx.o
In file included from /home/ben/terragear-cs/src/Lib/Geometry/rectangle.hxx:17,
                 from /home/ben/terragear-cs/src/Lib/Geometry/line.hxx:19,
                 from /home/ben/terragear-cs/src/Lib/Geometry/line.cxx:8:
/home/ben/terragear-cs/src/Lib/Polygon/polygon.hxx:62:17: error: gpc.h: No such file or directory
make[2]: *** [src/Lib/Geometry/CMakeFiles/Geometry.dir/line.cxx.o] Error 1
make[1]: *** [src/Lib/Geometry/CMakeFiles/Geometry.dir/all] Error 2
make: *** [all] Error 2
[  3%] Built target poly2tri
[  3%] Building CXX object src/Lib/Geometry/CMakeFiles/Geometry.dir/line.cxx.o
In file included from /home/ben/terragear-cs/src/Lib/Geometry/rectangle.hxx:17,
                 from /home/ben/terragear-cs/src/Lib/Geometry/line.hxx:19,
                 from /home/ben/terragear-cs/src/Lib/Geometry/line.cxx:8:
/home/ben/terragear-cs/src/Lib/Polygon/polygon.hxx:62:17: error: gpc.h: No such file or directory
make[2]: *** [src/Lib/Geometry/CMakeFiles/Geometry.dir/line.cxx.o] Error 1
make[1]: *** [src/Lib/Geometry/CMakeFiles/Geometry.dir/all] Error 2
make: *** [all] Error 2
/home/ben
****************************************
************* TERRAGEAR GUI ************
****************************************
Initialized empty Git repository in /home/ben/terragear-gui/.git/
remote: Counting objects: 211, done.
remote: Compressing objects: 100% (209/209), done.
remote: Total 211 (delta 134), reused 0 (delta 0)
Receiving objects: 100% (211/211), 123.23 KiB, done.
Resolving deltas: 100% (134/134), done.
/home/ben
Error processing project file: ..



Can anyone point me in a direction which might resolve the problems ?

Cheers in advance.
btw
 
Posts: 63
Joined: Sun Nov 06, 2011 9:53 pm

Re: [Script] download_and_compile for TERRAGEAR-CS

Postby F-JJTH » Wed Jan 18, 2012 3:09 am

Hi,

First problem : It seems you haven't GDAL library, try to install it from Synaptic.
Second problem (gpc.h) : It seems that terragear can't find gpc.h with CMAKE_PREFIX_PATH thus I have fixed it by create a symbolic link from /usr/local/include/gpc.h to your installation repertory.

The fix (for the second problem) is in the new version of my script (version 0.6) : http://clement.delhamaide.free.fr/terra ... compile.sh
You just need to recompile GPC232 before recompile terragear then terragearGUI. To do that :
1 - delete your "gpc232", "terragear-cs" folder and "terragearGUI" directories (they seem to be in your /home/ben)
2 - compile GPC232 : sh terragear_download_and_compile.sh GPC
3 - compile TerraGear-cs : sh terragear_download_and_compile.sh TERRAGEAR
4 - compile TerraGearGUI : sh terragear_download_and_compile.sh TERRAGEARGUI

Let me know if the new version fix your problem ;)
Small tips : Why not create a folder named "fgfs-tools" in your /home/ben and put the script in this new folder in order to don't interfer with your personnal files present in your /home/ben ?

Cheers,
Clément
Last edited by F-JJTH on Thu Apr 10, 2014 8:58 am, edited 1 time in total.
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Next

Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests