[RESOLVED] Compiling with osggraph

Use this forum to report bugs or ask for help

Moderator: kilo

[RESOLVED] Compiling with osggraph

Postby nonobecane » Thu Apr 23, 2015 4:28 pm

Hi,

Recently, There as been a lot of update with osggraph on the trunk branch.
I try to use it and i compile like this :

Code: Select all
$ svn update
cd build
cmake -D CMAKE_INSTALL_PREFIX:PATH:STRING=/mnt/HDD-DATA/SD2-svn \ -D OPTION_OSGGRAPH:BOOL=ON ..
make -j 8
make install


but it's don't work
- My folder /mnt/HDD-DATA/SD2-svn/lib64/games/speed-dreams-2/modules/graphic contains only the file ssggraph.so
- My build folder (/mnt/HDD-DATA/LOCAL/speed-dreams-svn/build/src/modules/graphic) contains a folder ssggraph but no osggraph folder or file.

For information, I use openscenegraph 3.2.1-6, flightgear 3.0.0 work and i can open *.ac file with /usr/bin/osgviewerGLUT

There is another way to compile it ?
Thanks for your answer

Arno
Last edited by nonobecane on Sat Apr 25, 2015 6:14 am, edited 1 time in total.
Image SD2 svn / Debian Sid 64 / 1920x1080 on GTX580 / Logitech G25
nonobecane
 
Posts: 29
Joined: Sat Jan 04, 2014 10:20 am
Location: France

Re: Compiling with osggraph

Postby MiniJoe » Thu Apr 23, 2015 4:49 pm

I don't have a Linux box handy, but CMake should create a log somewhere. I usually use ccmake ( a Cmake-gui for Linux), as it lets you see which options you have set and where the dependencies are found. Also, make sure that you have the osgxxx-dev packages installed.
HTH.
MiniJoe
 
Posts: 98
Joined: Fri Mar 16, 2012 1:32 am

Re: Compiling with osggraph

Postby madbad » Thu Apr 23, 2015 5:12 pm

This is how I setup my folders

Shell script location:
Code: Select all
/home/madbad/Development/svn/speed-dream

Sd svn trunk location
Code: Select all
/home/madbad/Development/svn/speed-dream/speed-dreams/trunk



The two shell script I've setup are those:
Code: Select all
rebuild.sh
looks like this
Code: Select all
#!/bin/bash
echo -e "Cambio directory"
cd ./speed-dreams/trunk/
echo "============== Ripulisco la build ============== "
./clobber.sh
echo "============== Configuro cmake con i miei dati ============== "
cmake \
-DOPTION_OSGGRAPH=ON \
-DOPTION_SDL2:BOOL=ON \
-DOPTION_SDL_JOYSTICK:BOOL=ON \
-DOPTION_3RDPARTY_SQLITE3:BOOL=ON \
-DOPTION_OFFICIAL_ONLY:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX="/home/madbad/Giochi/speed-dreams" \

echo "==============  Eseguo make... ============== "
make -j4
make install
read -p " ============== Finito premi invio per uscire... ============== "

note: Here I set some option that you may not be interested in... just remove them and keep only what you need.
Make sure you have no strange error when executing this script.

and
Code: Select all
updatesvn.sh

Code: Select all
#!/bin/bash
echo -e "Aggiorno tramite SVN il trunk di speed dreams..."
svn co https://svn.code.sf.net/p/speed-dreams/code/trunk speed-dreams/trunk
echo -e "Finito!"
read -p "Prei Invio per uscire..."


Remember that to use OSG once you have succesfully build it you have to change your sd config:
In the file (I use my config as example)
Code: Select all
/home/madbad/.speed-dreams-2/config/raceengine.xml

replace
Code: Select all
    <attstr name="graphic" val="ssggraph"/>

with
Code: Select all
    <attstr name="graphic" val="osggraph"/>
User avatar
madbad
 
Posts: 118
Joined: Sat Jan 22, 2011 3:45 pm

Re: Compiling with osggraph

Postby nonobecane » Thu Apr 23, 2015 6:07 pm

Thanks madbad and MiniJoe

It's don't work directly when i use cmake :
Code: Select all
cmake -D CMAKE_INSTALL_PREFIX:PATH:STRING=/mnt/HDD-DATA/SD2-svn \ -D OPTION_OSGGRAPH=ON ..

note I change -D OPTION_OSGGRAPH:BOOL=ON on -D OPTION_OSGGRAPH=ON (like in your script Madbad)

but it's don't work, then i edit the file CMakeCache.txt just created by cmake in the buid folder and i change the line 264 :
OPTION_OSGGRAPH:BOOL=false -> OPTION_OSGGRAPH:BOOL=true

