Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Andy Ross
Durk Talsma wrote:
 Back in January, right before my Canadian adventure, I reported a
 compile error related to yasim-test. [...] I found that the following
 modification to src/FDM/Yasim/Makefile.am works:

 [...]

 I basically added the -losg* linker directives to ensure that the correct
 libraries are known to the linker.

This looks wrong to me.  The yasim command line tool doesn't require
anything from the FlightGear tree at all, and only the XML parser from
SimGear.  So far as I can tell, it builds for me without problem.

I think you may have a library pollution issue; maybe a local change
to one of your SimGear libraries is suddenly pulling in OSG code where
before it stood alone?

Andy

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Durk Talsma
Hi Andy,

On Monday 23 April 2007 18:11, Andy Ross wrote:
 Durk Talsma wrote:
  Back in January, right before my Canadian adventure, I reported a
  compile error related to yasim-test. [...] I found that the following
  modification to src/FDM/Yasim/Makefile.am works:
 
  [...]
 
  I basically added the -losg* linker directives to ensure that the correct
  libraries are known to the linker.

 This looks wrong to me.  The yasim command line tool doesn't require
 anything from the FlightGear tree at all, and only the XML parser from
 SimGear.  So far as I can tell, it builds for me without problem.

Thanks for your reply. There is one file though, Gear.cpp, which adds a 
further dependency on SimGear. Gear.cpp is part of the SHARED_SOURCES, which 
are used to build both the standalone SimGear program and the FlightGear 
library. Gear.cpp includes: 

#include simgear/scene/material/mat.hxx

which in turn includes: 


#include osg/ref_ptr
#include osg/StateSet

If I'm correct, this inclusion of SimGear related files is necessary to get a 
gear-related drag coefficient, from the scenery. In addition, there is 
reference to OSG code in mat.hxx, so it seems very logical to me the OSG must 
be linked to yasim-test. 


 I think you may have a library pollution issue; maybe a local change
 to one of your SimGear libraries is suddenly pulling in OSG code where
 before it stood alone?


I have considered that, but I've removed every trace of any SimGear and OSG  
header and library files from my install path, and any reinstalled everything 
from scratch several times. In addition, I have several copies of the 
FlightGear and SimGear and FlightGear source tree on my computer. A developer 
version and a clean version. Even the clean version shows the problem.

Cheers,
Durk 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Andy Ross
Durk Talsma wrote:
 Gear.cpp includes:
 #include simgear/scene/material/mat.hxx

Not in CVS it doesn't.  It makes a type declaration for class
SGMaterial so it can pass a pointer to it only.  Do you have some
local changes or patches from someone else applied?

Andy

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Andy Ross
Durk Talsma wrote:
 Looking at the CVS browser, it seems like this dependency on SimGear
 was added on January 17, as part of a patch contributed by Maik
 Justus:

Sorry, but I honestly don't know what you're looking at.  There are no
SimGear includes in the HEAD of Gear.hpp in my tree.  There is no
revision 1.8 of that file in the cvs log AT ALL.

When I do:

  cvs -d :pserver:[EMAIL PROTECTED]:/var/cvs/FlightGear-0.9 co 
source/src/FDM/YASim/Gear.hpp

... I get a file with no SimGear headers at all, just a class
SGMaterial; declaration at the top.

This is bizarre.  Curt?  Are there separate trees for this stuff?

Andy




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Durk Talsma
On Monday 23 April 2007 22:01, Andy Ross wrote:
 This is bizarre.  Curt?  Are there separate trees for this stuff?

 Andy


Andy, is there any chance you are looking at the Pre-OSG (i.e. PLIB based) 
branch of FlightGear?

Cheers,
Durk

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Durk Talsma
On Monday 23 April 2007 22:01, Andy Ross wrote:
 Durk Talsma wrote:
  Looking at the CVS browser, it seems like this dependency on SimGear
  was added on January 17, as part of a patch contributed by Maik
  Justus:

 Sorry, but I honestly don't know what you're looking at.  There are no
 SimGear includes in the HEAD of Gear.hpp in my tree.  There is no
 revision 1.8 of that file in the cvs log AT ALL.

 When I do:

   cvs -d :pserver:[EMAIL PROTECTED]:/var/cvs/FlightGear-0.9 co
 source/src/FDM/YASim/Gear.hpp

 ... I get a file with no SimGear headers at all, just a class
 SGMaterial; declaration at the top.

 This is bizarre.  Curt?  Are there separate trees for this stuff?

 Andy



Oh, wait a second: I now see you are talking about the header (.hpp) file, 
whereas I was referring to the (.cpp) source file, Gear.cpp. You are right 
that the former (the hpp) contains (only) the SGmaterial reference. The 
latter, the Gear.cpp source file is the one containing the additional SimGear 
include, as shown in the url to the cvs log in my previous mail.

Cheers,
Durk

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-23 Thread Andy Ross
 Oh, wait a second: I now see you are talking about the header (.hpp) file,
 whereas I was referring to the (.cpp) source file, Gear.cpp. You are right
 that the former (the hpp) contains (only) the SGmaterial reference. The
 latter, the Gear.cpp source file is the one containing the additional SimGear
 include, as shown in the url to the cvs log in my previous mail.

Indeed.  Nonetheless, from a build just completed:

$ ldd ./yasim
libdl.so.2 = /lib/libdl.so.2 (0x2ac79e774000)
libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x2ac79e878000)
libm.so.6 = /lib/libm.so.6 (0x2ac79ea78000)
libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x2ac79ebf9000)
libc.so.6 = /lib/libc.so.6 (0x2ac79ed07000)
/lib64/ld-linux-x86-64.so.2 (0x2ac79e657000)

Those extra SimGear libraries don't require anything from OSG, except
perhaps the compile-time headers.  Are you doing anything fancy like
building SimGear as a shared library?

Andy

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OSG yasim-test build error - Possible Solution

2007-04-22 Thread Martin Spott
Hi Durk,

Durk Talsma wrote:

 yasim_LDADD = -lsgxml -lsgprops -lsgdebug -lsgmisc -lsgstructure \
 -losgUtil -losgDB -losgSim -losg -lOpenThreads $(THREAD_LIBS) \
 $(base_LIBS)

Well, what's currently in CVS works for me even on FreeBSD ! To find
out which libraries are qctually required I'd ususally use 'nm' to get
an idea which function is implemented in the respective libs.
Personally I'd vote for inclusion only of those libraries where
inclusion is unavoidable   While you're at it, you could probably
add '-losgText' in src/Main/ in order to link the 'fgfs' binary on
FreeBSD without manual interaction  ;-)

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

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel