# Compiling slicer

**URL:** <https://discourse.slicer.org/t/compiling-slicer/2794>\
**Category:** Support\
**Created:** [May 10, 2018, 1:28pm UTC](https://discourse.slicer.org/t/compiling-slicer/2794 "2018-05-10T13:28:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vegoria](https://avatars.discourse-cdn.com/v4/letter/v/85f322/32.png) [@vegoria](https://discourse.slicer.org/u/vegoria)\
**Post date:** [May 10, 2018, 1:28pm UTC](https://discourse.slicer.org/t/compiling-slicer/2794/1 "2018-05-10T13:28:35Z")

</div>

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 to `itk::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?

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [May 10, 2018, 1:45pm UTC](https://discourse.slicer.org/t/compiling-slicer/2794/2 "2018-05-10T13:45:26Z")

</div>

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.
