makefile generation errors?

I’ve gotten panda to build on linux with none of the extra librarys. I am trying to build it with the tiff, jpeg, and png libs.

When i try to buildf i get errors like this:

/usr/local/panda/lib/libpnmimagetypes.so: undefined reference to TIFFWriteScanline' /usr/local/panda/lib/libpnmimagetypes.so: undefined reference toTIFFSetField’
/usr/local/panda/lib/libpnmimagetypes.so: undefined reference to TIFFScanlineSize' /usr/local/panda/lib/libpnmimagetypes.so: undefined reference toTIFFClientOpen’
/usr/local/panda/lib/libpnmimagetypes.so: undefined reference to TIFFSetErrorHandler' /usr/local/panda/lib/libpnmimagetypes.so: undefined reference toTIFFClose’

I’ve been able to work around these errors by adding " -ltiff -lpng -ljpeg" to the makefile lines in panda/src/testbed

however when i try this in pandatool/src/bam i get these errors:

make[1]: Entering directory /home/jsmith2/panda3d/pandatool/src/bam' g++ -o Opt3-Linux/bam-info Opt3-Linux/bam-info_bamInfo.o -L../pandatoolbase/Opt3-Linux -L../progbase/Opt3-Linux -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/lib/python2.1 -lprogbase -lpandatoolbase -lrecorder -lparametrics -lcollide -lchan -lchar -ldgraph -ldownloader -legg -lpnmimagetypes -lpnmimage -lpgraph -lgobj -lputil -llerp -lmathutil -llinmath -levent -lexpress -linterrogatedb -ldtoolutil -ldtoolbase -ldconfig -lpystub -lm -ltiff -lpng -ljpeg /usr/local/panda/lib/libegg.so: undefined reference toegg_start_primitive_body(void)’
/usr/local/panda/lib/libegg.so: undefined reference to egg_start_group_body(void)' /usr/local/panda/lib/libegg.so: undefined reference toegg_init_lexer(istream &, basic_string<char, string_char_traits, __default_alloc_template<true, 0> > const &)’
/usr/local/panda/lib/libegg.so: undefined reference to eggyywarning(basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const &)' /usr/local/panda/lib/libegg.so: undefined reference toeggyyerror(ostringstream &)’
/usr/local/panda/lib/libegg.so: undefined reference to eggyylex(void)' /usr/local/panda/lib/libegg.so: undefined reference toeggyyerror(basic_string<char, string_char_traits, __default_alloc_template<true, 0> > const &)’
/usr/local/panda/lib/libegg.so: undefined reference to eggyywarning(ostringstream &)' /usr/local/panda/lib/libegg.so: undefined reference toegg_start_texture_body(void)’
/usr/local/panda/lib/libegg.so: undefined reference to egg_error_count(void)' collect2: ld returned 1 exit status make[1]: *** [Opt3-Linux/bam-info] Error 1 make[1]: Leaving directory/home/jsmith2/panda3d/pandatool/src/bam’
make: *** [bam] Error 2

pview is working, i haven’t yet tackled the fun of genPyCode. I get the feeling that these errors are related to a deeper problem, but i’m not entirely sure what it is. gut instinct is that something in my system is out of date and confusing things. thoughts?

Hi Jen,

I think you have two unrelated problems.

(1) You may be the first one to try linking Panda with a dynamic libtiff.so instead of a static libtiff.a. I’ve seen problems in the past with transitive references with dynamic libraries; e.g. libpnmimagetypes uses some TIFF symbols and links with libtiff.so, everything’s fine; pview does not use any TIFF symbols and links with libpnmimagetypes.so, and the system complains unless you also link pview with libtiff.so. That’s why putting -ltiff on the link line for pview works as a workaround; a longer-term solution is to modify the Sources.pp rules to do this automatically. I will make this change.

(2) These missing egg symbols are the ones defined in panda/src/egg/lexer.cxx, which is a file generated by flex from lexer.lxx. I bet something went wrong with this file. Is it, for instance, zero-length or otherwise truncated? Try removing it and building again.

David

yup, you nailed it.

1 i also got errors for png and jpeg, it is the same problem. do you need to know what directories i needed to do this for? (they were mostly in pandatool)

2 the file was empty. i deleted it and everything worked after that.

now i get this:

make[1]: Entering directory /home/jsmith2/panda3d/pandatool/src/egg-palettize' g++ -o Opt3-Linux/egg-palettize Opt3-Linux/egg-palettize_eggPalettize.o -L../converter/Opt3-Linux -L../eggbase/Opt3-Linux -L../palettizer/Opt3-Linux -L../pandatoolbase/Opt3-Linux-L../progbase/Opt3-Linux -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/lib/python2.1 -lpalettizer -leggbase -lprogbase -lpandatoolbase -lconverter -legg -lpgraph -ldownloader -lgobj -llerp -llinmath -lputil -lexpress -lpnmimage -lpnmimagetypes -levent -lmathutil -ldtoolutil -ldtoolbase -ldconfig -lpystub -lm -ltiff -ljpeg -lpng /usr/bin/ld: cannot find -lprogbase collect2: ld returned 1 exit status make[1]: *** [Opt3-Linux/egg-palettize] Error 1 make[1]: Leaving directory/home/jsmith2/panda3d/pandatool/src/egg-palettize’
make: *** [egg-palettize] Error 2

this seemed a bit odd, since it looks like progbase has been linked before, for things such as bam, egg-optchar, etc.

i tried a make install on pandatool and then i was able to finish the build. any ideas why this would happen?

  1. Yes, the list of directories would be helpful, thanks.

  2. That is indeed strange–I’ve never seen that before, except as a temporary network burp when you’re compiling within a remote-mounted (e.g. NFS) directory. It’s not a remote directory, is it? Anything flaky about your PC’s hardware that might cause a hiccup accessing the hard disk?

David

in panda:
/src/testbed

in pandatool:
src/bam/Makefile
src/dxfprogs/Makefile
src/egg-optchar/Makefile
src/egg-palettize/Makefile
src/egg-qtess/Makefile
src/eggprogs/Makefile
src/fltprogs/Makefile
src/imageprogs/Makefile
src/lwoprogs/Makefile
src/vrmlprogs/Makefile

2 there is nothign flaky about my machine that i know of, but i wouldn’t be surprised. i did have to restart make a few times to ecit the makefiles, would htis affect anything? i did try to build it several times, and it broke each time. which seemed oddly consistant.