RE: [Flightgear-devel] Re: SimGear as shared lib

2005-05-09 Thread Richard Bytheway
 Alex Romosan wrote:
 
 that was exactly the original problem: changes in simgear 
 would involve a
 full recompilation of flightgear if you use static libraries. and
 compiling flightgear does take a very long time. now, if you use
 dynamic libraries, you can make your change in simgear and 
 just go fly
 right away...
   
 
 
 Using static or dynamic libs really don't make that much 
 difference when 
 recompiling FlightGear.  It's your procedure that makes all the 
 difference.  If you do a make install at the top level of simgear 
 (dynamic or static) you are going to reinstall and touch all 
 the simgear 
 header files which will trigger a nearly full recompile of FG.  The 
 linking trick someone mentioned is probably the most 
 convenient, but is 
 a little non-standard.  Often I just watch which bits are changed in 
 simgear, and only do a make install in those subdirectories.  
 That saves 
 a lot of compiling on the FG side.  Also, if you know the headers 
 haven't changed, you can just copy over the .a files to your install 
 location and do a quick relink of FG.  (And I should point 
 out that the 
 relink can be quick on the right platform, and can be really slow on 
 other platforms ...) :-)
 
 Curt.
 

If you set environment variable INSTALL=/usr/bin/install -p before running 
configure for SimGear then the simgear libraries keep their date when 
installed, so the Singear files that FlightGear 'make' looks at only change 
date if the file has actually changed. Consequently, running make on Flightgear 
only rebuilds the parts that need to be rebuilt.

Saves tens-of-minutes per build on Cygwin.

Richard


This e-mail has been scanned for Bede Scientific Instruments for all 
viruses by Star Internet. The service is powered by MessageLabs. For
more information on a proactive anti-virus service working around the
clock, around the globe, visit: http://www.star.net.uk


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Melchior FRANZ
* Karsten Krispin -- Sunday 08 May 2005 02:30:
 just a small question: is it hard to include simgear as shared libs?
 When you want to change something in simgear you have to recompile fgfs. that 
 needs pretty too long.
 
 Or is there a trick?

No trick for avoiding to recompile fgfs, but for not needing to recompile all
of it only because you changed a comment in a header or something.


Trick #1:
Don't ever install SimGear, but only put links to the libs into /usr/local/lib/

  $ cd /usr/local/lib
  $ for i in `find /your/path/to/SimGear -name \*.a`; do ln -s $i; done

and links to the headers into /usr/local/include/

  $ ln -s  /your/path/to/SimGear/simgear /usr/local/include/simgear

Do the same with plib if you like. Of course you have to add further links
whenever libs are added, but that doesn't happen that often.



Trick #2:
Use ccache (http://ccache.samba.org/; should be in every serious Linux 
distribution
already). You only need to set CC and CXX to prepend ccache:

  CC=ccache gcc CXX=ccache c++ ./configure ...

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Alex Romosan
Karsten Krispin [EMAIL PROTECTED] writes:

  yes. would be cool if you send me a patch.

this is the patch:



patch.simgear.bz2
Description: simgear as shared lib

the last part gets simgear to use a system installed expat lib, so you
might not want to apply it. after you apply the patch you need to run
libtoolize (so you need libtool installed) and then run ./autogen.sh
and configure, etc.

  What's about the lifetime of the patch, where is it applied?
  How far is it affected trough the cvs?

i am not sure i understand this.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |
___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

[Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Alex Romosan
Martin Spott [EMAIL PROTECTED] writes:

 Hello Karsten,

 Karsten Krispin wrote:

 just a small question: is it hard to include simgear as shared libs?

 No, it's not dificult at all. But you probably don't _want_ to, because
 changes in FlightGear sometimes relate to changes in SimGear so you
 have to rebuild SimGear anyway.
 I'd stick to static libs, especially since rebuilding SimGear doesn't
 take that long - compared to FlightGear,

that was exactly the original problem: changes in simgear would involve a
full recompilation of flightgear if you use static libraries. and
compiling flightgear does take a very long time. now, if you use
dynamic libraries, you can make your change in simgear and just go fly
right away...

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Martin Spott
Alex Romosan wrote:

 that was exactly the original problem: changes in simgear would involve a
 full recompilation of flightgear if you use static libraries.

Well, if you do substantial changes to SimGear that affects the
headers, then you have to recompile the relating parts of FlightGear
anyway. Otherwise relinking should be sufficient,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Curtis L. Olson
Alex Romosan wrote:
that was exactly the original problem: changes in simgear would involve a
full recompilation of flightgear if you use static libraries. and
compiling flightgear does take a very long time. now, if you use
dynamic libraries, you can make your change in simgear and just go fly
right away...
 

Using static or dynamic libs really don't make that much difference when 
recompiling FlightGear.  It's your procedure that makes all the 
difference.  If you do a make install at the top level of simgear 
(dynamic or static) you are going to reinstall and touch all the simgear 
header files which will trigger a nearly full recompile of FG.  The 
linking trick someone mentioned is probably the most convenient, but is 
a little non-standard.  Often I just watch which bits are changed in 
simgear, and only do a make install in those subdirectories.  That saves 
a lot of compiling on the FG side.  Also, if you know the headers 
haven't changed, you can just copy over the .a files to your install 
location and do a quick relink of FG.  (And I should point out that the 
relink can be quick on the right platform, and can be really slow on 
other platforms ...) :-)

Curt.
--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d
___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Karsten Krispin
Am Sonntag 08 Mai 2005 19:33 schrieb Martin Spott:
 Alex Romosan wrote:
  that was exactly the original problem: changes in simgear would involve a
  full recompilation of flightgear if you use static libraries.

 Well, if you do substantial changes to SimGear that affects the
 headers, then you have to recompile the relating parts of FlightGear
 anyway. Otherwise relinking should be sufficient,

 Martin.

Yes thats right. But: I as a person  who really nothing knows about 
3d-programming  needs to understands whats going on there, wants to comment 
out something to see the result instead of recompiling FGFS in a whole.
But even if you make some heavy changes to the simgear-lib you don't have to 
change the header in every way. So simgear as a shared lib is a good 
improovement :)

Karsten Krispin

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: SimGear as shared lib

2005-05-08 Thread Curtis L. Olson
Sorry, I normally wouldn't send corrections on my message but I made 
some lazy typos that make my message more confusing than it should have 
been.  Let me try again ...

Using static or dynamic libs really doesn't make that much difference 
when recompiling FlightGear.  It is your installation procedure that 
makes all the difference.  If you do a make install at the top level of 
simgear (dynamic or static) you are going to reinstall and touch all the 
simgear header files which will trigger a nearly full recompile of FG.  
The symbolic link trick someone mentioned earlier is probably the most 
convenient way to mimize FG recompiles, but is a little non-standard, it 
may offend some sys-admin sensibilities. :-)  Often I just watch which 
bits are changed in simgear, and only do a make install in those 
subdirectories.  That saves a lot of compiling on the FG side.  Also, if 
you know the headers haven't changed, you can just copy over the .a 
files to your install location and do a quick relink of FG.  (And I 
should point out that the relink can be quick on the right platform, and 
can be really slow on other platforms ...) :-)

Curt.
--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d
___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: SimGear as shared lib

2005-05-07 Thread Alex Romosan
Karsten Krispin [EMAIL PROTECTED] writes:

 just a small question: is it hard to include simgear as shared libs?
 When you want to change something in simgear you have to recompile
 fgfs. that needs pretty too long.


i can send you a patch (i've been building simgear as shared libs for
the longest time) or you can take a look at the debian simgear source
package and fashion a patch from that.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: SimGear as shared lib

2005-05-07 Thread Karsten Krispin
Am Sonntag 08 Mai 2005 04:26 schrieben Sie:
 Am Sonntag 08 Mai 2005 03:22 schrieb Alex Romosan:
  Karsten Krispin [EMAIL PROTECTED] writes:
   just a small question: is it hard to include simgear as shared libs?
   When you want to change something in simgear you have to recompile
   fgfs. that needs pretty too long.
 
  i can send you a patch (i've been building simgear as shared libs for
  the longest time) or you can take a look at the debian simgear source
  package and fashion a patch from that.
 
  --alex--

 yes. would be cool if you send me a patch.

 What's about the lifetime of the patch, where is it applied?
 How far is it affected trough the cvs?


 Karsten

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d