[vtkusers] float.h use could be incorrect? for 4.7.1 and 5.10.0

Bill Lorensen bill.lorensen at gmail.com
Mon Jun 25 10:22:08 EDT 2012


Can you provide a small, compilable example and cmakelists.txt file
that illustrates the problem.

Bill

On Mon, Jun 25, 2012 at 6:13 AM, Andrew Parker
<andy.john.parker at googlemail.com> wrote:
> I've added the following code into common/cmakelists.txt under the checks
> for float.h and subsequent setting of isnan and isinf.  I'm starting this as
> another thread due to divergence from the mistaken indication that infovis
> was the problem. See thread "Weird link error - possibly 4.7.1??" for
> background.
>
> I get a compiler linking error when building with vtk in my program that
> looks like this:
>
> vtk-5.10.0/bin/libvtkCharts.so.5.10.0: undefined reference to
> `vtkMath::IsInf(double)'
> vtk-5.10.0/bin/libvtkCharts.so.5.10.0: undefined reference to
> `vtkMath::IsNan(double)'
>
> If you check the source in vtkmath you'll see that these implementations are
> guarded by ifdefs.  These are failing for me, i.e are not set and hence no
> symbol in the library.
> I've added the following below to try to find the problem under the section
> that sets up isnan and isinf
>
> check_symbol_exists(isnan "cmath" HAVE_ISNAN_IN_CMATH)
> check_symbol_exists(isnan "math.h" HAVE_ISNAN_IN_MATH_H)
> CHECK_SYMBOL_EXISTS(isnan "float.h" VTK_HAS_ISNAN_2)
> message(STATUS "HAVE_ISNAN_IN_CMATH " ${HAVE_ISNAN_IN_CMATH})
> message(STATUS "HAVE_ISNAN_IN_MATH_H " ${HAVE_ISNAN_IN_MATH_H})
> message(STATUS "VTK_HAS_ISNAN_2 " ${VTK_HAS_ISNAN_2})
> check_symbol_exists(isinf "cmath" HAVE_ISINF_IN_CMATH)
> check_symbol_exists(isinf "math.h" HAVE_ISINF_IN_MATH_H)
> message(STATUS "HAVE_ISINF_IN_CMATH " ${HAVE_ISINF_IN_CMATH})
> message(STATUS "HAVE_ISINF_IN_MATH_H " ${HAVE_ISINF_IN_MATH_H})
>
> the output is:
>
> -- HAVE_ISNAN_IN_CMATH
> -- HAVE_ISNAN_IN_MATH_H 1
> -- VTK_HAS_ISNAN_2
> -- HAVE_ISINF_IN_CMATH
> -- HAVE_ISINF_IN_MATH_H 1
> -- Configuring done
> -- Generating done
>
> Therefore I conclude that float.h is incorrect for some reason and as you
> can see math.h seems to work, any thoughts, advice??  I could really do with
> being able to compile my code.  To be clear, no errors when building vtk,
> this is when using it in my own code all compiled, including vtk with 4.7.1
>
> Cheers,
> Andy
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtkusers mailing list