I reload
Code: Select all
cmake -D CMAKE_INSTALL_PREFIX:PATH:STRING=/mnt/HDD-DATA/SD2-svn \ -D OPTION_OSGGRAPH=ON ..
make
make install

and the osggraph.so is created in the folder /mnt/HDD-DATA/SD2-svn/lib64/games/speed-dreams-2/modules/graphic/

but when i load sd2 i've this error :
Code: Select all
00:00:11.648 Default  Error   Failed to load library /mnt/HDD-DATA/SD2-svn/lib64/games/speed-dreams-2/modules/graphic/osggraph.so (/mnt/HDD-DATA/SD2-svn/lib64/games/speed-dreams-2/modules/graphic/osggraph.so: undefined symbol: _ZN3osg11NodeVisitor5applyERNS_8DrawableE)


However the file /mnt/HDD-DATA/SD2-svn/lib64/games/speed-dreams-2/modules/graphic/osggraph.so is existing now
Image SD2 svn / Debian Sid 64 / 1920x1080 on GTX580 / Logitech G25
nonobecane
 
Posts: 29
Joined: Sat Jan 04, 2014 10:20 am
Location: France

Re: Compiling with osggraph

Postby madbad » Thu Apr 23, 2015 8:58 pm

Did you get any error when you run
Code: Select all
make
?



Try to run this command from the directory where you have osggraph.so
Code: Select all
ldd ./osggraph.so
User avatar
madbad
 
Posts: 118
Joined: Sat Jan 22, 2011 3:45 pm

Re: Compiling with osggraph

Postby nonobecane » Sat Apr 25, 2015 6:14 am

Thanks madbad,

I purge and reinstall openscengraph and it works

I don't know why, but when i use cmake with :
Code: Select all
cmake -D CMAKE_INSTALL_PREFIX:PATH:STRING=/mnt/HDD-DATA/SD2-svn \ -D OPTION_OSGGRAPH:BOOL=ON ..
or
Code: Select all
cmake -D CMAKE_INSTALL_PREFIX:PATH:STRING=/mnt/HDD-DATA/SD2-svn \ -D OPTION_OSGGRAPH=ON ..
it does not work


In the folder I use for svn update, I change the line 98 of the file [..]/cmake/options.cmake like this :
SET(OPTION_OSGGRAPH false CACHE BOOL "Build OpenScenGraph-based WIP osggraph graphics module")
by
SET(OPTION_OSGGRAPH true CACHE BOOL "Build OpenScenGraph-based WIP osggraph graphics module")

Then when i compile, i just pass :
Code: Select all
cmake -D CMAKE_INSTALL_PREFIX:PATH:STRING=/mnt/HDD-DATA/SD2-svn ..
And SD2 work with osggraph.

Image


Perhaps it's because osggraph is in progress on SD2, I tested on 2 computers and i've the same problem :
When i stop the race, I can't read the screen
Image
Image SD2 svn / Debian Sid 64 / 1920x1080 on GTX580 / Logitech G25
nonobecane
 
Posts: 29
Joined: Sat Jan 04, 2014 10:20 am
Location: France

Re: Compiling with osggraph

Postby madbad » Sat Apr 25, 2015 9:54 am

nonobecane wrote:Thanks madbad,

I purge and reinstall openscengraph and it works

Good to know.

nonobecane wrote:Perhaps it's because osggraph is in progress on SD2, I tested on 2 computers and i've the same problem :
When i stop the race, I can't read the screen
Image

Yes, this is a know problem.
You may also experience some crash using the OSG module, it is obviously still in development.
User avatar
madbad
 
Posts: 118
Joined: Sat Jan 22, 2011 3:45 pm

Re: Compiling with osggraph

Postby madbad » Sun Apr 26, 2015 8:19 am

madbad wrote:
nonobecane wrote:Perhaps it's because osggraph is in progress on SD2, I tested on 2 computers and i've the same problem :
When i stop the race, I can't read the screen
Image

Yes, this is a know problem.

Well seems this has just be fixed!
User avatar
madbad
 
Posts: 118
Joined: Sat Jan 22, 2011 3:45 pm

Re: [RESOLVED] Compiling with osggraph

Postby nonobecane » Mon Apr 27, 2015 4:50 pm

Yes, I've just update to r6000 and it works.
Image SD2 svn / Debian Sid 64 / 1920x1080 on GTX580 / Logitech G25
nonobecane
 
Posts: 29
Joined: Sat Jan 04, 2014 10:20 am
Location: France


Return to Problems, Fixes & Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron