Board index FlightGear Support Compiling

Problem "make install" terragear on UNBUNTU 15.04 FGFS 3.4

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

Problem "make install" terragear on UNBUNTU 15.04 FGFS 3.4

Postby jomo » Sat Sep 12, 2015 9:14 am

I had terragear running on earlier systems - but do get now problems when running "make install" terragear. See:
Code: Select all
[ 50%] Built target terrafit
[ 51%] Building CXX object src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o
/home/emmerich/D_E_S_I_G_N/terragear/src/Prep/OGRDecode/ogr-decode.cxx: In function ‘int main(int, char**)’:
/home/emmerich/D_E_S_I_G_N/terragear/src/Prep/OGRDecode/ogr-decode.cxx:667:29: error: ‘class GDALDataset’ has no member named ‘GetLayerByName’
             poLayer = poDS->GetLayerByName( argv[i] );
                             ^
/home/emmerich/D_E_S_I_G_N/terragear/src/Prep/OGRDecode/ogr-decode.cxx:677:30: error: ‘class GDALDataset’ has no member named ‘GetLayerCount’
         for (int i=0;i<poDS->GetLayerCount();i++) {
                              ^
/home/emmerich/D_E_S_I_G_N/terragear/src/Prep/OGRDecode/ogr-decode.cxx:678:29: error: ‘class GDALDataset’ has no member named ‘GetLayer’
             poLayer = poDS->GetLayer(i);
                             ^
src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/build.make:54: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o' failed
make[2]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o] Error 1
CMakeFiles/Makefile2:549: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all' failed
make[1]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

I have double-checked in Synaptic for GDAL - but they are all installed.

Does anybody have an idea?
Or do I have to wait for FGFS 3.6?
thx for any idea
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 987
Joined: Thu Feb 12, 2009 6:46 pm
Location: Mainz, Germany
Callsign: jomo jomoATC
OS: UBUNTU 18.4

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby FlugHund » Sat Sep 12, 2015 11:38 am

Oy Jomo,

according to FG-devel ML use the scenery/ws2.0 branch since master is in heavy development and erroneous atm. (devel-ML on Aug. 31st)
User avatar
FlugHund
 
Posts: 550
Joined: Thu Mar 01, 2007 3:27 pm
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby jomo » Sun Sep 13, 2015 8:40 am

Hi
I am not sure we talk about the same thing: My FlightGear and TerraSync and Scenery is working fine.
But I wanted to try some changes and thus need TerraGear to generate and maybe distribute changes as an advance fix - that I had running before - but without TerraGear that is a hard (unnecessary) job to copy.
anyhow: thanks for caring
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 987
Joined: Thu Feb 12, 2009 6:46 pm
Location: Mainz, Germany
Callsign: jomo jomoATC
OS: UBUNTU 18.4

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby FlugHund » Sun Sep 13, 2015 2:34 pm

Oy jomo,

yes, we're talking about the same thing.

Here the steps: Clone the terragear git repo which, so I assume, you've already done:
Code: Select all
git clone git://git.code.sf.net/p/flightgear/terragear


Then cd into it:
Code: Select all
cd terrargear


Switch to branch scenery/ws2.0
Code: Select all
git checkout scenery/ws2.0


Now compile using that state of the source code. If you're using a script to compile terragear I don't know how to achive that, maybe by altering the script or, if you're lucky, it has an option to select a specified branch.

HTH
Alex

Edit: oops, my bad
User avatar
FlugHund
 
Posts: 550
Joined: Thu Mar 01, 2007 3:27 pm
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby jomo » Mon Sep 14, 2015 9:38 am

FlugHund wrote in Sun Sep 13, 2015 2:34 pm:Now compile using that state of the source code. If you're using a script to compile terragear I don't know how to achive that, maybe by altering the script or, if you're lucky, it has an option to select a specified branch.

Thanks for the ideas.
So this time I used exactly that "git clone" + "git checkout" from you
and then "cmake" + "make install"

====> exactly the same error:
Code: Select all
src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/build.make:54: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o' failed
make[2]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o] Error 1
CMakeFiles/Makefile2:546: recipe for target 'src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all' failed
make[1]: *** [src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

What I noticed over the weekend:
In the first line it seems to look for: "src/Prep/OGRDecode/CMakeFiles/ogr-decode.dir/ogr-decode.cxx.o"
but there is no such thing - actually the "ogr-decode.cxx" is located in "src/Prep/OGRDecode/ogr-decode.cxx"
without the "CMakeFiles"

I did not yet find where that wrong setup is happening - I am not really involved in these modern programming-techniques :roll:

May be there is someone who can find out where that bug is happening! Must bee in some of those scripts.

thx for your support
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 987
Joined: Thu Feb 12, 2009 6:46 pm
Location: Mainz, Germany
Callsign: jomo jomoATC
OS: UBUNTU 18.4

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby ludomotico » Mon Sep 14, 2015 10:05 am

jomo wrote in Mon Sep 14, 2015 9:38 am:So this time I used exactly that "git clone" + "git checkout" from you
and then "cmake" + "make install"


Since you have checked out a new branch, a "make clean" before and after the "cmake" is a good idea. Also, running "cmake" in the main directory and running "make install" directly are not good ideas. After the git clone and git checkout you have already done and don't need to do again, my piece of advice is building the tools like this:

Code: Select all
(inside the terragear directory)
mkdir build
cd build
cmake ..
(if there wasn't any error)
make
(if there wasn't any error)
sudo make install


This way, you compile in a separated directory named "build", and you only have to remove this directory to clean the project in the future. Also, this way you "make" the tools as a normal user (recommended for security reasons) and only "sudo make install" as the superuser if there wasn't any error during the building process.

This is not limited to terragear: building any application in Linux like this is a good idea: "mkdir build; cd build; cmake ..; make; sudo make install"
User avatar
ludomotico
 
Posts: 1130
Joined: Tue Apr 24, 2012 1:01 pm
Version: nightly
OS: Windows 10

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby hamzaalloush » Mon Sep 14, 2015 1:26 pm

some good soul will provide you with a binary with you wish, i just want to know what kind of shared libraries does Terragear need to compile, i can compile Terragear successfully on Ubuntu, will you want to try out my files? I'm on 14.04.2 btw, let me know if you want to test the binaries.

edit: i have the same problem, with exact error, looks like something has changed from before,

this is particularly interesting:

Code: Select all
terragear/src/Prep/OGRDecode/ogr-decode.cxx:678:29: error: ‘class GDALDataset’ has no member named ‘GetLayer’


maybe the current libgdal-dev package does not have this member, so the current package in the repository is out-dated to compile Terragear from scenery/ws2.0 branch, because the latest commit in that branch is:

Code: Select all
commit 227cdeab42aad98b703e8c93156e6e524cf8e818
Author: Christian Schmitt <chris@ilovelinux.de>
Date:   Thu Jul 16 21:05:37 2015 +0200

    Bump minimum GDAL version to 2.0.0. Adapt code to API changes for now.
    Porting of OGR to GDAL classes can happen later.


maybe we still have GDAL 1.9 in Ubuntu repositories?

i could not find this member from the GDAL 1.9 documentaion of the GDALDataset Class, at: http://www.hpc.wm.edu/SciClone/documentation/software/geo/gdal-1.9.0/html/classGDALDataset.html

while the class in GDAL 2.0 includes GetLayer, check here: http://www.gdal.org/classGDALDataset.html

so maybe we have to get it from backports, or download the GDAL 2.0 source directly and use that.
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby hamzaalloush » Mon Sep 14, 2015 2:31 pm

ok, turns out it's Terragear moving to require GDAL 2.0 for that branch, while we are still stuck on 1.x i believe in Ubuntu.

so, you'd have to revert to this commit in the source of Terragear with this command, and then build Terragear:

Code: Select all
git reset --hard 082ee9b82f15c8067183925a2ce48da817fa3748


you can read about this from the mailing list here: http://article.gmane.org/gmane.games.flightgear.devel/78855

i just built Terragear successfully after this!

this could be done easily with the download_and_compile.sh script, but you have to first download the source and modify it before building. start with:

1.
Code: Select all
./download_and_compile.sh -c n -r n TERRAGEAR


2.
Code: Select all
cd terragear && git reset --hard 082ee9b82f15c8067183925a2ce48da817fa3748 && cd ..


3.
Code: Select all
./download_and_compile.sh TERRAGEAR
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby jomo » Mon Sep 14, 2015 6:14 pm

Thank you guys for your support -- BUT: I still could not convince TERRAGEAR to install. I even tried it on an old PC with the same Basic Installation as my working one - but on that I did not "fool around" that much - but also there I got the same error indication.

So right now I will give up on that - till the "new scenery" + "GDAL2" is available! Till then I will now concentrate just on "signs" and for that I will just bypass Terragear and work more manually!

Just to comment your last suggestions:
hamzaalloush wrote in Mon Sep 14, 2015 2:31 pm:
Code: Select all
./download_and_compile.sh -c n -r n TERRAGEAR
cd terragear && git reset --hard 082ee9b82f15c8067183925a2ce48da817fa3748 && cd ..
./download_and_compile.sh TERRAGEAR

did not help - same error indication. I also tried to update GDAL (it actually is/was 1.11.2) - but no luck.
I even tried to install older/newer GDALversions (see https://trac.osgeo.org/gdal/wiki/DownloadSource) --> no luck!

Flughund wrote:
Code: Select all
git checkout scenery/ws2.0

The "download_and_compile.sh" does check for that - and found it.

So again: Thanks for trying - I will wait some time till new releases are available.
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 987
Joined: Thu Feb 12, 2009 6:46 pm
Location: Mainz, Germany
Callsign: jomo jomoATC
OS: UBUNTU 18.4

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby elgaton » Mon Sep 14, 2015 6:32 pm

download_and_compile.sh always performs a "git pull" before compiling the code, hence it "resets" the effect of the "git reset" command. Try opening download_and_compile.sh with a text editor, adding the
Code: Select all
git reset --hard 082ee9b82f15c8067183925a2ce48da817fa3748

under the "_gitUpdate scenery/ws2.0" line and recompiling.

Should you still have problems compiling it, I'm willing to generate the scenery (however, I'm on a slow connection and don't have much free time at the moment, so I think a build could initially take a few days).
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: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby jomo » Mon Sep 14, 2015 8:54 pm

Hallelujah that
elgaton wrote in Mon Sep 14, 2015 6:32 pm:download_and_compile.sh always performs a "git pull" before compiling the code, hence it "resets" the effect of the "git reset" command. Try opening download_and_compile.sh with a text editor, adding the
Code: Select all
git reset --hard 082ee9b82f15c8067183925a2ce48da817fa3748

under the "_gitUpdate scenery/ws2.0" line and recompiling.

made it. TerraGear and TerraGUI did start !!!!!

Thousand thanks to All of you:
I will have a wonderful day tomorrow playing with all those Goodies!
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 987
Joined: Thu Feb 12, 2009 6:46 pm
Location: Mainz, Germany
Callsign: jomo jomoATC
OS: UBUNTU 18.4

Re: Problem "make install" terragear on UNBUNTU 15.04 FGFS 3

Postby hamzaalloush » Mon Sep 14, 2015 9:08 pm

congrats!!! enjoy TG, bring the goodness :D
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest