User:Puffergas: Difference between revisions
No edit summary |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | ==Copy Path(s)== | ||
[[File:Copy Path(s).jpeg|thumb|150px|Easy way to copy the path of a file or folder.]] | |||
During the compiling process there will be times when the path of a file or folder is needed for a Terminal command. One easy GUI short cut is to right click on the file or folder to pull up an option list. Find the option 'Copy Path(s)' and click on it. The path of the file or folder will be copied. Next, in the Terminal, click on 'Edit' at the top of the Terminal window and then click on 'Paste' in order to past the link into the Terminal. See the screen shot to the left. | |||
===Location of Files=== | |||
The SD card performs well for common computer tasks and running FlightGear. However, compiling large programs could wear out the SD card before it's time. This is an excellent application for a SSD drive. Especially if many compiled versions of FlightGear are planned. For that reason this Wiki will choose to compile and install FlightGear on a [[Howto:Build_and_run_FlightGear_on_Raspberry_Pi_4#Hard_Drives|SSD drive]]. | |||
<syntaxhighlight lang=" | This is a good time to create some needed folders on the SSD. For this Wiki the folder '''FlightGear''' was created in the root of the SSD. Within this newly created folder '''FlightGear''', create two more folders named '''fg-install''' and '''source'''. Use your favorite method to navigate and create folders, whether it be the Terminal or GUI. Furthuremore, these files can have other names as long as those other names are globally used. | ||
< | |||
===Build Order=== | |||
wkitty42 wrote: | |||
"The [[Scripted Compilation on Linux Debian/Ubuntu|download_and_compile.sh]] builds in this order: | |||
</ | PLIB, OSG, SimGear, FlightGear | ||
--> | |||
It updates fgdata between the building of SimGear and FlightGear so that the translations | |||
tool can be handled properly..." | |||
===Patching; OSG patch example=== | |||
There could come a time when the source needs to be patched before compiling. In this case the <code>patch</code> command can be used along with it's argument <code>-p</code>. For example; the OpenSceneGraph-3.4.0 requires the '0007-Explicit-signed-char-type-for-portability-base64.patch' patch, in order for it to compile for the ARM architecture. | |||
In this example, the patch can be found at this link: [https://sources.debian.org/patches/openscenegraph-3.4/3.4.1+dfsg1-5/ OpenSceneGraph-3-4-0 patch]. The <code>download</code> link for '0007-Explicit-signed-char-type-for-portability-base64.patch' is what we are looking for. This file can be downloaded with the <code>wget</code> command as seen below: | |||
<syntaxhighlight>wget --trust-server-names https://sources.debian.org/src/openscenegraph-3.4/3.4.1+dfsg1-5/src/osgPlugins/osgjs/Base64.cpp/</syntaxhighlight> | |||
Place, the above patch file, into the the source root folder of OpenSceneGraph-3-4-0. | |||
The argument ,<code>-p</code> adjusts the path of the patch. Below is an example of a snippet from a patch. Reference the line ,<code>--- openscenegraph-3.4.orig/src/osgDB/ConvertBase64.cpp</code>. The folder <code>openscenegraph-3.4.orig/</code> can not be used, in our example. In this case, one of the path folders need to be ignored, hence <code>-p1</code>. If two path folders needed to be ignored; <code>-p2</code>. | |||
<syntaxhighlight>Index: openscenegraph-3.4/src/osgDB/ConvertBase64.cpp | |||
=================================================================== | |||
--- openscenegraph-3.4.orig/src/osgDB/ConvertBase64.cpp | |||
+++ openscenegraph-3.4/src/osgDB/ConvertBase64.cpp | |||
@@ -28,7 +28,7 @@ namespace osgDB | |||
int base64_decode_value(char value_in) | |||
{ | |||
- static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}; | |||
+ static const signed char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51}; | |||
static const char decoding_size = sizeof(decoding); | |||
value_in -= 43; | |||
if (value_in < 0 || value_in > decoding_size) return -1;</syntaxhighlight> | |||
Navigate the terminal into the root folder of OpenSceneGraph-3.4.0 source. Side note: the <code>patch</code> command might need to be installed. Now enter the below command into the terminal: | |||
<syntaxhighlight>patch -p1 <0007-Explicit-signed-char-type-for-portability-base64.patch</syntaxhighlight> | |||
===PLIB=== | |||
{| class="wikitable" | |||
! scope="col" width="700" | Compilation algorithm for [[PLIB]]. | |||
! scope="col" width="400" | Directory tree structure | |||
|- | |||
| | |||
# Navigate the Terminal into the '''source''' folder. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">git clone git://git.code.sf.net/p/libplib/code libplib.git</syntaxhighlight> | |||
#** This will copy the needed source files into this folder '''source'''. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">cd libplib.git</syntaxhighlight> | |||
#** This will navigate the Terminal into the folder '''libplib.git''' that was created and populated by the <code>git</code> command. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">echo "1.8.6" > version</syntaxhighlight> | |||
#**This will edit the file 'version' that is in this folder. This file can also be modified with a text editor, even via a GUI. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">sed s/PLIB_TINY_VERSION\ \ 5/PLIB_TINY_VERSION\ \ 6/ -i src/util/ul.h</syntaxhighlight> | |||
#** This is some complicated version editing. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">git commit --all --message "Increase tiny version to 6."</syntaxhighlight> | |||
#** More version patching stuff. | |||
# Create a folder named '''build-plib''' and have it placed in the '''source''' folder. | |||
#* The <code>mkdir</code> command or a GUI method can be used to create this folder. | |||
#* In other words; '''FlightGear/source/build-plib''' | |||
# Navigate the Terminal into the '''build-plib''' folder that was just created. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">cmake -D CMAKE_INSTALL_PREFIX:PATH=fg-install libplib.git</syntaxhighlight> | |||
#** The two folders '''fg-install''' and '''libplib.git''' need to be replaced with the relative or absolute address of these folders. Use your favorite method. | |||
#** The absolute address can easily be copied and pasted with the above [[Howto:Build_and_run_FlightGear_on_Raspberry_Pi_4#Copy_Path(s)|Copy Path(s)]] method. This could be a large string, however the Terminal doesn't mind. | |||
#* This will setup the build. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">make -j3</syntaxhighlight> | |||
#** This will perform the compiling. | |||
#** The <code>-j3</code> argument will allow three of the Pi's cores to participate in the compilation. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">make install</syntaxhighlight> | |||
#** PLIB will be installed into the '''fg-install''' folder. | |||
| | |||
<pre> | |||
Storage Device | |||
| | |||
| | |||
|----FlightGear | |||
| | | |||
| | | |||
| |----fg-install | |||
| | | |||
| | | |||
| | | |||
| |----source | |||
| | | [1] [2] | |||
| | | | |||
| | | | |||
| | |----build-plib | |||
| | | [8] [9] [10] [11] | |||
| | | | |||
| | | | |||
| | |----libplib.git | |||
| | | [3] [4] [5] [6] | |||
| | | [7] | |||
| | | | |||
| | | |||
| | |||
</pre> | |||
|} | |||
===OSG=== | |||
{| class="wikitable" | |||
! scope="col" width="700" | Compilation algorithm for [[OSG]]. | |||
! scope="col" width="400" | Directory tree structure | |||
|- | |||
| | |||
{{not done}} | |||
# Navigate the Terminal into the '''source''' folder. | |||
# Enter the below command into the Terminal: | |||
#* <syntaxhighlight lang="bash">git clone --branch OpenSceneGraph-3.4.0 https://github.com/openscenegraph/OpenSceneGraph.git</syntaxhighlight> | |||
#** The above is one line. | |||
# Patch OSG 3.4 with [[Howto:Build_and_run_FlightGear_on_Raspberry_Pi_4#Patching|with the above steps]]. | |||
{{not done}} | |||
| | |||
<pre> | |||
Storage Device | |||
| | |||
| | |||
|----FlightGear | |||
| | | |||
| | | |||
| |----fg-install | |||
| | | |||
| | | |||
| | | |||
| |----source | |||
| | | [1] [2] | |||
| | | | |||
| | | | |||
| | |----OpenSceneGraph | |||
| | | [3] | |||
| | | | |||
| | | | |||
| | |---- | |||
| | | | |||
| | | | |||
| | | | |||
| | | |||
| | |||
</pre> | |||
{{not done}} | |||
|} | |||
===OpenRTI=== | |||
James wrote: | |||
"[[FlightGear high-level architecture support | OpenRTI]] is optional. If you're using it, you need to compile it before SimGear (and therefore, before FlightGear). It's orthogonal to OSG. | |||
===SimGear=== | |||
{| class="wikitable" | |||
! scope="col" width="700" | Compilation algorithm for [[SimGear]]. | |||
! scope="col" width="400" | Directory tree structure | |||
|- | |||
| | |||
# {{not done}} | |||
#* {{not done}} | |||
| | |||
<pre> | |||
Storage Device | |||
| | |||
| | |||
|----FlightGear | |||
| | | |||
| | | |||
| |----fg-install | |||
| | | |||
| | | |||
| | | |||
| |----source | |||
| | | | |||
| | | | |||
| | | | |||
| | |----build-plib | |||
| | | | |||
| | | | |||
| | | | |||
| | |----libplib.git | |||
| | | | |||
| | | | |||
| | | | |||
| | | |||
| | |||
</pre> | |||
{{not done}} | |||
|} | |||
===FlightGear=== | |||
{| class="wikitable" | |||
! scope="col" width="700" | Compilation algorithm for FlightGear. | |||
! scope="col" width="400" | Directory tree structure | |||
|- | |||
| | |||
# {{not done}} | |||
#* {{not done}} | |||
| | |||
<pre> | |||
Storage Device | |||
| | |||
| | |||
|----FlightGear | |||
| | | |||
| | | |||
| |----fg-install | |||
| | | |||
| | | |||
| | | |||
| |----source | |||
| | | | |||
| | | | |||
| | | | |||
| | |----build-plib | |||
| | | | |||
| | | | |||
| | | | |||
| | |----libplib.git | |||
| | | | |||
| | | | |||
| | | | |||
| | | |||
| | |||
</pre> | |||
{{not done}} | |||
|} | |||
===FlightGear Data=== | |||
{| class="wikitable" | |||
! scope="col" width="700" | Install algorithm for FlightGear Data. | |||
! scope="col" width="400" | Directory tree structure | |||
|- | |||
| | |||
# {{not done}} | |||
#* {{not done}} | |||
| | |||
<pre> | |||
Storage Device | |||
| | |||
| | |||
|----FlightGear | |||
| | | |||
| | | |||
| |----fg-install | |||
| | | |||
| | | |||
| | | |||
| |----source | |||
| | | | |||
| | | | |||
| | | | |||
| | |----build-plib | |||
| | | | |||
| | | | |||
| | | | |||
| | |----libplib.git | |||
| | | | |||
| | | | |||
| | | | |||
| | | |||
| | |||
</pre> | |||
{{not done}} | |||
|} | |||
==Dependencies== | |||
Below is a list of dependencies (packages) that need to be installed before compiling. | |||
{| class="wikitable" | |||
|- | |||
! Package !! Version (ref. only, as of 03-28-2020) !! Notes | |||
|- | |||
| automake || || Needed for download_and_compile.sh, maybe more | |||
|- | |||
| cmake || 3.13.4-1 || | |||
|- | |||
| build-essential || || Needed for download_and_compile.sh, maybe more | |||
|- | |||
| g++ || 4:8.3.0-1+rpi2 || | |||
|- | |||
| git || 1:2.20.1-2+deb10u1 || Needs a user account at www.github.com | |||
|- | |||
| make || 4.2.1-1.2 || | |||
|- | |||
| sed || 4.7-1 || | |||
|- | |||
| freeglut3-dev || 2.8.1-3 || | |||
|- | |||
| libboost-dev || 1.67.0.1+b1 || | |||
|- | |||
| libcurl4-openssl-dev || 7.64.0-4+deb10u1 || OSG plugins | |||
|- | |||
| libdbus-1-dev || 1.12.16-1 || | |||
|- | |||
| libdbus-1-3 || || | |||
|- | |||
| libevent-dev || 2.1.8-stable-4 || | |||
|- | |||
| libfreetype6-dev || 2.9.1-3+deb10u1 || | |||
|- | |||
| libglew-dev || 2.1.0-4 || | |||
|- | |||
| libjpeg62-dev || || OSG plugin | |||
|- | |||
| libnvtt-dev || 2.0.8-1+dfsg-8.1+b3 || | |||
|- | |||
| libopenal-dev || 1:1.19.1-1 || | |||
|- | |||
|libopenscenegraph-3.4-dev || 3.4.1+dfsg1-5 || | |||
|- | |||
| libqt5opengl5-dev || 5.11.3+dfsg1-1+rpi1+deb10u3 || | |||
|- | |||
| libqt5svg5-dev || 5.11.3-2 || | |||
|- | |||
| librsvg2 || || OSG plugin, if needed | |||
|- | |||
| librsvg2-dev || || OSG plugin, if needed | |||
|- | |||
| libssl-dev || 1.1.1d-0+deb10u3+rpt1 || Needed if building Cmake | |||
|- | |||
| libxi-dev || 2:1.7.9-1 || | |||
|- | |||
| libxmu-dev || 2:1.1.2-2+b3 || | |||
|- | |||
| pkg-config || 0.29-6 || | |||
|- | |||
| qml-module-qtquick2 || 5.11.3-4 || | |||
|- | |||
| qml-module-qtquick-window2 || 5.11.3-4 || | |||
|- | |||
| qt5-default || 5.11.3+dfsg1-1+rpi1+deb10u3 || | |||
|- | |||
| qtbase5-private-dev || 5.11.3+dfsg1-1+rpi1+deb10u3 || | |||
|- | |||
| qtdeclarative5-private-dev || 5.11.3-4 || | |||
|- | |||
| qttools5-dev || 5.11.3-4 || | |||
|- | |||
| zlib1g-dev || 1:1.2.11.dfsg-1 || OSG plugin | |||
|} | |||
The command <code>dpkg -s package_name</code> can be used, in the terminal to verify if a package is installed. Replace 'package_name' with the name of the dependency from the above list. | |||
Before installing any missing dependencies, update Raspbian per the above [[Howto:Build_and_run_FlightGear_on_Raspberry_Pi_4#Update_Raspbian|Update Raspbian]] instructions. The below terminal command can be used to install any missing dependencies: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt-get install package_name | |||
</syntaxhighlight> | </syntaxhighlight> | ||
====git==== | |||
{| class="wikitable" | |||
|- | |||
! '''<big>♦♦♦ Warning ♦♦♦</big>''' | |||
|- | |||
| Edward wrote: | |||
<blockquote> | |||
Please only run 'git clone' once ever! That is once per machine, new | |||
install, etc. Otherwise SourceForge will permanently blacklist your IP | |||
address. The strain on their infrastructure with our huge repositories is | |||
far too much. | |||
</blockquote> | |||
|} | |||
When using some <code>git</code> commands you might be prompted by <code>git config --global user.email "you@example.com"</code> and or <code>git config --global user.name "Your Name"</code>. In that case a user account is needed at [http://www.github.com www.github.com]. So, before starting the compiling process it would be advisable to first go to their web page and create a free user account. After acquiring the user account, use the below commands (one at a time) in order to satisfy the above <code>git</code> requirement. Replace 'you@example.com' with your <code>git</code> account email address and also replace 'Your Name' with the user name for this account. It might be best to choose a user name without a space in it. | |||
<syntaxhighlight lang="bash"> | |||
git config --global user.email "you@example.com" | |||
git config --global user.name "Your Name" | |||
</syntaxhighlight> | |||
Link to <code>git</code> [https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration configuration and customization] information page. | |||
Florent wrote: | |||
<blockquote> | |||
I'm not knowledgeable about details of the RaspBerry PI build; what I can | |||
say regarding your message is: when you clone a Git repository with no | |||
special option such as <code>--bare</code>, some branch is initially checked out (often, | |||
this is 'master'). This means that only this particular branch is clearly | |||
visible in the directory where the repository has been cloned. Other | |||
branches may be present in hidden/machine form inside the .git subdirectory | |||
after you do <code>git fetch foo</code>, where foo is the name of a <s>branch</s>. | |||
Run <code>git branch -r</code> to see what branches are available remotely, then <code>git | |||
fetch foo</code> to retrieve the <s>branch</s> you are interested in (supposedly called | |||
'foo' here). This only happens in the .git subdirectory, but then <code>git | |||
checkout foo</code> should cause this branch to appear in the filesystem, | |||
replacing whatever was previously checked out in your clone of the upstream | |||
repository. In the case of the download_and_compile.sh script, | |||
OpenSceneGraph-3.4 is the name of the OSG branch currently used by the | |||
script (until a newer version is deemed preferable). Note that as a safety | |||
measure, you can't check out a different branch when there is “unfinished | |||
work” (things modified but not committed) on the currently checked-out | |||
branch. | |||
Hope this helps. Regards | |||
I have to correct something from my first reply in this thread: | |||
The argument passed to <code>git fetch</code> is not branch name (according to | |||
the manual, it's a <refspec>). The way I use this command is by | |||
passing a remote name, e.g. <code>git fetch origin</code> or 'git fetch | |||
upstream'. A “remote” is some place where the repository is hosted | |||
that is known to your clone (.git/config). Thus, your clone can fetch | |||
branches and commits from remotes. A remote can offer many branches. | |||
You can display info about known remotes with <code>git remove -v</code> from | |||
within your clone, but I believe this info essentially comes from the | |||
.git/config file. | |||
</blockquote> | |||
Essential git commands: | |||
* git status | |||
* git checkout | |||
* git pull | |||
** Can be used to update the fgmeta folder when using the download_and_compile.sh script. Use this command from within the fgmeta folder. | |||
* git reset --hard | |||
* git log | |||
** REVISION example '522c742419e028daf35e79f9c6097ffa34c9f536' (this revision number was found in the FlightGear menu and at flightgear/dnc-managed/build/flightgear/src/Include/build.h. Florent wrote: <blockquote> This is a recent FG commit. You can find it with: cd flightgear/dnc-managed/flightgear && git log. Then you can type /522c742419e028daf35e79f9c6097ffa34c9f536 to look for this string in the output (the search string is interpreted as a regular expression) in less, n for next occurrence, N for previous, q to quit (I'm assuming less is your $GIT_PAGER). Or more directly: git show 522c742419e028daf35e79f9c6097ffa34c9f53 in the same dir. Regards </blockquote> | |||
* git diff | |||
Also see [[FlightGear Git]]. |
Latest revision as of 19:21, 3 January 2021
Copy Path(s)
During the compiling process there will be times when the path of a file or folder is needed for a Terminal command. One easy GUI short cut is to right click on the file or folder to pull up an option list. Find the option 'Copy Path(s)' and click on it. The path of the file or folder will be copied. Next, in the Terminal, click on 'Edit' at the top of the Terminal window and then click on 'Paste' in order to past the link into the Terminal. See the screen shot to the left.
Location of Files
The SD card performs well for common computer tasks and running FlightGear. However, compiling large programs could wear out the SD card before it's time. This is an excellent application for a SSD drive. Especially if many compiled versions of FlightGear are planned. For that reason this Wiki will choose to compile and install FlightGear on a SSD drive.
This is a good time to create some needed folders on the SSD. For this Wiki the folder FlightGear was created in the root of the SSD. Within this newly created folder FlightGear, create two more folders named fg-install and source. Use your favorite method to navigate and create folders, whether it be the Terminal or GUI. Furthuremore, these files can have other names as long as those other names are globally used.
Build Order
wkitty42 wrote:
"The download_and_compile.sh builds in this order:
PLIB, OSG, SimGear, FlightGear
It updates fgdata between the building of SimGear and FlightGear so that the translations tool can be handled properly..."
Patching; OSG patch example
There could come a time when the source needs to be patched before compiling. In this case the patch
command can be used along with it's argument -p
. For example; the OpenSceneGraph-3.4.0 requires the '0007-Explicit-signed-char-type-for-portability-base64.patch' patch, in order for it to compile for the ARM architecture.
In this example, the patch can be found at this link: OpenSceneGraph-3-4-0 patch. The download
link for '0007-Explicit-signed-char-type-for-portability-base64.patch' is what we are looking for. This file can be downloaded with the wget
command as seen below:
wget --trust-server-names https://sources.debian.org/src/openscenegraph-3.4/3.4.1+dfsg1-5/src/osgPlugins/osgjs/Base64.cpp/
Place, the above patch file, into the the source root folder of OpenSceneGraph-3-4-0.
The argument ,-p
adjusts the path of the patch. Below is an example of a snippet from a patch. Reference the line ,--- openscenegraph-3.4.orig/src/osgDB/ConvertBase64.cpp
. The folder openscenegraph-3.4.orig/
can not be used, in our example. In this case, one of the path folders need to be ignored, hence -p1
. If two path folders needed to be ignored; -p2
.
Index: openscenegraph-3.4/src/osgDB/ConvertBase64.cpp
===================================================================
--- openscenegraph-3.4.orig/src/osgDB/ConvertBase64.cpp
+++ openscenegraph-3.4/src/osgDB/ConvertBase64.cpp
@@ -28,7 +28,7 @@ namespace osgDB
int base64_decode_value(char value_in)
{
- static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
+ static const signed char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
static const char decoding_size = sizeof(decoding);
value_in -= 43;
if (value_in < 0 || value_in > decoding_size) return -1;
Navigate the terminal into the root folder of OpenSceneGraph-3.4.0 source. Side note: the patch
command might need to be installed. Now enter the below command into the terminal:
patch -p1 <0007-Explicit-signed-char-type-for-portability-base64.patch
PLIB
Compilation algorithm for PLIB. | Directory tree structure |
---|---|
|
Storage Device | | |----FlightGear | | | | | |----fg-install | | | | | | | |----source | | | [1] [2] | | | | | | | | |----build-plib | | | [8] [9] [10] [11] | | | | | | | | |----libplib.git | | | [3] [4] [5] [6] | | | [7] | | | | | | |
OSG
Compilation algorithm for OSG. | Directory tree structure |
---|---|
|
Storage Device | | |----FlightGear | | | | | |----fg-install | | | | | | | |----source | | | [1] [2] | | | | | | | | |----OpenSceneGraph | | | [3] | | | | | | | | |---- | | | | | | | | | | | | |
OpenRTI
James wrote: " OpenRTI is optional. If you're using it, you need to compile it before SimGear (and therefore, before FlightGear). It's orthogonal to OSG.
SimGear
Compilation algorithm for SimGear. | Directory tree structure |
---|---|
|
Storage Device | | |----FlightGear | | | | | |----fg-install | | | | | | | |----source | | | | | | | | | | | |----build-plib | | | | | | | | | | | |----libplib.git | | | | | | | | | | | | |
FlightGear
Compilation algorithm for FlightGear. | Directory tree structure |
---|---|
|
Storage Device | | |----FlightGear | | | | | |----fg-install | | | | | | | |----source | | | | | | | | | | | |----build-plib | | | | | | | | | | | |----libplib.git | | | | | | | | | | | | |
FlightGear Data
Install algorithm for FlightGear Data. | Directory tree structure |
---|---|
|
Storage Device | | |----FlightGear | | | | | |----fg-install | | | | | | | |----source | | | | | | | | | | | |----build-plib | | | | | | | | | | | |----libplib.git | | | | | | | | | | | | |
Dependencies
Below is a list of dependencies (packages) that need to be installed before compiling.
Package | Version (ref. only, as of 03-28-2020) | Notes |
---|---|---|
automake | Needed for download_and_compile.sh, maybe more | |
cmake | 3.13.4-1 | |
build-essential | Needed for download_and_compile.sh, maybe more | |
g++ | 4:8.3.0-1+rpi2 | |
git | 1:2.20.1-2+deb10u1 | Needs a user account at www.github.com |
make | 4.2.1-1.2 | |
sed | 4.7-1 | |
freeglut3-dev | 2.8.1-3 | |
libboost-dev | 1.67.0.1+b1 | |
libcurl4-openssl-dev | 7.64.0-4+deb10u1 | OSG plugins |
libdbus-1-dev | 1.12.16-1 | |
libdbus-1-3 | ||
libevent-dev | 2.1.8-stable-4 | |
libfreetype6-dev | 2.9.1-3+deb10u1 | |
libglew-dev | 2.1.0-4 | |
libjpeg62-dev | OSG plugin | |
libnvtt-dev | 2.0.8-1+dfsg-8.1+b3 | |
libopenal-dev | 1:1.19.1-1 | |
libopenscenegraph-3.4-dev | 3.4.1+dfsg1-5 | |
libqt5opengl5-dev | 5.11.3+dfsg1-1+rpi1+deb10u3 | |
libqt5svg5-dev | 5.11.3-2 | |
librsvg2 | OSG plugin, if needed | |
librsvg2-dev | OSG plugin, if needed | |
libssl-dev | 1.1.1d-0+deb10u3+rpt1 | Needed if building Cmake |
libxi-dev | 2:1.7.9-1 | |
libxmu-dev | 2:1.1.2-2+b3 | |
pkg-config | 0.29-6 | |
qml-module-qtquick2 | 5.11.3-4 | |
qml-module-qtquick-window2 | 5.11.3-4 | |
qt5-default | 5.11.3+dfsg1-1+rpi1+deb10u3 | |
qtbase5-private-dev | 5.11.3+dfsg1-1+rpi1+deb10u3 | |
qtdeclarative5-private-dev | 5.11.3-4 | |
qttools5-dev | 5.11.3-4 | |
zlib1g-dev | 1:1.2.11.dfsg-1 | OSG plugin |
The command dpkg -s package_name
can be used, in the terminal to verify if a package is installed. Replace 'package_name' with the name of the dependency from the above list.
Before installing any missing dependencies, update Raspbian per the above Update Raspbian instructions. The below terminal command can be used to install any missing dependencies:
sudo apt-get install package_name
git
♦♦♦ Warning ♦♦♦ |
---|
Edward wrote:
|
When using some git
commands you might be prompted by git config --global user.email "you@example.com"
and or git config --global user.name "Your Name"
. In that case a user account is needed at www.github.com. So, before starting the compiling process it would be advisable to first go to their web page and create a free user account. After acquiring the user account, use the below commands (one at a time) in order to satisfy the above git
requirement. Replace 'you@example.com' with your git
account email address and also replace 'Your Name' with the user name for this account. It might be best to choose a user name without a space in it.
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Link to git
configuration and customization information page.
Florent wrote:
I'm not knowledgeable about details of the RaspBerry PI build; what I can say regarding your message is: when you clone a Git repository with no special option such as
--bare
, some branch is initially checked out (often, this is 'master'). This means that only this particular branch is clearly visible in the directory where the repository has been cloned. Other branches may be present in hidden/machine form inside the .git subdirectory after you dogit fetch foo
, where foo is the name of abranch.Run
git branch -r
to see what branches are available remotely, thengit fetch foo
to retrieve thebranchyou are interested in (supposedly called 'foo' here). This only happens in the .git subdirectory, but thengit checkout foo
should cause this branch to appear in the filesystem, replacing whatever was previously checked out in your clone of the upstream repository. In the case of the download_and_compile.sh script, OpenSceneGraph-3.4 is the name of the OSG branch currently used by the script (until a newer version is deemed preferable). Note that as a safety measure, you can't check out a different branch when there is “unfinished work” (things modified but not committed) on the currently checked-out branch.Hope this helps. Regards
I have to correct something from my first reply in this thread:
The argument passed to
git fetch
is not branch name (according to the manual, it's a <refspec>). The way I use this command is by passing a remote name, e.g.git fetch origin
or 'git fetch upstream'. A “remote” is some place where the repository is hosted that is known to your clone (.git/config). Thus, your clone can fetch branches and commits from remotes. A remote can offer many branches. You can display info about known remotes withgit remove -v
from within your clone, but I believe this info essentially comes from the .git/config file.
Essential git commands:
- git status
- git checkout
- git pull
- Can be used to update the fgmeta folder when using the download_and_compile.sh script. Use this command from within the fgmeta folder.
- git reset --hard
- git log
- REVISION example '522c742419e028daf35e79f9c6097ffa34c9f536' (this revision number was found in the FlightGear menu and at flightgear/dnc-managed/build/flightgear/src/Include/build.h. Florent wrote:
This is a recent FG commit. You can find it with: cd flightgear/dnc-managed/flightgear && git log. Then you can type /522c742419e028daf35e79f9c6097ffa34c9f536 to look for this string in the output (the search string is interpreted as a regular expression) in less, n for next occurrence, N for previous, q to quit (I'm assuming less is your $GIT_PAGER). Or more directly: git show 522c742419e028daf35e79f9c6097ffa34c9f53 in the same dir. Regards
- REVISION example '522c742419e028daf35e79f9c6097ffa34c9f536' (this revision number was found in the FlightGear menu and at flightgear/dnc-managed/build/flightgear/src/Include/build.h. Florent wrote:
- git diff
Also see FlightGear Git.