Compile error building with --optimize 1

g++ -o built/bin/p3dcparse -Lbuilt/lib -L/usr/X11R6/lib built/tmp/dcparse_dcparse.o -lp3direct -lpanda -lpandaexpress -lp3dtool -lp3dtoolconfig -lp3pystub -lpthread -ldl
built/lib/ undefined reference to `PyExc_StandardError’
collect2: ld returned 1 exit status

this is on ubuntu jaunty, with all dependent packages installed as described in a recent thread. I did a build before without --optimize 1 and that worked, but I needed symbols to debug a problem.

I commented out p3dcparse from to get it to continue, and then got:

g++ -shared -o built/lib/ -Lbuilt/lib -L/usr/X11R6/lib built/tmp/ptloader_config_ptloader.o built/tmp/ptloader_loaderFileTypePandatool.o built/lib/libfltegg.a built/lib/libflt.a built/lib/liblwoegg.a built/lib/liblwo.a built/lib/libdxfegg.a built/lib/libdxf.a built/lib/libvrmlegg.a built/lib/libpvrml.a built/lib/libxfileegg.a built/lib/libxfile.a built/lib/libdaeegg.a built/lib/libeggbase.a built/lib/libprogbase.a built/lib/libconverter.a built/lib/libpandatoolbase.a -lpandaegg -lpanda -lpandaexpress -lp3dtool -lp3dtoolconfig -lpthread -ldl
g++: built/lib/libdaeegg.a: No such file or directory

I may have gotten this error without --optimize 1.

The PyExc_StandardError issue was already resolved on CVS, get the latest version of dtool/src/pystub/pystub.cxx for the fixed version.

The daeegg bug has also been resolved on CVS already, and only occurs when you make a build without FCollada.
Find this line in

    TargetAdd('libp3ptloader.dll', input='libdaeegg.lib')

Replace it with:

    if (PkgSkip("FCOLLADA")==0): TargetAdd('libp3ptloader.dll', input='libdaeegg.lib')