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-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 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 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 Andy Ross
Durk Talsma wrote:
> Gear.cpp includes:
> #include 

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 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 

which in turn includes: 


#include 
#include 

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:
> 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-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


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

2007-04-22 Thread Durk Talsma
Hi Folks,

Hi Folks,

Back in January, right before my Canadian adventure, I reported a compile 
error related to yasim-test. I'm back home now and tried updating the 
FlightGear source tree, but I still had problems with the yasim-test build. 
After some experimentation, I found that the following modification to 
src/FDM/Yasim/Makefile.am works:

yasim_SOURCES = yasim-test.cpp $(SHARED_SOURCE_FILES)

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

proptest_SOURCES = proptest.cpp $(SHARED_SOURCE_FILES)
proptest_LDADD = -lsgxml -lsgprops -lsgdebug -lsgmisc -lsgstructure \
-losgUtil -losgDB -losgSim -losg -lOpenThreads $(THREAD_LIBS) \
$(base_LIBS)

INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src

I basically added the -losg* linker directives to ensure that the correct 
libraries are known to the linker. I copied these from src/Main/Makefile.am 
It turned out I needed to do for both yasim and for proptest. Since both 
programs now compile again on my system I'm inclined to commit this to CVS. 
Before proceeding, I have to requests for comments though:
- What is the minimally required set of libraries necessery to ensure 
compilation 
- Is there an alternative solution? I haven't seen any other compile error 
report seen on this issue, so I'm still wondering whether particulars of my 
own setup (Linux - Suse 9.3 / OSG - SVN) might have contributed to the 
problem.

Unless there are valid objections, I'll try to commit this patch in a few days 
time.

Cheers,
Durk



Error log yasim-test FlightGear/OSG:

if g++ -DHAVE_CONFIG_H -I. -I. -I../../../src/Include -I../../.. 
-I../../../src  -I/usr/X11R6/include -I/usr/local/include  -g -O2 
-D_REENTRANT -MT yasim-test.o -MD -MP -MF ".deps/yasim-test.Tpo" -c -o 
yasim-test.o yasim-test.cpp; \
then mv -f ".deps/yasim-test.Tpo" ".deps/yasim-test.Po"; else rm -f 
".deps/yasim-test.Tpo"; exit 1; fi
g++  -g -O2 -D_REENTRANT  -L/usr/X11R6/lib -L/usr/local/lib -o yasim  
yasim-test.o Airplane.o Atmosphere.o ControlMap.o FGFDM.o Gear.o Glue.o 
Ground.o Hitch.o Hook.o Launchbar.o Integrator.o Jet.o Math.o Model.o 
PropEngine.o Propeller.o PistonEngine.o TurbineEngine.o RigidBody.o Rotor.o 
Rotorpart.o SimpleJet.o Surface.o Thruster.o Wing.o Turbulence.o -lsgxml 
-lsgprops -lsgdebug -lsgmisc -lsgstructure -ldl -lm
Gear.o(.gnu.linkonce.r._ZTVN3osg12NodeCallbackE+0x5c): undefined reference to 
`osg::Referenced::setThreadSafeRefUnref(bool)'
Gear.o(.gnu.linkonce.r._ZTIN3osg6ObjectE+0x8): undefined reference to 
`typeinfo for osg::Referenced'
Gear.o(.gnu.linkonce.r._ZTVN3osg6ObjectE+0x8): undefined reference to 
`osg::Referenced::setThreadSafeRefUnref(bool)'
Gear.o(.gnu.linkonce.r._ZTVN3osg8StateSet8CallbackE+0x5c): undefined reference 
to `osg::Referenced::setThreadSafeRefUnref(bool)'
Gear.o(.gnu.linkonce.r._ZTVN3osg7Uniform8CallbackE+0x5c): undefined reference 
to `osg::Referenced::setThreadSafeRefUnref(bool)'
Gear.o(.gnu.linkonce.r._ZTVN3osg14StateAttribute8CallbackE+0x5c): undefined 
reference to `osg::Referenced::setThreadSafeRefUnref(bool)'
Gear.o(.gnu.linkonce.t._ZN3osg12NodeCallbackclEPNS_4NodeEPNS_11NodeVisitorE+0x5):
 
In function `osg::NodeCallback::operator()(osg::Node*, osg::NodeVisitor*)':
/usr/local/include/osg/NodeCallback:45: undefined reference to 
`osg::NodeCallback::traverse(osg::Node*, osg::NodeVisitor*)'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD2Ev+0x5a): In function 
`osg::Object::~Object [not-in-charge]()':
/usr/include/c++/3.3.5/bits/stl_alloc.h:656: undefined reference to 
`osg::Referenced::~Referenced [not-in-charge]()'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD2Ev+0xa1): In function 
`osg::Object::~Object [not-in-charge]()':
/usr/local/include/osg/Referenced:151: undefined reference to 
`osg::Referenced::getDeleteHandler()'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD2Ev+0xc3):/usr/local/include/osg/Referenced:152:
 
undefined reference to `osg::Referenced::deletUsingDeleteHandler() const'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD2Ev+0xec): In function 
`osg::Object::~Object [not-in-charge]()':
/usr/include/c++/3.3.5/bits/stl_alloc.h:656: undefined reference to 
`osg::Referenced::~Referenced [not-in-charge]()'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD0Ev+0x5a): In function 
`osg::Object::~Object [in-charge deleting]()':
/usr/include/c++/3.3.5/bits/stl_alloc.h:656: undefined reference to 
`osg::Referenced::~Referenced [not-in-charge]()'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD0Ev+0xa1): In function 
`osg::Object::~Object [in-charge deleting]()':
/usr/local/include/osg/Referenced:151: undefined reference to 
`osg::Referenced::getDeleteHandler()'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD0Ev+0xc3):/usr/local/include/osg/Referenced:152:
 
undefined reference to `osg::Referenced::deletUsingDeleteHandler() const'
Gear.o(.gnu.linkonce.t._ZN3osg6ObjectD0Ev+0xec): In function 
`osg::Object::~Object [in-charge deleting]()':
/usr/include/c++/3.3.5/bits/stl_alloc