Compile is fine but classes get registered twice!

Hello,

I just built Panda 1.7.0 from source, and at first run, when importing direct.directbase.DirectStart, I get a huge error message of the form:
Attempt to register type XXX more than once!

Then I get a segfault.
It seems from another post that the classes would get registered twice, but I have no idea how that would happen…

Here’s the whole error message:
http://paste.org/pastebin/view/20142

Edit: Problem is solved, I had two panda’s in my path.
In fact the problem was that after changing my .bashrc I needed to relogin(using source or restarting bash didn’t seem to help)

Something like this has been reported by others as well. We don’t know what causes it yet. What operating system are you building on? What steps did you follow to compile it and install it? Do you already have another version of Panda installed in another directory?

David

I’m on fedora 9, to build panda I used makepanda:
python makepanda/makepanda.py --everything
I got no errors except the fact that some plugins were missing (like ode, openal, and others)

I do have an older version of panda installed but it’s nowhere in my path(I just re-checked) I don’t think this would have any effect.

But then, the reason why I changed was that when I loaded panda1.5.2(my older version), I got this error message:
ImportError: /u/xvm/lib/panda3d-1.5.2/built/lib/libpandaexpress.so: undefined symbol: panda_version_1_5_2
Which is strange because its as if panda suddenly stopped working (it worked before, and there was no import error).

Could you tell me how you installed Panda3D after building? Did you install the RPM after building with makepanda?

Also, can you give me the output of this:

ls -Flh /usr/lib/panda3d/

I didn’t really “install” panda… Should I have? I just built it using makepanda then added panda’s path to the PYTHONPATH…

I haven’t found any better steps. According to your readme’s one only has to do:

here goes

-rw------- 1 xvm devg  39K 2010-06-29 12:01 libconverter.a
-rw------- 1 xvm devg 138K 2010-06-29 12:01 libcvscopy.a
-rw------- 1 xvm devg  55K 2010-06-29 12:01 libdxf.a
-rw------- 1 xvm devg  62K 2010-06-29 12:02 libdxfegg.a
-rw------- 1 xvm devg 274K 2010-06-29 12:01 libeggbase.a
-rw------- 1 xvm devg 364K 2010-06-29 12:02 libeggcharbase.a
-rw------- 1 xvm devg 656K 2010-06-29 12:04 libflt.a
-rw------- 1 xvm devg 136K 2010-06-29 12:04 libfltegg.a
-rw------- 1 xvm devg  38K 2010-06-29 12:04 libimagebase.a
-rw------- 1 xvm devg 376K 2010-06-29 12:04 liblwo.a
-rw------- 1 xvm devg 236K 2010-06-29 12:05 liblwoegg.a
lrwxrwxrwx 1 xvm devg   20 2010-06-29 12:00 libp3direct.so -> libp3direct.so.1.7.0*
-rwx------ 1 xvm devg 1.8M 2010-06-29 12:00 libp3direct.so.1.7.0*
lrwxrwxrwx 1 xvm devg   25 2010-06-29 11:16 libp3dtoolconfig.so -> libp3dtoolconfig.so.1.7.0*
-rwx------ 1 xvm devg 455K 2010-06-29 11:16 libp3dtoolconfig.so.1.7.0*
lrwxrwxrwx 1 xvm devg   19 2010-06-29 11:15 libp3dtool.so -> libp3dtool.so.1.7.0*
-rwx------ 1 xvm devg 245K 2010-06-29 11:15 libp3dtool.so.1.7.0*
lrwxrwxrwx 1 xvm devg   23 2010-06-29 11:48 libp3framework.so -> libp3framework.so.1.7.0*
-rwx------ 1 xvm devg 433K 2010-06-29 11:48 libp3framework.so.1.7.0*
lrwxrwxrwx 1 xvm devg   21 2010-06-29 11:48 libp3glstuff.so -> libp3glstuff.so.1.7.0*
-rwx------ 1 xvm devg 7.0K 2010-06-29 11:48 libp3glstuff.so.1.7.0*
lrwxrwxrwx 1 xvm devg   19 2010-06-29 12:01 libp3heapq.so -> libp3heapq.so.1.7.0*
-rwx------ 1 xvm devg  12K 2010-06-29 12:01 libp3heapq.so.1.7.0*
-rwx------ 1 xvm devg 1.5M 2010-06-29 12:05 libp3ptloader.so*
lrwxrwxrwx 1 xvm devg   20 2010-06-29 11:16 libp3pystub.so -> libp3pystub.so.1.7.0*
-rwx------ 1 xvm devg  25K 2010-06-29 11:16 libp3pystub.so.1.7.0*
lrwxrwxrwx 1 xvm devg   20 2010-06-29 11:44 libp3vision.so -> libp3vision.so.1.7.0*
-rwx------ 1 xvm devg 106K 2010-06-29 11:44 libp3vision.so.1.7.0*
-rw------- 1 xvm devg 780K 2010-06-29 12:02 libpalettizer.a
lrwxrwxrwx 1 xvm devg   19 2010-06-29 12:07 libpandaai.so -> libpandaai.so.1.7.0*
-rwx------ 1 xvm devg 302K 2010-06-29 12:07 libpandaai.so.1.7.0*
lrwxrwxrwx 1 xvm devg   20 2010-06-29 11:48 libpandaegg.so -> libpandaegg.so.1.7.0*
-rwx------ 1 xvm devg 3.2M 2010-06-29 11:48 libpandaegg.so.1.7.0*
lrwxrwxrwx 1 xvm devg   24 2010-06-29 11:19 libpandaexpress.so -> libpandaexpress.so.1.7.0*
-rwx------ 1 xvm devg 3.9M 2010-06-29 11:19 libpandaexpress.so.1.7.0*
lrwxrwxrwx 1 xvm devg   19 2010-06-29 11:45 libpandafx.so -> libpandafx.so.1.7.0*
-rwx------ 1 xvm devg 330K 2010-06-29 11:45 libpandafx.so.1.7.0*
-rwx------ 1 xvm devg 747K 2010-06-29 11:49 libpandagl.so*
-rwx------ 1 xvm devg 616K 2010-06-29 11:49 libpandamesa.so*
lrwxrwxrwx 1 xvm devg   24 2010-06-29 11:51 libpandaphysics.so -> libpandaphysics.so.1.7.0*
-rwx------ 1 xvm devg 2.0M 2010-06-29 11:51 libpandaphysics.so.1.7.0*
lrwxrwxrwx 1 xvm devg   21 2010-06-29 11:44 libpandaskel.so -> libpandaskel.so.1.7.0*
-rwx------ 1 xvm devg  45K 2010-06-29 11:44 libpandaskel.so.1.7.0*
lrwxrwxrwx 1 xvm devg   17 2010-06-29 11:44 libpanda.so -> libpanda.so.1.7.0*
-rwx------ 1 xvm devg  28M 2010-06-29 11:44 libpanda.so.1.7.0*
-rw------- 1 xvm devg  84K 2010-06-29 12:01 libpandatoolbase.a
-rw------- 1 xvm devg 162K 2010-06-29 12:01 libprogbase.a
-rw------- 1 xvm devg 355K 2010-06-29 12:06 libpstatserver.a
-rw------- 1 xvm devg 174K 2010-06-29 12:05 libpvrml.a
lrwxrwxrwx 1 xvm devg   23 2010-06-29 11:59 libtinydisplay.so -> libtinydisplay.so.1.7.0*
-rwx------ 1 xvm devg 8.1M 2010-06-29 11:59 libtinydisplay.so.1.7.0*
-rw------- 1 xvm devg 204K 2010-06-29 12:05 libvrmlegg.a
-rw------- 1 xvm devg 507K 2010-06-29 12:05 libxfile.a
-rw------- 1 xvm devg 278K 2010-06-29 12:05 libxfileegg.a
-rw------- 1 xvm devg 8.2K 2010-06-29 11:14 panda3d.py

Are you sure you have no other copies of Panda3D on the system? It could be that when importing, it is pulling in libraries from two locations.

Hmm, damn… I do have problems with my path… I’m currently trying to understand what script adds the old version path to mine, and it’s not my local bashrc…

On the other side, why would panda import itself twice? Doesn’t python import a module only once from the first occurence of it it finds in the sys.path?

Yeah, but it’s not just a matter of Python’s path - the dynamic loader’s library path also matters because some Panda libs link with other Panda libs.

Ok, conclusions:
-Having more than 1 panda installation in your path is bad