Compiling slicer

Hi. I’m trying to compile slicer (using linux mint). And keep getting error:

CMakeFiles/N4ITKBiasFieldCorrectionLib.dir/N4ITKBiasFieldCorrection.cxx.o: In function ModuleEntryPoint': N4ITKBiasFieldCorrection.cxx:(.text+0xacb9): undefined reference toitk::ResourceProbe<double, double>::UpdateMinimumMaximumMeasuredValue(double)’
/usr/bin/ld: CMakeFiles/N4ITKBiasFieldCorrectionLib.dir/N4ITKBiasFieldCorrection.cxx.o: relocation R_X86_64_PC32 against undefined symbol `_ZN3itk13ResourceProbeIddE33UpdateMinimumMaximumMeasuredValueEd’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[5]: *** [lib/Slicer-4.9/cli-modules/libN4ITKBiasFieldCorrectionLib.so] Error 1
make[4]: *** [Modules/CLI/N4ITKBiasFieldCorrection/CMakeFiles/N4ITKBiasFieldCorrectionLib.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs…

could anybody help how to get rid of this problem?

Have you tried the SlicerPreview/nightly build? It looks like the SlicerPreview linux build is ok (although the tests have not run in the past few days)… So this may be a local issue.

Those kind of errors may happen when changes are made to the build environment (e.g. upgrading the compiler). CMake-generated projects are not very good at cleaning/updating stale builds, and often it is necessary to delete the ITKv4-build directory or the whole superbuild directory and start over.