vtk_haru_HPDF_3DView_SetCamera: undefined reference to `sincos', `sqrtf' etc.
When building VTK from master, I'm getting the link errors
CMakeFiles/vtklibharu.dir/hpdf_page_operator.c.o: In function `InternalArc':
./debian/build/ThirdParty/libharu/vtklibharu/src/./ThirdParty/libharu/vtklibharu/src/hpdf_page_operator.c:2249: undefined reference to `sincos'
./debian/build/ThirdParty/libharu/vtklibharu/src/./ThirdParty/libharu/vtklibharu/src/hpdf_page_operator.c:2250: undefined reference to `sincos'
CMakeFiles/vtklibharu.dir/hpdf_u3d.c.o: In function `vtk_haru_HPDF_3DView_SetCamera':
./debian/build/ThirdParty/libharu/vtklibharu/src/./ThirdParty/libharu/vtklibharu/src/hpdf_u3d.c:696: undefined reference to `sincos'
./debian/build/ThirdParty/libharu/vtklibharu/src/./ThirdParty/libharu/vtklibharu/src/hpdf_u3d.c:652: undefined reference to `sqrtf'
./debian/build/ThirdParty/libharu/vtklibharu/src/./ThirdParty/libharu/vtklibharu/src/hpdf_u3d.c:682: undefined reference to `sqrtf'
./debian/build/ThirdParty/libharu/vtklibharu/src/./ThirdParty/libharu/vtklibharu/src/hpdf_u3d.c:688: undefined reference to `sqrtf'
collect2: error: ld returned 1 exit status
in ThirdParty/libharu
. See here for full detail. Apparently libm
is missing from the link line.