I am currently working on the shader* files in panda/src/pgraph, and I am trying to recompile the code with makepanda.py.
Everything’s fine except that the recompilation process start at 18%, and that means I have to wait 15 minutes each time.
If you edited the .cxx source files only, it won’t recompile all the way from that point. However, if you updated a .h header file (or .I inline function file), it will have to rebuild everything that depends on them, so that means almost the whole rest of Panda.
If you want more control over what to build when and what not to, use the ppremake build system. I use it for development as well.
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_mutexattr_destroy'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_mutexattr_init'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_once'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_mutexattr_settype'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libCg.so: undefined reference to `pthread_setspecific'
but where and how do I edit to link against pthread?
It seems like I can’t do that directly in the makefile.
One more question: I had a problem before, the compiler could not find fmod.h, but I had fmod.h in /usr/local/include/fmodex/fmod.h. So what I did was copying all the fmod*.h in /usr/local/include. But I should have set up FMOD_IPATH right? And in this case I should have had to go through the entire process gain right?
Thanks a lot, you are always really helpful…
By the way I don’t quite understand how Config.pp works.
I mean I made my own Config.pp that is trying (unsuccessfully) to override dtool/Config.pp.
say I want to get rid of this library,thus in my Config.pp I tried both:
#define HAVE_SQUISH
or #defer HAVE_SQUISH
but when I run ppremake in dtool I still get +squish.
So it seems like it’s not overriding the default Config.pp.
Just for clarification:
a variable that is defined with #define cannot be changed in the middle of the compilation process as if it was deferred with #defer. Is my understanding correct?
Last question:
what would be the minimum configuration if what I need is only c++ and CG shaders support?
By the way I am sure it’s reading my own Config.pp because I get
Reading /home/memecs/builds/panda3d-1.7.0/Config.pp (referred to by PPREMAKE_CONFIG)
You should be able to use either #define or #defer to override HAVE_SQUISH, and either line should effectively disable it. If it is not working, perhaps it is not reading that line. One common mistake is not entering a newline character following the last line of the file, rendering that line unreadable; could this be the problem?
You have a slight misunderstanding about #define and #defer. Regardless of the way in which a variable is defined, you are free to override it in your own Config.pp file. The only difference between the two is the way the variable’s value is interpreted if you do not override it.
The newline character doesn’t seem to be problem.
To make it sure I copied doc/Config.pp.sample in panda3d/Config.pp and added #define HAVE_SQUISH in the middle of the file, but still, it’s loading squish
So at this point my compilation time with ppremake is 4 minutes if I edit one shader* file in /pgraph.
It is definitely acceptable but I was wondering if is there any way to further speed it up?
Note that if you made a change in pgraphnodes that does not affect any other parts of Panda, you can simply cd to the “panda/src/pgraphnodes” directory and call “make install” there, rather than calling “make install” in “panda”.
Yeah, I didn’t do it. But do I need it if I do not care about the python interface?
By the way if i try to compile a simple program (with all the libs except libdirect) at the moment I get this kind of linker error:
../lib/libframework.so: undefined reference to `NodePath::set_two_sided(bool, int)'
Should I load other libraries?
and when I call “make” in …/direct I get this error
interrogate: error while loading shared libraries: libinterrogatedb.so: cannot open shared object file: No such file or directory
The first issue is because you probably forgot to link libpanda.so.
As for the second issue - first make sure that the lib directory is on the library path, then call “sudo ldconfig” to update the LD cache. Then try again.
Huh, are you sure you linked it correctly? I’ve checked some of these symbols, some are from libdtoolbase.so, some are from libpgui.so, some from libmovies.so, and those libraries are really picked up by linking libpanda.so.