Okay I got past my previous problem by modifying libgazebo/SConstrict with:

sharedLib = env.SharedLibrary('gazebo', sharedObjs + sources)
staticLib = env.StaticLibrary('gazebo', staticObjs + sources)

(After adding sharedObjs and StaticObjs to the Import line, and modifying my
OIS.pc to use the .o files rather than the libois.a)

So now 'gazebo' builds, but I get an error on player:

g++ -o player/libgazeboplugin.dylib -dynamiclib player/GazeboDriver.os
player/GazeboClient.os player/GazeboInterface.os player/GazeboTime.os
player/SimulationInterface.os player/Position2dInterface.os
player/LaserInterface.os player/CameraInterface.os
server/physics/ode/ODEPhysics.os server/physics/BallJoint.os
server/physics/Body.os server/physics/BoxGeom.os
server/physics/ContactParams.os server/physics/CylinderGeom.os
server/physics/Geom.os server/physics/Hinge2Joint.os
server/physics/HingeJoint.os server/physics/Joint.os
server/physics/PhysicsEngine.os server/physics/PlaneGeom.os
server/physics/SliderJoint.os server/physics/SphereGeom.os
server/physics/UniversalJoint.os server/physics/dCylinder.os
server/physics/RayGeom.os server/rendering/OgreAdaptor.os
server/rendering/OgreFrameListener.os
server/rendering/OgreDynamicRenderable.os
server/rendering/OgreDynamicLines.os server/rendering/OgreSimpleShape.os
server/rendering/OgreHUD.os server/sensors/camera/CameraSensor.os
server/sensors/camera/CameraManager.os server/sensors/ray/RaySensor.os
server/sensors/Sensor.os server/sensors/SensorFactory.os
server/models/LightSource/LightSource.os server/models/Model.os
server/models/ModelFactory.os
server/controllers/position2d/pioneer2dx/Pioneer2dx_Position2d.os
server/controllers/laser/sicklms200/SickLMS200_Laser.os
server/controllers/camera/generic/Generic_Camera.os
server/controllers/Controller.os server/controllers/ControllerFactory.os
server/main.os server/Vector3.os server/Quatern.os server/Pose3d.os
server/World.os server/XMLConfig.os server/Time.os server/Entity.os
server/GazeboError.os server/UpdateParams.os server/GazeboMessage.os
-Llibgazebo -L/Library/Frameworks/Ogre.framework -L/opt/local/lib
-L/usr/local/lib -lgazebo -lboost_python -lOgre -lxml2 -lz -liconv -lm
-lplayercore -lltdl -lpthread -lplayerxdr -lplayererror -lode
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISEffect.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISForceFeedback.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISInputManager.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISKeyboard.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/OISObject.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacHelpers.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacInputManager.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacKeyboard.o
/Users/gorn/Desktop/Downloads/ois-1.0RC1/Mac/XCode-2.2/build/oisStatic.build/Development/oisStatic.build/Objects-normal/i386/MacMouse.o
-lwx_macud-2.5 -lpython -framework QuickTime -framework IOKit -framework
Carbon -framework Cocoa -framework System
ld: Undefined symbols:
__ZN6gazebo19Graphics3dInterfaceC1E14player_devaddrPNS_12GazeboDriverEP10ConfigFilei
/usr/bin/libtool: internal link edit command failed
scons: *** [player/libgazeboplugin.dylib] Error 1
scons: building terminated because of errors.

After I get through all this I'll document it and see if we can make it a
bit more straightforward to build on mac

On 7/15/07, Kevin Barry <[EMAIL PROTECTED]> wrote:

Okay I'm running on a Mac which requires a bit of work to get gazebo to
even try to build (If anyone else is trying this you'll have to create your
own pkg-config entries for Ogre and OIS).

The only unresolved problem is at the very end of this, so you probably
can just read that, however I included the whole process I went through in
case I caused the problem fixing a different one.

Anyway so I believe my build environment is setup mostly correct, on a
fresh svn checkout I get:

senior-design-1s-computer:~/gazebo/gazebo_svn_virgin root# scons install
scons: Reading SConscript files ...
/bin/sh: line 1: python-config: command not found
Unable to parse config [python-config]
senior-design-1s-computer:~/gazebo/gazebo_svn_virgin root#

I believe this is related to boost, but just to get things started I
modified SConscript to call "echo -lpython" in place of python-config
--libs, now:

senior-design-1s-computer:~/gazebo/gazebo_svn_virgin root# scons install
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o server/physics/ode/ODEPhysics.o -c -pthread -pipe -I. -Iserver
-Iserver/models -Ilibgazebo -Iserver/rendering -Iserver/sensors
-Iserver/sensors/camera -Iserver/sensors/ray -Iserver/physics
-Iserver/physics/ode -Iserver/controllers -Iserver/controllers/position2d
-Iserver/controllers/position2d/pioneer2dx -I/usr/include/python2.4
-I/Library/Frameworks/Ogre.framework/Headers -I/opt/local/include/libxml2
-I/opt/local/include -I/usr/local/include/player- 2.0 -I/usr/local/include
-I/usr/local/include/OIS server/physics/ode/ODEPhysics.cc
i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread'

... # all looking good, the pthread thing is just a warning, it's okay.
... # until:

g++ -o libgazebo/Server.o -c -pthread -pipe -I. -Iserver -Iserver/models
-Ilibgazebo -Iserver/rendering -Iserver/sensors -Iserver/sensors/camera
-Iserver/sensors/ray -Iserver/physics -Iserver/physics/ode
-Iserver/controllers -Iserver/controllers/position2d
-Iserver/controllers/position2d/pioneer2dx -I/usr/include/python2.4
-I/Library/Frameworks/Ogre.framework/Headers -I/opt/local/include/libxml2
-I/opt/local/include -I/usr/local/include/player- 2.0 -I/usr/local/include
-I/usr/local/include/OIS libgazebo/Server.cc
i686-apple-darwin8-g++-4.0.1: unrecognized option '-pthread'
libgazebo/Server.cc:47: error: redefinition of 'union semun'
/usr/include/sys/sem.h:184: error: previous definition of 'union semun'

The declarations in sem.h and Server.cc are the same, so I comment it out
of Server.cc, continue building:

g++ -o gazebo server/physics/ode/ODEPhysics.o server/physics/BallJoint.o
server/physics/Body.o server/physics/BoxGeom.o
server/physics/ContactParams.o server/physics/CylinderGeom.o
server/physics/Geom.o server/physics/Hinge2Joint.o
server/physics/HingeJoint.o server/physics/Joint.o
server/physics/PhysicsEngine.o server/physics/PlaneGeom.o
server/physics/SliderJoint.o server/physics/SphereGeom.o
server/physics/UniversalJoint.o server/physics/dCylinder.o
server/physics/RayGeom.o server/rendering/OgreAdaptor.o
server/rendering/OgreFrameListener.o
server/rendering/OgreDynamicRenderable.o server/rendering/OgreDynamicLines.o
server/rendering/OgreSimpleShape.o server/rendering/OgreHUD.o
server/sensors/camera/CameraSensor.o server/sensors/camera/CameraManager.o
server/sensors/ray/RaySensor.o server/sensors/Sensor.o
server/sensors/SensorFactory.o server/models/LightSource/LightSource.o
server/models/Model.o server/models/ModelFactory.o
server/controllers/position2d/pioneer2dx/Pioneer2dx_Position2d.o
server/controllers/laser/sicklms200/SickLMS200_Laser.o
server/controllers/camera/generic/Generic_Camera.o
server/controllers/Controller.o server/controllers/ControllerFactory.o
server/main.o server/Vector3.o server/Quatern.o server/Pose3d.o
server/World.o server/XMLConfig.o server/Time.o server/Entity.o
server/GazeboError.o server/UpdateParams.o server/GazeboMessage.o
-Llibgazebo -L/Library/Frameworks/Ogre.framework -L/opt/local/lib
-L/usr/local/lib -lgazebo -lboost_python -lOgre -lxml2 -lz -liconv -lm
-lplayercore -lltdl -lpthread -lplayerxdr -lplayererror -lode -lois -lpython

