Panda3d with Ubuntu 11.04

Return to Compiling or Editing the Panda Source

Panda3d with Ubuntu 11.04

Postby hillsalex » Thu May 12, 2011 10:08 pm

Panda3d won't compile with Ubuntu 11.04 (after installing a lot of libraries, etc, I get "fatal error: linux/videodev.h: no such file or directory".

Seems like the current version of Panda3d isn't compatible with the new kernal, etc etc. I've done some research, but I'm a bit in over my head. Alas.

Any advice for building, or knowledge as to when a version of Panda3d for ubuntu 11.04 will arrive?
hillsalex
 
Posts: 1
Joined: Thu May 12, 2011 10:04 pm

Postby rdb » Fri May 13, 2011 1:04 am

Hmm... seems like Video4Linux 1 support was removed in Natty. I'll provide a proper fix as soon as I look into making a natty build.
I think you should be able to compile with HAVE_VIDEO4LINUX disabled, or so. Poke around in panda/src/vision to disable compiling the Video4Linux code.

If you don't want to compile yourself, you can install the maverick build and be sure to use python2.6 instead of python2.7.
rdb
 
Posts: 8637
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Ubuntu 11.04

Postby randall » Fri May 13, 2011 9:20 am

This is my first attempt at compiling Panda from source on Ubuntu 11.04.

I'm having issues with the following third party libraries using makepanda.py --verbose --everything



fcollada
- library is no longer available on public website? is it needed?


squish
- source will not compile on platform even without SSE enabled. I have a Dell Inspiron N5010 Intel core i3 x64.


tiff
- verified via locate command library is installed in usr/lib32/ but makepanda.py still cannot find. I tried to manually add via the Lib( ALWAYS, dir) Python command but no effect


vrpn
- vr device periphers from UNC and I did not download and try to compile. how to disable certain third party libraries?


jpeg
- libjpeg8-dev installation in package manager wants to remove libhighgui-dev and libtiff4-dev but Panda needs these libraries - is this a package creation error?

zlib
- installed and verified libz location in /usr/lib32/ via locate command but still makepanda.py cannot find as tiff


Thanks
randall
 
Posts: 2
Joined: Fri May 13, 2011 9:01 am

Postby rdb » Fri May 13, 2011 9:40 am

Welcome to the forums!

FCollada is needed for the dae2egg tool. You can grab the libfcollada-dev maverick package from the Panda3D repo if you need it.

You can also grab the maverick package for squish from there.

As for tiff, jpeg and zlib- you're saying you only have the 32-bits packages for them installed. Get the 64-bits ones, be sure to get the -dev ones. Like zlib1g-dev, libjpeg-dev, libtiff-dev...

You don't need to compile anything from source, the packages are all either available from the Panda3D repo/PPA (for maverick) or the Ubuntu repo.

You don't need vrpn, you can compile without it. Makepanda automatically disables support for missing packages.
rdb
 
Posts: 8637
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Ubuntu Natty 11.04

Postby randall » Sun May 15, 2011 2:44 am

Thanks for response.

I tried installing the Panda3d maverick package from archives.panda3d.org onto natty but no luck.

I also can't compile 1.7.2 or main. I also get the videodev.h error. As stated earlier it seems Video4Linux is not supported by latest Linux kernel. It's been almost six years since I've worked with Linux and Ubuntu and the platform has improved greatly. There's a post here about the problem:
http://stackoverflow.com/questions/5842 ... untu-11-04

I could dig deeper, change the includes, make sure things compile, and check in changes to cvs. I'd rather just wait until an Ubuntu Natty release is up though. It seems from other forum posts new package releases are automated so I shouldn't have to wait long?
randall
 
Posts: 2
Joined: Fri May 13, 2011 9:01 am

Postby rdb » Sun May 15, 2011 6:51 am

I haven't set up a natty build machine yet. I'll look into it, though. Demand seems to be high.
rdb
 
Posts: 8637
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Are the Fedora rpm sources for 1.7.0 still around?

