|
From: Allin C. <cot...@wf...> - 2009-02-09 15:13:35
|
There's something wrong with the handling of the linker line for libgd in gnuplot's configure.in. Consider a system that has a correct gdlib.config: gnuplot does libgd_LIBS=`gdlib-config --libs` That's fine, but it should be the end of the story. However, further down in configure.in, the script unconditionally adds "-ljpeg" (when checking for JPEG support) and "-lpng" (when checking for PNG support). The problem is that if libgd is linked against libpng12.so, and if there also exists on the system the older (or compatibility) library libpng.so, then gnuplot will end up linked against both libpng12 and libpng. E.g., gdlib-config --libs gives: -lXpm -lX11 -lfontconfig -lfreetype -lpng12 -lz -lm and in src/Makefile we get: TERMLIBS = <...> -lz -lgd -lXpm -lX11 \ -lfontconfig -lfreetype -lpng12 -lz -lm -lfreetype -lpng I'm not sure exactly what's the best fix here, but it seems that adding "-lpng" should somehow be made conditional on the libgd_LIBS variable not already including a directive to link to (some variant of) libpng. -- Allin Cottrell Department of Economics Wake Forest University |