Cannot find the python SDK

Return to Compiling or Editing the Panda Source

Cannot find the python SDK

Postby allen » Fri May 27, 2005 4:25 pm

That's the message I get when I do a:

makepanda/makepanda.py --everything

Python exists on my system. I can run it from the command line and get it's >>> prompt. Nothing I can see in the docs and I'm new enough to Linux to be stumped. I'm running Mandrake 10.0 Community.
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

xyz

Postby Josh Yelon » Fri May 27, 2005 4:40 pm

This means that in order to develop C++ libraries for python, you need some C++ header files that come with python. These header files are called the "python SDK".

Linux distributions often include two packages like:

python2.2
python2.2-dev

The second package, the 'dev' package, is the one that contains the SDK (the header files). Now, I don't know what mandrake calls this package. But you need to find it.

More difficult is the fact that mandrake doesn't include several of the tools you need to build panda. For example, mandrake doesn't include 'bison' and 'flex', tools which are normally standard under linux but for some reason are missing from mandrake.
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby allen » Fri May 27, 2005 5:40 pm

Let's say, some time in the future, after I've got Panda working, I decide to try to build a Mandrake rpm. What am I letting myself in for? Tough? Easy?
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

xyz

Postby Josh Yelon » Fri May 27, 2005 6:50 pm

On redhat, building an rpm is trivial. All you have to do is type

rpm -tb panda3d-1.0.4.tar.gz

That's all. It does the rest. The RPM ends up in /usr/src/redhat/RPMS

I tried the same thing on mandrake, and it gave some error message that made it clear that the rpm-build tools are not installed. I spent a few hours trying to figure out how to get the rpm-build tools, but I failed.

So really, it's a question of knowing where to get the right software.

Update: when you figure it out, tell me. I'd love to distribute a mandrake RPM.
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby Guest » Sat May 28, 2005 1:05 pm

It appears I do have python on my system.

I fired up python from the command line and got it to talk to me. Going to the Mandrake RPM gui tool that lists installed RPMs I pulled up the following results:

python-2.3.3-2mdk
python-base-2.3.3-2mdk
python-numeric-23.1-2mdk

Looking at the RPMs that aren't installed that have "python" in their name, there's:

libpython2.3-devel-2.3.3-2mdk

The description on this one is:The libraries and header files needed for Python development

Nothing has "SDK" as part of the name though. I hate to blindly install stuff, hoping to hit the right combination.

Also, I seem to be on Python 2.3 and you're telling me to look for Python 2.2. Is there a problem with using 2.3? I downloaded the latest source.
Guest
 

xyz

Postby Josh Yelon » Sun May 29, 2005 2:44 pm

libpython2.3-devel-2.3.3-2mdk

That's exactly what you need.

Now, after you install that, it will probably fail again at a different place, saying something like "zlib.h not found" or maybe "png.h not found" or some other missing header files. Look for the relevant "-devel-" packages. That's what's missing.
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby allen » Mon May 30, 2005 5:31 pm

