P1.1: ANSI C++ forbids declaration`wstring_hash'with no type

Hellas… Second post this morning :smiley:
After downloading the complete source for linux of 1.1 I tried compiling it because the CVS way doesn’t seem to work. But with a Debian “Sarge” (gcc 3.3.5, python 2.3.5) I didn’t manage to get this working.

Error message:

g++ -ftemplate-depth-30 -c -o built/tmp/dtoolutil_composite.o -I"/usr/include/python2.3" -Ithirdparty/linux-libs-a/nspr/include -Ibuilt/tmp -Idtool/src/dtoolutil -Ibuilt/include -O2 -DBUILDING_DTOOL dtool/src/dtoolutil/dtoolutil_composite.cxx
In file included from built/include/pmap.h:24,
                 from dtool/src/dtoolutil/pandaSystem.h:23,
                 from dtool/src/dtoolutil/pandaSystem.cxx:19,
                 from dtool/src/dtoolutil/dtoolutil_composite1.cxx:5,
                 from dtool/src/dtoolutil/dtoolutil_composite.cxx:1:
built/include/stl_compares.h:195: `wstring' was not declared in this scope
built/include/stl_compares.h:195: template argument 1 is invalid
built/include/stl_compares.h:195: template argument 1 is invalid
built/include/stl_compares.h:195: template argument 2 is invalid
built/include/stl_compares.h:195: ANSI C++ forbids declaration `wstring_hash' with no type
Elapsed Time: 48 sec

after using

./makepanda.sh --everything

Do I need some devel files to be installed? What are the requirements?

Regards, Bigfoot29

Hmm, apparently for some reason your system header files don’t define the standard typedef ‘wstring’. Try editing makepanda.py, and change the following line:

    ("HAVE_WSTRING",                   '1',                      '1'),


    ("HAVE_WSTRING",                   '1',                      'UNDEF'),


Thanks :slight_smile:

Hmmm… after parsing through the text I get a bunch of errors - with or without your changes, David.

I guess the following line is the error:

After that I get a bunch of errors like:

The question is: what path does it need to be? And when I set it, will it be used when the compilation is done? (means: Do I need to keep the files there then?) Right now the files are in /usr/src/panda3d-1.1.0/built/(lib). But what do I need to set the LD_LIBRARY_PATH to to have

a) the compilation working and
b) make the compilated code independend from the source directory to which the LD_LIBRARY_PATH points to?

Or is it wise to put the path to the (compilation) libs into the /etc/ld.so.conf?

Questions over questions… :slight_smile:

Regards, Bigfoot29

Makepanda: Caution: the built/lib directory is not in LD_LIBRARY_PATH
Makepanda: or /etc/ld.so.conf. You must add it before using panda.

No, that really means what it says — you need to do that before using panda, not before compiling panda. That’s not the error.

CAUTION: header file cppBison.h cannot be found in dtool/src/cppparser/cppPreprocessor.cxx IPATH=[‘built/tmp’, ‘dtool/src/cppparser’, ‘built/include’]

Makepanda produces a few warnings like the one above. They’re not errors, either. I should make it run a little quieter, but this isn’t a problem.

Let me also explain about LD_LIBRARY_PATH. According to your previous post, you’ve put the source code for panda into /usr/src/panda3d-1.1.0. So the compiled copy of panda will be in /usr/src/panda3d-1.1.0/built. Once it’s done compiling, you can run it before you install it, just to see if it’s working before you go to the trouble of installing it. To do that, you have to type this:

% setenv LD_LIBRARY_PATH /usr/src/panda3d-1.1.0/built/lib

After doing that, you can run the panda programs:

% cd /usr/src/panda3d-1.1.0/built/bin
% pview ~/my.egg

So that’s a good way to test panda just to see if it’s working. For a more permanent solution, you probably want to do a “proper install”. So there’s two ways to do that:

Option 1.

mv /usr/src/panda3d-1.1.0/built /usr/local/panda3d

After doing that, you probably want to add /usr/local/panda3d/lib to /etc/ld.so.conf. I don’t remember how that’s done, but basically, /etc/ld.so.conf is just a list of directories in some form or other.

Option 2.

Some people like to scatter the panda files all over their filesystem - ie, the binaries in /usr/bin, the libraries in /usr/lib/panda3d, and so forth. Currently, there’s no script to do this. However, there is a script to build a DEB archive or an RPM archive, and if you install the archive, the files will be distributed in the conventional way. Check out the instructions in INSTALL-MK

Hey both of you :slight_smile:

This seemed to fix it - at least this part of the story. After he compiled now for more or less 3.5 minutes I get another Error message:

Just on a side note: I used the complete source of 1.1 you provided for download. I made no changes to it except the one mentioned above. Do I need to have some devel files installed? If yes, what ones? wonders
He is looking for a openssl part “pem.h”, but there is no such file in the archive at all… However, I can find it in the separate “panda3d-1.1.0-tools-win32.zip” file. But on the other side: Its not in the linux version of this file (“panda3d-1.1.0-tools-linux.zip”)

Just a bit clueless :slight_smile:

Regards, Bigfoot29

Ah yes. the libssl-dev package needed to be installed… after that it compiled with a bunch of warnings, but it compiled.

The question is if this will generate trouble if a non-debian system (maybe) uses another version of the libssl libraries…

Regards, Bigfoot29

mkay - yay! It compiled :slight_smile:

However, after testing the compilated source, everything seems quite fine. However, running makepanda --installer asks me for python, because it says it can’t make a installer without it. However, having the 2.3 branch of python installed, I am not sure what is supposed to do.

However, following the manual, I need to have a Linux version that is NOT debian to get a rpm and windows to get a windows installer… isn’t there a way of creating them “cross platform”? - But as long as I have no clue about the panda error message, I am somewhat lost anyways :smiley:

Regards, Bigfoot29