Postby unsquander » Wed May 18, 2011 8:42 am

Since there are no Fedora 1.7.2 rpms available, I'd like to try to take advantage of the old 1.7.0 rpm sources to put together a new rpm.
unsquander
 
Posts: 17
Joined: Sat Jan 30, 2010 10:57 pm

Postby rdb » Wed May 18, 2011 9:04 am

Or try the latest CVS. I modified makepanda to run rpm through fakeroot, this may have solved the issues with system damage that the Fedora RPMs have done in the past.
rdb
 
Posts: 8637
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby unsquander » Wed May 18, 2011 10:13 am

Ah rats. After downloading from cvs with:

cvs -d :pserver:anonymous@panda3d.cvs.sourceforge.net:/cvsroot/panda3d co panda3d


makepanda bailed out on errors. Thank you for the suggestion, though.

Are the original rpm source directories for the 1.7.0 version no longer around?

Here are my makepanda errors:
In file included from panda/src/bullet/bulletWorld.h:25,
from panda/src/bullet/config_bullet.h:28,
from panda/src/bullet/config_bullet.cxx:16,
from panda/src/bullet/bullet_composite.cxx:2:
panda/src/bullet/bulletAllHitsRayResult.h:54: error: expected class-name before ‘{’ token
In file included from panda/src/bullet/bulletWorld.h:27,
from panda/src/bullet/config_bullet.h:28,
from panda/src/bullet/config_bullet.cxx:16,
from panda/src/bullet/bullet_composite.cxx:2:
panda/src/bullet/bulletContactResult.h:56: error: expected class-name before ‘{’ token
In file included from panda/src/bullet/bulletShape.h:75,
from panda/src/bullet/bulletCharacterControllerNode.h:23,
from panda/src/bullet/bulletWorld.h:29,
from panda/src/bullet/config_bullet.h:28,
from panda/src/bullet/config_bullet.cxx:16,
from panda/src/bullet/bullet_composite.cxx:2:
panda/src/bullet/bulletShape.I: In member function ‘bool BulletShape::is_non_moving() const’:
panda/src/bullet/bulletShape.I:88: error: ‘class btCollisionShape’ has no member named ‘isNonMoving’
panda/src/bullet/bulletShape.I: In member function ‘bool BulletShape::is_soft_body() const’:
panda/src/bullet/bulletShape.I:99: error: ‘class btCollisionShape’ has no member named ‘isSoftBody’
In file included from panda/src/bullet/bulletVehicle.h:127,
from panda/src/bullet/bulletWorld.h:34,
from panda/src/bullet/config_bullet.h:28,
from panda/src/bullet/config_bullet.cxx:16,
from panda/src/bullet/bullet_composite.cxx:2:
panda/src/bullet/bulletVehicle.I: In member function ‘void BulletVehicleTuning::set_max_suspension_force(float)’:
panda/src/bullet/bulletVehicle.I:123: error: ‘class btRaycastVehicle::btVehicleTuning’ has no member named ‘m_maxSuspensionForce’
panda/src/bullet/bulletVehicle.I: In member function ‘float BulletVehicleTuning::get_max_suspension_force() const’:
panda/src/bullet/bulletVehicle.I:189: error: ‘const class btRaycastVehicle::btVehicleTuning’ has no member named ‘m_maxSuspensionForce’
In file included from panda/src/bullet/bullet_composite.cxx:4:
panda/src/bullet/bulletAllHitsRayResult.cxx: In constructor ‘BulletAllHitsRayResult::BulletAllHitsRayResult(const btVector3&, const btVector3&, const CollideMask&)’:
panda/src/bullet/bulletAllHitsRayResult.cxx:24: error: expected class-name before ‘(’ token
panda/src/bullet/bulletAllHitsRayResult.cxx:24: error: expected ‘{’ before ‘(’ token
panda/src/bullet/bulletAllHitsRayResult.cxx: At global scope:
panda/src/bullet/bulletAllHitsRayResult.cxx:24: error: expected ‘)’ before ‘,’ token
panda/src/bullet/bulletAllHitsRayResult.cxx:24: error: expected constructor, destructor, or type conversion before ‘)’ token
panda/src/bullet/bulletAllHitsRayResult.cxx: In member function ‘LPoint3f BulletAllHitsRayResult::get_from_pos() const’:
panda/src/bullet/bulletAllHitsRayResult.cxx:56: error: ‘m_rayFromWorld’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx: In member function ‘LPoint3f BulletAllHitsRayResult::get_to_pos() const’:
panda/src/bullet/bulletAllHitsRayResult.cxx:67: error: ‘m_rayToWorld’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx: In member function ‘bool BulletAllHitsRayResult::has_hits() const’:
panda/src/bullet/bulletAllHitsRayResult.cxx:78: error: ‘hasHit’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx: In member function ‘float BulletAllHitsRayResult::get_closest_hit_fraction() const’:
panda/src/bullet/bulletAllHitsRayResult.cxx:89: error: ‘m_closestHitFraction’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx: In member function ‘int BulletAllHitsRayResult::get_num_hits() const’:
panda/src/bullet/bulletAllHitsRayResult.cxx:100: error: ‘m_collisionObjects’ was not declared in this scope
In file included from panda/src/bullet/bullet_composite.cxx:4:
panda/src/bullet/bulletAllHitsRayResult.cxx: In member function ‘const BulletRayHit BulletAllHitsRayResult::get_hit(int) const’:
panda/src/bullet/bulletAllHitsRayResult.cxx:115: error: ‘m_collisionObjects’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx:116: error: ‘m_hitNormalWorld’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx:117: error: ‘m_hitPointWorld’ was not declared in this scope
panda/src/bullet/bulletAllHitsRayResult.cxx:118: error: ‘m_hitFractions’ was not declared in this scope
In file included from panda/src/bullet/bullet_composite.cxx:13:
panda/src/bullet/bulletContactResult.cxx: In constructor ‘BulletContactResult::BulletContactResult()’:
panda/src/bullet/bulletContactResult.cxx:25: error: expected class-name before ‘(’ token
panda/src/bullet/bulletContactResult.cxx:25: error: expected ‘{’ before ‘(’ token
panda/src/bullet/bulletContactResult.cxx: At global scope:
panda/src/bullet/bulletContactResult.cxx:25: error: expected unqualified-id before ‘)’ token
In file included from panda/src/bullet/bullet_composite.cxx:16:
panda/src/bullet/bulletCharacterControllerNode.cxx: In constructor ‘BulletCharacterControllerNode::BulletCharacterControllerNode(BulletShape*, float, const char*)’:
panda/src/bullet/bulletCharacterControllerNode.cxx:57: error: ‘class btKinematicCharacterController’ has no member named ‘setGravity’
In file included from panda/src/bullet/bullet_composite.cxx:16:
panda/src/bullet/bulletCharacterControllerNode.cxx: In member function ‘void BulletCharacterControllerNode::set_max_slope(float)’:
panda/src/bullet/bulletCharacterControllerNode.cxx:368: error: ‘class btKinematicCharacterController’ has no member named ‘setMaxSlope’
panda/src/bullet/bulletCharacterControllerNode.cxx: In member function ‘float BulletCharacterControllerNode::get_max_slope() const’:
panda/src/bullet/bulletCharacterControllerNode.cxx:379: error: ‘class btKinematicCharacterController’ has no member named ‘getMaxSlope’
panda/src/bullet/bulletCharacterControllerNode.cxx: In member function ‘float BulletCharacterControllerNode::get_gravity() const’:
panda/src/bullet/bulletCharacterControllerNode.cxx:389: error: ‘class btKinematicCharacterController’ has no member named ‘getGravity’
panda/src/bullet/bulletCharacterControllerNode.cxx: In member function ‘void BulletCharacterControllerNode::set_gravity(float)’:
panda/src/bullet/bulletCharacterControllerNode.cxx:399: error: ‘class btKinematicCharacterController’ has no member named ‘setGravity’
In file included from panda/src/bullet/bullet_composite.cxx:20:
panda/src/bullet/bulletGenericConstraint.cxx: In constructor ‘BulletGenericConstraint::BulletGenericConstraint(const BulletRigidBodyNode*, const TransformState&, bool)’:
panda/src/bullet/bulletGenericConstraint.cxx:33: error: no matching function for call to ‘btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody&, btTransform&, bool&)’
/usr/include/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h:321: note: candidates are: btGeneric6DofConstraint::btGeneric6DofConstraint()
/usr/include/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h:319: note: btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody&, btRigidBody&, const btTransform&, const btTransform&, bool)
/usr/include/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h:245: note: btGeneric6DofConstraint::btGeneric6DofConstraint(const btGeneric6DofConstraint&)
In file included from panda/src/bullet/bullet_composite.cxx:32:
panda/src/bullet/bulletSoftBodyNode.cxx: In member function ‘void BulletSoftBodyNode::append_anchor(int, BulletRigidBodyNode*, const LVector3f&, bool)’:
panda/src/bullet/bulletSoftBodyNode.cxx:669: error: no matching function for call to ‘btSoftBody::appendAnchor(int&, btRigidBody*&, btVector3, bool&)’
/usr/include/BulletSoftBody/btSoftBody.h:722: note: candidates are: void btSoftBody::appendAnchor(int, btRigidBody*, bool)
In file included from panda/src/bullet/bullet_composite.cxx:32:
panda/src/bullet/bulletSoftBodyNode.cxx: In static member function ‘static PointerTo<BulletSoftBodyNode> BulletSoftBodyNode::make_tri_mesh(BulletSoftBodyWorldInfo&, PTA_LVecBase3f, PTA_int, bool)’:
panda/src/bullet/bulletSoftBodyNode.cxx:848: error: no matching function for call to ‘btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo&, btScalar*&, int*&, int&, bool&)’
/usr/include/BulletSoftBody/btSoftBodyHelpers.h:109: note: candidates are: static btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo&, const btScalar*, const int*, int)
In file included from panda/src/bullet/bullet_composite.cxx:37:
panda/src/bullet/bulletTriangleMesh.cxx: In member function ‘virtual void BulletTriangleMesh::write(std::ostream&, int) const’:
panda/src/bullet/bulletTriangleMesh.cxx:204: error: ‘class btAlignedObjectArray<btIndexedMesh>’ has no member named ‘at’
In file included from panda/src/bullet/bullet_composite.cxx:40:
panda/src/bullet/bulletWheel.cxx: In member function ‘void BulletWheel::set_max_suspension_force(float)’:
panda/src/bullet/bulletWheel.cxx:112: error: ‘struct btWheelInfo’ has no member named ‘m_maxSuspensionForce’
panda/src/bullet/bulletWheel.cxx: In member function ‘float BulletWheel::get_max_suspension_force() const’:
panda/src/bullet/bulletWheel.cxx:123: error: ‘struct btWheelInfo’ has no member named ‘m_maxSuspensionForce’
In file included from panda/src/bullet/bullet_composite.cxx:41:
panda/src/bullet/bulletWorld.cxx: In member function ‘BulletAllHitsRayResult BulletWorld::ray_test_all(const LPoint3f&, const LPoint3f&, const CollideMask&) const’:
panda/src/bullet/bulletWorld.cxx:564: error: no matching function for call to ‘btSoftRigidDynamicsWorld::rayTest(const btVector3&, const btVector3&, BulletAllHitsRayResult&)’
/usr/include/BulletCollision/CollisionDispatch/btCollisionWorld.h:360: note: candidates are: void btCollisionWorld::rayTest(const btVector3&, const btVector3&, btCollisionWorld::RayResultCallback&) const
panda/src/bullet/bulletWorld.cxx: In member function ‘BulletContactResult BulletWorld::contact_test(PandaNode*) const’:
panda/src/bullet/bulletWorld.cxx:605: error: ‘class btSoftRigidDynamicsWorld’ has no member named ‘contactTest’
panda/src/bullet/bulletWorld.cxx: In member function ‘BulletContactResult BulletWorld::contact_test_pair(PandaNode*, PandaNode*) const’:
panda/src/bullet/bulletWorld.cxx:625: error: ‘class btSoftRigidDynamicsWorld’ has no member named ‘contactPairTest’
Storing dependency cache.
Elapsed Time: 14 min 4 sec
unsquander
 
Posts: 17
Joined: Sat Jan 30, 2010 10:57 pm

Postby unsquander » Wed May 18, 2011 2:33 pm

I added the fakeroot call to the 1.7.2 release version of makepanda.py

oscmd("fakeroot rpmbuild --define '_rpmdir "+pandasource+"' --buildroot '"+os.path.abspath("targetroot")+"' -bb panda3d.spec")


and I was able to create an rpm and everything appears to be ok, but of course I still get warnings about those missing 3rd party packages.

Thanks again for the help.
unsquander
 
Posts: 17
Joined: Sat Jan 30, 2010 10:57 pm

Postby CC » Thu May 19, 2011 5:20 pm

I'm trying to compile from cvs to install on Natty without downgrade python.

It still no compile but I near to finish a build successfully (I think).

Firs squish will not compile even if you have SSE for 64 bits archs. You have to edit config file in its source code main dir and add the line:

CXXFLAGS += -fPIC

It should look like this:

# default flags
CXXFLAGS ?= -O2
CXXFLAGS += -fPIC
ifeq ($(USE_ALTIVEC),1)
CPPFLAGS += -DSQUISH_USE_ALTIVEC=1
CXXFLAGS += -maltivec
endif
ifeq ($(USE_SSE),1)
CPPFLAGS += -DSQUISH_USE_SSE=2
CXXFLAGS += -msse
endif

And even if you cannot use squis you still can use panda, maybe some samples won't run, don't know.

EDIT: sorry, I forget about this error:

alpha.cpp:117:15: error: ‘INT_MAX’ was not declared in this scope

singlecolourfit.cpp:71:16: error: ‘INT_MAX’ was not declared in this scope

You can fix this by editing files alpha.cpp and singlecolourfit.cpp to add:

#include <limits.h>

Below others includes at the beginning of each file.

fmod is not necessary.

ffmpeg will not be autodetected by makepanda.py, there is not dev package for ffmpeg, it is called libav and similar (I will look for exact names later when I get to my Natty box), look for these in synaptic and install their *-dev. Run makepanda.py again, this time no warning about ffmpeg.

fcollada you really do not need it. Install blender from repo or the beta from blender.org, install the chicken exporter from sourceforge.net, when you need to convert collada to egg, import collada into blender, export from blender into egg.

Why fcollada and not collada dom?

randall reply is the solution for videodev.h includes, I found the same post in stackoverflow when searching for the same error in google.

I also get missing zlib warning and I have zlib dev installed, and it is 64 bits. Same for jpeg and tiff, they are not detected. Does no jpeg (and other image formats) mean no textures?

May 29, 2011:

The only solution I've found for jpeg, tiff and zlib to be detected correctly is to stop using makepanda.py (I don't know how to tell it to use alternative third party libraries) and build Panda 3D using ppremake. In the Config.pp file that ppremake process I wrote paths to libjpeg (actually, I'm using libjpeg-turbo that is a fork of libjpeg), and zlib, the same should apply to any other third party.

This opens the possibility to distribute libjpeg, zlib and so with the finished game rather than use the ones in the system.

It seems with the last cvs editing the includes of videodev.h is not more needed. But libjpeg and zlib and a few others are not detected by makepanda.py so I like ppremake more now.
CC
 
Posts: 1
Joined: Thu May 19, 2011 4:57 pm


Return to Compiling or Editing the Panda Source

Who is online

Users browsing this forum: No registered users and 1 guest