I had some trouble compiling FGCOM on my machine and which tag/branch/trunk I should compile. Here I would like to share my experiences with you and to save you a lot time.
First of all, I cannot give you support for FGCOM. I am not a C++ hacker, so please understand me. But I did fix some parts in FGCOM where you might not know how to continue. I have a Debian Unstable (sqeeze/sid at the moment of creating this document) with GCC 4.3.4 (works great for compiling FGFS, FGCOM!). So you might check first, which compiler you have.
Then I have found out, you need some extra packages and my fix for a successfull compilation of FGCOM. But wait! Which one now? The trunk is in bad shape (revision 226). So I took the branch fgcom3 here. But before you can begin, you need to check-out the repository:
svn co https://appfgcom.svn.sourceforge.net/svnroot/fgcom/branches/fgcom3
The next thing is the extra packages. I need libgnet2, libgnet-dev, liboggz2_1, liboggz2-dev to get installed before I can finish compilation. That wasn't very hard for now. :-) So let's head over to compilation:
cd fgcom3 $EDITOR Makefile
Insert any favorite text editor for $EDITOR. For my setup, I need to change the installation path and the LDFLAGS variable. The shown values below are only new values
[...] INSTALL_BIN:=/opt/bin INSTALL_DIR:=/opt/fgcom [...] LDFLAGS:=-L$(INSTALL_DIR)/lib [...]
The LDFLAGS line contains a space in the unmodified version which my linker doesn't like. So I need to hack that away.
Now it is time to compile. Do a make in the fgcom3 directory. If you run in trouble, e.g. of missing or wrong spaces between -L and /some/foo/path (maybe /opt/fgcom/lib?) then add or remove it like requested by the linker. Do a make clean to cleanup everthing. Simply make won't give you what you want (you need cleanup). After successfully building fgcom (no error line at the end) you should now see an executable file "fgcom" in the path (do a ls -l). Well done! :-) Now, do a make install as a user with proper permission to write to the installation paths) and you are nearly done.
If you have changed installation paths, you maybe will get an error message complaining about missing library files. YICKS! We forgot to tell the dynamic linker, where our libs are, they went to /opt/fgcom/lib which is an unknown lookup path to the linker.
We need to help the linker finding the libs by creating a new file for ldconfig, let's say fgcom.conf, so the new library path /opt/fgcom/lib is known to the dynamic linker. Here you can find my version (very simple):
/opt/fgcom/lib
Place that file into /etc/ld.conf.d/ as root. Now re-run ldconfig and fgcom (placed in /opt/bin) should not complain about missing libraries. Now, try the loop-back test as described here.
Meet you in FGFS. :)
PS: My manually mirrored download archive for FlightGear can be found here. So take a look around. :)
Created: 2009-12-06 |
Last update: 2013-02-22 |
Author: Roland Häder
Home |
My flights |
fgdata_new.bundle |
FGCOM |
Rsync howto |
Links collection |
Imprint
Quix0r's FlightGear Website by Roland Haeder is
licensed under a Creative Commons
Attribution-ShareAlike 3.0 Unported License.
Based on a work at http://flightgear.mxchange.org/repos/flightgear/trunk/.