You were right about it pooping out someplace else :(

I'm running Mandrake 10.0.

Here's what I get that seems related to the problem:

Starting compile in "dtool/src/prc" (1 sec):

g++ -ftemplate-depth-30 -c -o built/tmp/prc_composite1.o -I"/usr/include/python2.3" -Ithirdparty/linux-libs-a/nspr/include -Ibuilt/tmp -Idtool/src/prc -Ibuilt/include -O2 -DBUILDING_DTOOLCONFIG dtool/src/prc/prc_composite1.cxx
In file included from dtool/src/prc/configPage.cxx:23,
from dtool/src/prc/prc_composite1.cxx:4:
dtool/src/prc/prcKeyRegistry.h:31:25: openssl/evp.h: No such file or directory
In file included from dtool/src/prc/configPage.cxx:23,
from dtool/src/prc/prc_composite1.cxx:4:
dtool/src/prc/prcKeyRegistry.h:60: error: `EVP_PKEY' has not been declared
dtool/src/prc/prcKeyRegistry.h:60: error: ISO C++ forbids declaration of `pkey' with no type
dtool/src/prc/prcKeyRegistry.h:63: error: ISO C++ forbids declaration of `EVP_PKEY' with no type
dtool/src/prc/prcKeyRegistry.h:63: error: expected `;' before '*' token
dtool/src/prc/prcKeyRegistry.h:73: error: ISO C++ forbids declaration of `EVP_PKEY' with no type
dtool/src/prc/prcKeyRegistry.h:73: error: expected `;' before '*' token
In file included from dtool/src/prc/prc_composite1.cxx:4:
dtool/src/prc/configPage.cxx: In member function `bool ConfigPage::read_prc(std::istream&)':
dtool/src/prc/configPage.cxx:142: error: `EVP_MD_CTX' has not been declared
dtool/src/prc/configPage.cxx:144: error: `EVP_MD_CTX' undeclared (first use this function)
dtool/src/prc/configPage.cxx:144: error: (Each undeclared identifier is reported only once for each function it appears in.)
dtool/src/prc/configPage.cxx:144: error: expected primary-expression before ')' token
dtool/src/prc/configPage.cxx:144: error: `EVP_sha1' undeclared (first use this function)
dtool/src/prc/configPage.cxx:144: error: `EVP_VerifyInit' undeclared (first use this function)
dtool/src/prc/configPage.cxx:203: error: `EVP_PKEY' undeclared (first use this function)
dtool/src/prc/configPage.cxx:203: error: `pkey' undeclared (first use this function)
dtool/src/prc/configPage.cxx:203: error: 'class PrcKeyRegistry' has no member named 'get_key'
dtool/src/prc/configPage.cxx:204: error: expected primary-expression before ')' token
dtool/src/prc/configPage.cxx:204: error: expected `)' before ""
dtool/src/prc/configPage.cxx:206: error: expected primary-expression before ')' token
dtool/src/prc/configPage.cxx:208: error: `EVP_VerifyFinal' undeclared (first use this function)
dtool/src/prc/configPage.cxx:222: error: expected primary-expression before ')' token
dtool/src/prc/configPage.cxx:222: error: expected `;' before "_md_ctx"
dtool/src/prc/configPage.cxx: In member function `void ConfigPage::read_prc_line(const std::string&)':
dtool/src/prc/configPage.cxx:387: error: `EVP_MD_CTX' undeclared (first use this function)
dtool/src/prc/configPage.cxx:387: error: expected primary-expression before ')' token
dtool/src/prc/configPage.cxx:387: error: `EVP_VerifyUpdate' undeclared (first use this function)
[root@pcp0011435770pcs panda3d-1.0.4]#
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

xyz

Postby Josh Yelon » Mon May 30, 2005 7:42 pm

This is the relevant part of the error message:

dtool/src/prc/prcKeyRegistry.h:31:25: openssl/evp.h: No such file or directory

You need to get all the missing header files. In this case, it appears to be openssl-related.

- Josh
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby allen » Mon May 30, 2005 9:12 pm

OK, got past that one, on to the next one....is there an emoticon for "sigh"?

../../../built/bin/interrogate: error while loading shared libraries: libpystub.so: cannot open shared object file: No such file or directory


I did a google of libpystub.so and came up dry after I perused all the RPMs installed and not installed and didn't find libpystub.so in any of them with "python" in the RPM name. Then I had the bright idea of searching my own system and, as I'm sure you know, found it in panda3d-1.0.4/built/lib/libpystub.so

In the built/lib directory, libpystub.so and libdtoolconfig.so have ownerships of root/root while the rest of the files are owned by my user-id. Could this have come from compiling initially under my user-id and then compiling a second time under root?

I tried compiling under both root and my user-id. No joy.

Suggestions?
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

xyz

Postby Josh Yelon » Mon May 30, 2005 10:57 pm

OK, I've seen that one before.

Here's the deal: makepanda builds the library 'libpystub.so', then makepanda builds the executable 'interrogate' which uses 'libpystub.so', then makepanda tries to run interrogate. In order for it to be able to run 'interrogate', the directory containing 'libpystub.so' needs to be in your shared-library path. Now, supposedly, makepanda contains the necessary code to put the built/lib directory into your LD_LIBRARY_PATH. But apparently, that code isn't working. Somebody reported this problem before, but then the problem spontaneously went away, so we couldn't diagnose it. Could you analyze?
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby allen » Tue May 31, 2005 5:42 am

Tell me how to help and assume I'm fairly light in my exposure to Linux.

just did a "echo $LD_LIBRARY_PATH" as both user and root and it came back blank for both.
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

xyz

Postby Josh Yelon » Tue May 31, 2005 1:01 pm

I'm not sure this is going to be easy.

Makepanda doesn't set LD_LIBRARY_PATH permanently. It only sets it for its child processes. Either it's not really setting it, or it's setting it and it's having no effect.

I suppose I'd delete 'interrogate' and replace it with a script that prints out LD_LIBRARY_PATH. That will tell you whether or not makepanda is really setting LD_LIBRARY_PATH. The script would look like this:

#!/bin/sh
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
exit 1

The 'exit 1' is an error code. It will prevent makepanda from going on and on and on.
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby Guest » Tue May 31, 2005 3:18 pm

Lemme make sure I understand.

Delete or rename /built/bin/interrogate with a bash shell script which'll be named "interrogate" as well?

And the script contains the three lines in your post?

And then I run a makepanda --everything with no other changes?
Guest
 

xyz

Postby Josh Yelon » Tue May 31, 2005 9:30 pm

Exactly right. You can always get the real 'interrogate' back by deleting it and letting 'makepanda' rebuild it. This is just a test to see what's going on.

Sorry it's taking me so long to respond. I'm visiting relatives. Starting tomorrow, I'm not going to be available hardly at all, so you may need to seek help from other people on this forum. There are some smart ones here.
Josh Yelon, Teacher, Carnegie Mellon Entertainment Technology Center
Josh Yelon
 
Posts: 1360
Joined: Wed Mar 30, 2005 8:30 pm

Postby allen » Wed Jun 01, 2005 6:43 pm

I appreciate any assistance, Josh.

OK, here's the results:

Code: Select all
erTo.h weakPointerToBase.h weakPointerToVoid.h weakReferenceList.h windowsRegistry.h zStream.h zStreamBuf.h express_composite1.cxx express_composite2.cxx
LD_LIBRARY_PATH=



Looks like LD_LIBRARY_PATH is blank.

Since Josh looks to be unavailable for a bit, does anyone have some thoughts on this?
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Wed Jun 01, 2005 7:19 pm

Hmm. Can you show me (a) the value of LD_LIBRARY_PATH before you start makepanda, and (b) the contents of the file /etc/ld.so.conf ? That is, I'd like to see the output of the following two commands:
Code: Select all
env | grep LD_LIBRARY_PATH
cat /etc/ld.so.conf

Also, exactly what parameters are you passing to makepanda?

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Wed Jun 01, 2005 10:23 pm

to the "env | grep LD_LIBRARY_PATH " I got nothing.

I did an "env" just to make sure I hadn't mispelled the search string and nothing even close.

to the "cat /etc/ld.so.conf"

Code: Select all
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/lib/qt3/lib
/usr/local/lib
/usr/local/lib/libmcrypt
/home/allen/Downloads/Panda/panda3d-1.0.4/built/lib


I start makepanda with "makepanda/makepand.py --everything

I've got a "built" directory so it seems to me that the compile worked at least once but i couldn't get panda to start in the manner that the docs suggested it should so I figured something was less then right.
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Wed Jun 01, 2005 11:05 pm

Ah ha! I think I have it.

Try running, as root, the command "ldconfig". Then try to run makepanda again as a normal user.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Thu Jun 02, 2005 7:23 am

results of running ldconfig as root:

ldconfig: /usr/lib/libmcrypt.so.4 is not a symbolic link


did a "makepanda/makepanda.py --everything" as user and got the following:

Code: Select all
Starting compile in "panda/src/chan" (15 min 15 sec):

g++ -ftemplate-depth-30 -c -o built/tmp/chan_composite1.o -I"/usr/include/python2.3" -Ithirdparty/linux-libs-a/nspr/include -Ibuilt/tmp -Ipanda/src/chan -Ibuilt/include -O2 -DBUILDING_PANDA panda/src/chan/chan_composite1.cxx
built/include/pandaNode.h: In member function `virtual TypeHandle PandaNode::force_init_type()':
built/include/pandaNode.h:413: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://qa.mandrakesoft.com/> for instructions.


