[vtk-developers] Issue with Linux extra linker flags

Joachim Pouderoux joachim.pouderoux at kitware.com
Fri Jul 10 05:42:19 EDT 2015


Hi,

I have issues when compiling VTK in release mode with gcc 4.9.2

Linking CXX shared library ../../lib/libvtkFiltersParallelMPI-6.3.so
CMakeFiles/vtkFiltersParallelMPI.dir/vtkDistributedDataFilter.cxx.o: In
function
`vtkDistributedDataFilter::AddConstantUnsignedCharPointArray(vtkUnstructuredGrid*,
char const*, unsigned char)':
vtkDistributedDataFilter.cxx:(.text+0x2a03): warning: memset used with
constant zero length parameter; this could be due to transposed parameters
collect2: error: ld returned 1 exit status
Filters/ParallelMPI/CMakeFiles/vtkFiltersParallelMPI.dir/build.make:214:
recipe for target 'lib/libvtkFiltersParallelMPI-6.3.so.1' failed
make[2]: *** [lib/libvtkFiltersParallelMPI-6.3.so.1] Error 1

This warning is due to a gcc bug that exists in many versions and the error
arises because a linker option is automatically added by VTK on linux :
"-Wl,--fatal-warnings" (see vtkCompilerExtras.cmake:15).

Several users had the same issues and propose different fixes:
  see https://github.com/Kitware/VTK/pull/7
or

https://github.com/gentoo/gentoo-portage-rsync-mirror/blob/master/sci-visualization/paraview/files/paraview-4.1.0-no-fatal-warnings.patch

I prefer the second patch that consists in removing this --fatal-warnings
options. I do not understand why this is performed automatically and cannot
be disabled.
Any objection in removing this linker flag by default?

Best,

*Joachim Pouderoux*

*PhD, Technical Expert*
*Kitware SAS <http://www.kitware.fr>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150710/5862bcc1/attachment-0001.html>


More information about the vtk-developers mailing list