CBICA / HistoReg

Framework for registration of sequential digitized histology slices
Other
28 stars 7 forks source link

Errors happen in compilation on linux #23

Closed elephanttt closed 3 years ago

elephanttt commented 3 years ago

When I finished ITK building and run “make -j8” for HistoReg, I got the error: libGREEDY_LIB.a(GreedyAPI.cxx.o): In function GreedyApproach<2u, float>::RunDeformable(GreedyParameters&)': GreedyAPI.cxx:(.text._ZN14GreedyApproachILj2EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj2EfE13RunDeformableER16GreedyParameters]+0x6dd): undefined reference toLDDMMData<float, 2u>::poisson_pde_zero_boundary_initialize(itk::ImageBase<2u>, itk::Image<float, 2u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj2EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj2EfE13RunDeformableER16GreedyParameters]+0x1643): undefined reference to LDDMMData<float, 2u>::poisson_pde_zero_boundary_solve(void*, itk::Image<float, 2u>*, itk::Image<float, 2u>*)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj2EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj2EfE13RunDeformableER16GreedyParameters]+0x1c43): undefined reference toLDDMMData<float, 2u>::poisson_pde_zero_boundary_dealloc(void)' libGREEDY_LIB.a(GreedyAPI.cxx.o): In function GreedyApproach<3u, float>::RunDeformable(GreedyParameters&)': GreedyAPI.cxx:(.text._ZN14GreedyApproachILj3EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj3EfE13RunDeformableER16GreedyParameters]+0x709): undefined reference toLDDMMData<float, 3u>::poisson_pde_zero_boundary_initialize(itk::ImageBase<3u>, itk::Image<float, 3u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj3EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj3EfE13RunDeformableER16GreedyParameters]+0x1690): undefined reference to `LDDMMData<float, 3u>::poisson_pde_zero_boundary_solve(void, itk::Image<float, 3u>, itk::Image<float, 3u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj3EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj3EfE13RunDeformableER16GreedyParameters]+0x1c90): undefined reference to LDDMMData<float, 3u>::poisson_pde_zero_boundary_dealloc(void*)' libGREEDY_LIB.a(GreedyAPI.cxx.o): In functionGreedyApproach<4u, float>::RunDeformable(GreedyParameters&)': GreedyAPI.cxx:(.text._ZN14GreedyApproachILj4EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj4EfE13RunDeformableER16GreedyParameters]+0x6f5): undefined reference to LDDMMData<float, 4u>::poisson_pde_zero_boundary_initialize(itk::ImageBase<4u>*, itk::Image<float, 4u>*)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj4EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj4EfE13RunDeformableER16GreedyParameters]+0x167e): undefined reference toLDDMMData<float, 4u>::poisson_pde_zero_boundary_solve(void, itk::Image<float, 4u>, itk::Image<float, 4u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj4EfE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj4EfE13RunDeformableER16GreedyParameters]+0x1c7e): undefined reference to `LDDMMData<float, 4u>::poisson_pde_zero_boundary_dealloc(void)' libGREEDY_LIB.a(GreedyAPI.cxx.o): In function GreedyApproach<2u, double>::RunDeformable(GreedyParameters&)': GreedyAPI.cxx:(.text._ZN14GreedyApproachILj2EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj2EdE13RunDeformableER16GreedyParameters]+0x70f): undefined reference toLDDMMData<double, 2u>::poisson_pde_zero_boundary_initialize(itk::ImageBase<2u>, itk::Image<double, 2u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj2EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj2EdE13RunDeformableER16GreedyParameters]+0x16a1): undefined reference to LDDMMData<double, 2u>::poisson_pde_zero_boundary_solve(void*, itk::Image<double, 2u>*, itk::Image<double, 2u>*)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj2EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj2EdE13RunDeformableER16GreedyParameters]+0x1cab): undefined reference toLDDMMData<double, 2u>::poisson_pde_zero_boundary_dealloc(void)' libGREEDY_LIB.a(GreedyAPI.cxx.o): In function GreedyApproach<3u, double>::RunDeformable(GreedyParameters&)': GreedyAPI.cxx:(.text._ZN14GreedyApproachILj3EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj3EdE13RunDeformableER16GreedyParameters]+0x6e9): undefined reference toLDDMMData<double, 3u>::poisson_pde_zero_boundary_initialize(itk::ImageBase<3u>, itk::Image<double, 3u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj3EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj3EdE13RunDeformableER16GreedyParameters]+0x166a): undefined reference to `LDDMMData<double, 3u>::poisson_pde_zero_boundary_solve(void, itk::Image<double, 3u>, itk::Image<double, 3u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj3EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj3EdE13RunDeformableER16GreedyParameters]+0x1c74): undefined reference to LDDMMData<double, 3u>::poisson_pde_zero_boundary_dealloc(void*)' libGREEDY_LIB.a(GreedyAPI.cxx.o): In functionGreedyApproach<4u, double>::RunDeformable(GreedyParameters&)': GreedyAPI.cxx:(.text._ZN14GreedyApproachILj4EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj4EdE13RunDeformableER16GreedyParameters]+0x6e9): undefined reference to LDDMMData<double, 4u>::poisson_pde_zero_boundary_initialize(itk::ImageBase<4u>*, itk::Image<double, 4u>*)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj4EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj4EdE13RunDeformableER16GreedyParameters]+0x166e): undefined reference toLDDMMData<double, 4u>::poisson_pde_zero_boundary_solve(void, itk::Image<double, 4u>, itk::Image<double, 4u>)' GreedyAPI.cxx:(.text._ZN14GreedyApproachILj4EdE13RunDeformableER16GreedyParameters[_ZN14GreedyApproachILj4EdE13RunDeformableER16GreedyParameters]+0x1c78): undefined reference to `LDDMMData<double, 4u>::poisson_pde_zero_boundary_dealloc(void)' collect2: error: ld returned 1 exit status CMakeFiles/HistoReg.dir/build.make:248: recipe for target 'HistoReg' failed make[2]: [HistoReg] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/HistoReg.dir/all' failed make[1]: [CMakeFiles/HistoReg.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2

sarthakpati commented 3 years ago

What version of ITK did you build?

elephanttt commented 3 years ago

5.2.0

sarthakpati commented 3 years ago

ITK 5.2.0 is not currently supported in HistoReg. Please follow the instructions in https://github.com/CBICA/HistoReg#linux by compiling ITK from scratch.

elephanttt commented 3 years ago

I did follow the instructions.

sarthakpati commented 3 years ago

Hi,

If ITK is build from the Superbuild (the first make command in the instructions [ref]), it should build 4.13.1 [ref]. Could you give the exact steps you followed so that we can replicate on our end?

elephanttt commented 3 years ago

Thank you, I got it. Due to the slow clone speed, I manually downloaded relevant files from the web page and add it. By the way, is there any requirement for cmake version?

elephanttt commented 3 years ago

I have compiled ITK-4.13.2 from scratch, but the same error still exists.

elephanttt commented 3 years ago

Thank you for your help. I change the cmake version from 3.9 to 3.19. it works.

sarthakpati commented 3 years ago

Thanks for letting us know!