/usr/bin/ld: Undefined symbols:
_ActiveNonFloatingWindow
_DisposeEventHandlerUPP
_GetEventParameter
_GetEventTime
_GetWindowEventTarget
_InstallEventHandler
_NewEventHandlerUPP
_RemoveEventHandler
_CallNextEventHandler
gazebo::GazeboError::GazeboError(char const*, int, std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)referenced from libgazebo
expected to be defined in libgazebo
gazebo::GazeboError::~GazeboError()referenced from libgazebo expected to
be defined in libgazebo
typeinfo for gazebo::GazeboErrorreferenced from libgazebo expected to be
defined in libgazebo
gazebo::GazeboMessage::Msg(int)  referenced from libgazebo expected to be
defined in libgazebo
gazebo::GazeboMessage::Instance()     referenced from libgazebo expected
to be defined in libgazebo
collect2: ld returned 1 exit status
scons: *** [gazebo] Error 1
scons: building terminated because of errors.

The first set seems to be from wxwindows, so I add wx-config2 --cflags
--libs to SConstruct with the other pkg-config lines, continue building,
sure enough the first errors are eliminated but the second ones remain.

scons install
...
g++ -o gazebo server/physics/ode/ODEPhysics.o server/physics/BallJoint.o
server/physics/Body.o server/physics/BoxGeom.o
server/physics/ContactParams.o server/physics/CylinderGeom.o
server/physics/Geom.o server/physics/Hinge2Joint.o
server/physics/HingeJoint.o server/physics/Joint.o
server/physics/PhysicsEngine.o server/physics/PlaneGeom.o
server/physics/SliderJoint.o server/physics/SphereGeom.o
server/physics/UniversalJoint.o server/physics/dCylinder.o
server/physics/RayGeom.o server/rendering/OgreAdaptor.o
server/rendering/OgreFrameListener.o
server/rendering/OgreDynamicRenderable.o server/rendering/OgreDynamicLines.o
server/rendering/OgreSimpleShape.o server/rendering/OgreHUD.o
server/sensors/camera/CameraSensor.o server/sensors/camera/CameraManager.o
server/sensors/ray/RaySensor.o server/sensors/Sensor.o
server/sensors/SensorFactory.o server/models/LightSource/LightSource.o
server/models/Model.o server/models/ModelFactory.o
server/controllers/position2d/pioneer2dx/Pioneer2dx_Position2d.o
server/controllers/laser/sicklms200/SickLMS200_Laser.o
server/controllers/camera/generic/Generic_Camera.o
server/controllers/Controller.o server/controllers/ControllerFactory.o
server/main.o server/Vector3.o server/Quatern.o server/Pose3d.o
server/World.o server/XMLConfig.o server/Time.o server/Entity.o
server/GazeboError.o server/UpdateParams.o server/GazeboMessage.o
-Llibgazebo -L/Library/Frameworks/Ogre.framework -L/opt/local/lib
-L/usr/local/lib -lgazebo -lboost_python -lOgre -lxml2 -lz -liconv -lm
-lplayercore -lltdl -lpthread -lplayerxdr -lplayererror -lode -lois -lpython
-lwx_macud- 2.5 -framework QuickTime -framework IOKit -framework Carbon
-framework Cocoa -framework System
/usr/bin/ld: Undefined symbols:
gazebo::GazeboError::GazeboError(char const*, int, std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)referenced from libgazebo
expected to be defined in libgazebo
gazebo::GazeboError::~GazeboError()referenced from libgazebo expected to
be defined in libgazebo
typeinfo for gazebo::GazeboErrorreferenced from libgazebo expected to be
defined in libgazebo
gazebo::GazeboMessage::Msg(int)  referenced from libgazebo expected to be
defined in libgazebo
gazebo::GazeboMessage::Instance()     referenced from libgazebo expected
to be defined in libgazebo
collect2: ld returned 1 exit status
scons: *** [gazebo] Error 1
scons: building terminated because of errors.


Now server/GazeboError.o is mentioned in the g++ line, I've been trying
different things but I'm really at a loss here. Any ideas?

Thanks,
-Kevin

-------------------------------------------------------------------------
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/
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to