Building terragear

Need help getting your computer to behave? Need help installing or running FG? Need help compiling? This is your first place to start!
User avatar
swamp
Posts: 192
Joined: Sun Jan 10, 2016 1:55 am

Re: Building terragear

Postby swamp » Wed May 11, 2016 9:27 pm

Correction. SHM was right but there were more problems with dependencies in Mint. I got tired of them not updating libraries in repos so I moved to Ubuntu 16.04. No problems installing CDAL 2.0 no telling the packages are broken etc. I think the cmake issue now is just a matter of me to typing in the right command. I will be on mumble in about 10 minutes.

User avatar
swamp
Posts: 192
Joined: Sun Jan 10, 2016 1:55 am

Re: Building terragear

Postby swamp » Wed May 11, 2016 9:45 pm

IAHM-COL wrote:Then that's good :S

the answer of your compiler comes to a surprise to me so far.
but try this

change

Code: Select all

cmake [parameters...]


for

Code: Select all

/usr/bin/cmake [parameters..]


And see if the response is the same


You are talking to an ignorant one today. What [parameters] ?

User avatar
SHM
Posts: 1960
Joined: Mon Sep 14, 2015 3:32 pm
Location: India

Re: Building terragear

Postby SHM » Wed May 11, 2016 9:49 pm

-D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS_RELEASE="-O3 -pipe" -D CMAKE_C_FLAGS_RELEASE="-O3 -pipe" -D CMAKE_INSTALL_PREFIX:PATH=/usr/share ../terragear
FG Pilot (2011-2018)
Prepar3d (2015 - 2023)
MSFS2020 (2020 - )
Image

User avatar
swamp
Posts: 192
Joined: Sun Jan 10, 2016 1:55 am

Re: Building terragear

Postby swamp » Wed May 11, 2016 9:50 pm

Image

See I do have cmake.

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: Building terragear

Postby IAHM-COL » Wed May 11, 2016 9:56 pm

that's great

I dont use gui, but something I am about to add confusion to you is, I recommend
1. Build the release/ws2.0 from the git
2. Build outside the source
3. choose any library path on the cmake command below that suits your OS installation (ie it is on LD_LIBRARY_PATH or you intend to add it)

http://www.thejabberwocky.net/viewtopic ... t=50#p7972
IAHM-COL wrote:

Code: Select all

Disclaimer. All commands below are safe, except last one. It is not inherently unsafe, but you are changing your terragear binaries anyway. In linux, everything you ran "sudo" or need to, it means you are applying somehow some sort of brute force.
I think this is what you inted, so go at it :D


Just do as follow

download terragear from sourceforce:
[anywhere in your drive, but I suggest you use /home/shm/sources]

Code: Select all

git clone git://git.code.sf.net/p/flightgear/terragear terragear


then enter terragear, you will need to change to the proper operative branch (master is /was broken) and anyways what you build with master no longer patches well scenery 2.0

Code: Select all

cd terragear
git checkout -t origin scenery/ws2.0


Then do the editions indicated in your post within that source you got there. (so you will compile your changes)

now. create and switch to a building directory outside the sources.

Code: Select all

mkdir ../terragear.builld
cd ../terragear.build


Building outside the sources is the safest way, and allows you to just remove the build directory and have a go at it again, if needed.

Then run this long command to configure the compilation. The Prefix indicated here is the same prefix I used to install terragear in your system, so keep it, or you end up with 2 terragears, and make it difficult for you to execute one or the other

Code: Select all

cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS_RELEASE="-O3 -pipe" -D CMAKE_C_FLAGS_RELEASE="-O3 -pipe" -D CMAKE_INSTALL_PREFIX:PATH=/usr/share ../terragear

All above is on single line!

after that thing finishes, run

Code: Select all

make -j 4


and finally when that finishes, run

Code: Select all

sudo make install


And then you had patched your terragear binaries.

IH-COL
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: Building terragear

Postby IAHM-COL » Wed May 11, 2016 11:42 pm

swamp wrote:Image

See I do have cmake.


That looks quite interesting actually. I never used the gui for cmake. A few notes

Image


1. the source code NEEDS to be the correct branch of the git repository, it is scenery/ws2.0. Currently branch master did not compiled for me succesful, and last time it did, it had big problems with scenery being created right, and/or compatibility issues with ws2.0 (terrasync scenery). Apparently psadro has reworked much of the engine, partly attempting at a more stable state in terms of patching. So, really, make sure you are building the correct terrasync, which again is in the git repo, but It is NOT the master branch

2. Where to build. Do not make it the same place as the sources. Build on another directory. I use ../terragear.build but it is up to you.

3.Can you change the first parameter line that says CMAKE_BUILD_TYPE value cxx, for CMAKE_BUILD_TYPE value "Release". I don't think there is such cxx build type, and thus I am starting to believe this is the source of your problem

Good luck
IH-COL
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
swamp
Posts: 192
Joined: Sun Jan 10, 2016 1:55 am

Re: Building terragear

Postby swamp » Thu May 12, 2016 12:25 am

steve@knucklehead:~/terragear$ git checkout -t origin scenery/ws2.0
fatal: Missing branch name; try -b
steve@knucklehead:~/terragear$

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: Building terragear

Postby IAHM-COL » Thu May 12, 2016 12:29 am

Code: Select all

git fetch origin
git branch -a
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
swamp
Posts: 192
Joined: Sun Jan 10, 2016 1:55 am

Re: Building terragear

Postby swamp » Thu May 12, 2016 12:31 am

steve@knucklehead:~/terragear.build$ cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS_RELEASE="-O3 -pipe" -D CMAKE_C_FLAGS_RELEASE="-O3 -pipe" -D CMAKE_INSTALL_PREFIX:PATH=/usr/share ../terragear

-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is unknown
-- 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
CMake Error at CMakeLists.txt:9 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/home/steve/terragear.build/CMakeFiles/CMakeOutput.log".
See also "/home/steve/terragear.build/CMakeFiles/CMakeError.log".

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: Building terragear

Postby IAHM-COL » Thu May 12, 2016 12:40 am

your computer truly is a knuclehead. :S
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 4 guests