You are not logged in.
Uninstalled an old manually compiled version of VTK, replacing it with a proper Arch package. Quite a lot of it compiled alright, then I got a bunch of errors all saying that png_set_gray_1_2_4_to_8 is missing. There are no complaints of other PNG symbols missing; I have libpng 1.4.0 installed and apps depending on it are fine.
An actual error line:
/usr/local/src/vtk/src/VTK/IO/vtkPNGReader.cxx:119: error: 'png_set_gray_1_2_4_to_8' was not declared in this scope
png_set_gray_1_2_4_to_8 is supposed to be defined in png.h (or whatever it includes) but vtkPNGReader.cxx isn't seeing it.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
you have to patch it as png_set_gray_1_2_4_to_8 was renamed to png_set_expand_gray_1_2_4_to_8.
more about the other changes:
Give what you have. To someone, it may be better than you dare to think.
Offline
Aha, the ol' rename an API function trick.
Thanks, that was the clue I needed. Now it compiles, at least up to the next trouble spot.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
Have you got a working PKBUILD? I replaced the line
patch -Np0 -i ./vtk-libpng-1.4.0.patch
with the homebrewed:
cd $srcdir/VTK
for i in Utilities/vtkpng/png.h Utilities/vtkpng/vtk_png_mangle.h Utilities/vtkpng/pngrtran.c
do
sed -i 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' $i
done
but no luck. Where do I read the error messages from cmake build?
By the way, the same trick worked fine with paraview.
Last edited by domanov (2010-02-05 13:58:53)
Offline
I did a #define hack redefining the one function as the other, and made some progress, but still the house of cards came a-tumblin' down.
Paraview is on my list of stuff to install and toy around with. VTK is needed for several other things, though. Last year I did get VTK to compile and run fine using the official site's tarball, not Arch. That was fine until recently when now I'm trying Arch's packages for certain apps needing VTK. I'll work on this some more. If I can't figure out how to fix the VTK PKGBUILD, I'll just hack the apps' PKGBUILDs to not depend on VTK.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
Hi darenw and domanov,
Patching the Utilities/vtkpng subtree is of no use if you have -DVTK_USE_SYSTEM_PNG:BOOL=ON, as is in the PKGBUILD in AUR, as it isn't compiled anyway. The patch provided made me compile vtk with the new libpng.
Another way to workaround the problem is setting -DVTK_USE_SYSTEM_PNG:BOOL=OFF. I have not tested this. If you go this way, patching shouldn't be necessary, as vtk will build its own libpng.
Offline
I also had problems with the updated libpng and, leepesjee, your solution worked (paraview was rebuilt and works ok now), thanks a lot.
Offline