The above seems like the relevent stuff. If more is needed, let me know and I'll run the compile again and post more.

Funny thing is, after my very first compile I was getting what seemed to be some Panda-related activity. The mouse pointer would turn into a cross-hair pointer while within the console window. If I clicked within the window, while the mouse pointer was a crosshair, that would terminate whatever it was that was running.

Allen
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Thu Jun 02, 2005 7:29 am

Hmm, a compiler core dump, not such a good thing. What a bucket of worms this is! What version of the compiler are you running?
Code: Select all
gcc --version

Did you try making clean by blowing away the built directory first?

The crosshairs thing certainly isn't Panda behavior. I've never heard of that before. Does it happen when you compile other programs?

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Thu Jun 02, 2005 10:32 am

gcc --version
gcc (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


I did'nt blow away the "built" directory. Should I have?

re: the crosshairs thing...

Nope. Never saw it before. I just assumed it was Panda-related. Not, hey?
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Thu Jun 02, 2005 11:32 am

Yes, please do try starting from a clean build.

Nope, never heard of that crosshairs thing. Could it be a Python thing under Mandrake for some reason?

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Thu Jun 02, 2005 11:46 am

Never saw the crosshair mouse pointer before and don't have a clue why it might show up.

Scrubbed "built" and fired off another build. It pooped out on what looked like the absence of the TIFF libraries. I installed everything that looke vaguely TIFF-related, scrubbed "built" again and have another build going.

I'd cross my fingers but I can't type that way.
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby allen » Thu Jun 02, 2005 12:45 pm

Starting compile in "panda/src/glstuff" (45 min 4 sec):

g++ -ftemplate-depth-30 -c -o built/tmp/glstuff_glpure.o -I"/usr/include/python2.3" -Ithirdparty/linux-libs-a/nvidiacg/include -Ithirdparty/linux-libs-a/nspr/include -Ibuilt/tmp -Ipanda/src/glstuff -Ibuilt/include -O2 panda/src/glstuff/glpure.cxx
g++ -shared -o built/lib/libglstuff.so -Lbuilt/lib built/tmp/glstuff_glpure.o -lpanda -lpandafx -lpandaexpress -ldtoolconfig -ldtool -Lthirdpartynvidiacg/lib -lCgGL -lCg -Lthirdparty/linux-libs-a/nspr/lib -lpandanspr4 -lGL -lGLU
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status


OK, need some help here.

I know Panda's looking for a library but using the search string "gl" pulls up too big a list to install it all. There's a heap of stuff with "glibs" in the name but it's too big a list to install all of unless I have too.
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Thu Jun 02, 2005 2:15 pm

It's looking for a file named libGL.so or libGL.a. On RedHat those files are in /usr/lib; they may be elsewhere (or not installed by default) on Mandrake.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Thu Jun 02, 2005 2:48 pm

In Mandrake libGL.so is in /usr/X11R6/lib

I can't find libGL.a on the system.
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Thu Jun 02, 2005 2:53 pm

libGL.so is sufficient. You only need one or the other.

Probably makepanda needs to be modified to put /usr/X11R6/lib on the -L path when you are compiling on Mandrake. In the meantime, you can cheese this out by linking the critical files into /usr/lib. Do the following command as root:
Code: Select all
ln -s /usr/X11R6/lib/libGL*.so /usr/lib


David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Thu Jun 02, 2005 3:56 pm

could I stick that in /etc/ld.so.conf?
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Postby drwr » Thu Jun 02, 2005 4:02 pm

You could try that--were you the one who added the panda build directory in there? Remember always to re-run ldconfig after you modify ld.so.conf.

But I'm not sure if that would help; you need to tell the compiler where to find the library, not the loader. I'm not sure if gcc looks up in ld.so.conf for its libraries. It might.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby allen » Fri Jun 03, 2005 10:49 pm

Yeah, I added build/lib to the ld.so.conf. I didn't add /usr/X11R6/lib to the ld.so.conf since the consensus seemed to be that it wouldn't do any good.

I did the "ln -s /usr/X11R6/lib/libGL*.so /usr/lib", zapped the build directory and did a makepanda/makepanda.py --everything. Pooped out in three minutes with:

Code: Select all
../../../built/bin/interrogate: error while loading shared libraries: libpystub.so: cannot open shared object file: No such file or directory


So I ran a locate on libystub.so and it's in panda3d-1.0.4/built/lib/libpystub.so

The compile ran lot's farther before I did the "ln -s /usr/X11R6/lib/libGL*.so /usr/lib"

Are the two related? Should I rm the symlinks?

Allen
allen
 
Posts: 24
Joined: Mon May 23, 2005 12:46 pm

Next

Return to Compiling or Editing the Panda Source

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

cron