[Rtk-users] compilation issues in case of outside of ITK directory build
Julia Semyakishkina
prekrasnaya1985 at gmail.com
Thu Oct 25 23:16:55 EDT 2018
Ok, it works in case ITK Static -> RTK Static. When i try to build ITK
Shared -> RTK Shared, i have got:
[ 19%] Linking CXX executable ../../bin/rtkamsterdamshroud
CMakeFiles/rtkamsterdamshroud.dir/rtkamsterdamshroud.cxx.o: In function
`rtk::ThreeDCircularProjectionGeometryXMLFileReader::New()':
rtkamsterdamshroud.cxx:(.text._ZN3rtk45ThreeDCircularProjectionGeometryXMLFileReader3NewEv[_ZN3rtk45ThreeDCircularProjectionGeometryXMLFileReader3NewEv]+0xe):
undefined reference to `typeinfo for
rtk::ThreeDCircularProjectionGeometryXMLFileReader'
rtkamsterdamshroud.cxx:(.text._ZN3rtk45ThreeDCircularProjectionGeometryXMLFileReader3NewEv[_ZN3rtk45ThreeDCircularProjectionGeometryXMLFileReader3NewEv]+0x41):
undefined reference to `typeinfo for
rtk::ThreeDCircularProjectionGeometryXMLFileReader'
rtkamsterdamshroud.cxx:(.text._ZN3rtk45ThreeDCircularProjectionGeometryXMLFileReader3NewEv[_ZN3rtk45ThreeDCircularProjectionGeometryXMLFileReader3NewEv]+0xc9):
undefined reference to
`rtk::ThreeDCircularProjectionGeometryXMLFileReader::ThreeDCircularProjectionGeometryXMLFileReader()'
CMakeFiles/rtkamsterdamshroud.dir/rtkamsterdamshroud.cxx.o: In function
`std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const
rtk::GetProjectionsFileNamesFromGgo<args_info_rtkamsterdamshroud>(args_info_rtkamsterdamshroud
const&)':
rtkamsterdamshroud.cxx:(.text._ZN3rtk30GetProjectionsFileNamesFromGgoI28args_info_rtkamsterdamshroudEEKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKT_[_ZN3rtk30GetProjectionsFileNamesFromGgoI28args_info_rtkamsterdamshroudEEKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKT_]+0x3c1):
undefined reference to `rtk::RegisterIOFactories()'
CMakeFiles/rtkamsterdamshroud.dir/rtkamsterdamshroud.cxx.o: In function
`rtk::ProjectionsReader<itk::Image<double, 3u>
>::GenerateOutputInformation()':
rtkamsterdamshroud.cxx:(.text._ZN3rtk17ProjectionsReaderIN3itk5ImageIdLj3EEEE25GenerateOutputInformationEv[_ZN3rtk17ProjectionsReaderIN3itk5ImageIdLj3EEEE25GenerateOutputInformationEv]+0x8e1):
undefined reference to `rtk::RegisterIOFactories()'
collect2: error: ld returned 1 exit status
applications/rtkamsterdamshroud/CMakeFiles/rtkamsterdamshroud.dir/build.make:141:
recipe for target 'bin/rtkamsterdamshroud' failed
make[2]: *** [bin/rtkamsterdamshroud] Error 1
CMakeFiles/Makefile2:512: recipe for target
'applications/rtkamsterdamshroud/CMakeFiles/rtkamsterdamshroud.dir/all'
failed
make[1]: ***
[applications/rtkamsterdamshroud/CMakeFiles/rtkamsterdamshroud.dir/all]
Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
On Fri, Oct 26, 2018 at 2:59 AM Simon Rit <simon.rit at creatis.insa-lyon.fr>
wrote:
> Hi,
> It seems that you are trying to compile against an installed ITK_DIR. This
> is no longer possible, see this thread:
> https://github.com/SimonRit/RTK/issues/207
> Can you try to compile against your build directory (set ITK_DIR to the
> build directory)?
> Thanks,
> Simon
>
> On Thu, Oct 25, 2018 at 5:16 PM Julia Semyakishkina <
> prekrasnaya1985 at gmail.com> wrote:
>
>> Hello.
>> I can't build RTK in Linux. I've done all default steps described in
>> wiki, but on configure i've got:
>> CMake Error at utilities/lp_solve/CMakeLists.txt:9 (include):
>> include could not find load file:
>>
>> ITKModuleMacros
>>
>>
>> Hm.. it tries include module that exists in src ITK dir, not install...
>> I mean
>> "ls /usr/local/lib/cmake/ITK-4.13 | grep ITKModuleMacros" prints nothing
>> "ls /home/user/src/ITK/CMake | grep ITKModuleMacros" prints
>> ITKModuleMacros.cmake
>>
>> OK, i have just tried to add CMAKE_MODULE_PATH=/home/user/src/ITK/CMake
>> and got next error:
>>
>> CMake Error at CMakeLists.txt:250 (message):
>> Modules can only be built against an ITK build tree; they cannot be
>> built
>> against an ITK install tree.
>>
>> Let's look at the code:
>>
>> if(NOT ITK_SOURCE_DIR)
>> if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake)
>> message(FATAL_ERROR "Modules can only be built against an ITK build
>> tree; they cannot be built against an ITK install tree.")
>> endif()
>> list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
>> include(ITKModuleExternal)
>> else()
>> itk_module_impl()
>> endif()
>>
>> Yea, ITK_SOURCE_DIR is not set in my case, but why there is must be
>> ITKModuleMacros.cmake at my ITK_CMAKE_DIR dir that points to ITK
>> installation dir ?
>>
>> If i set ITK_CMAKE_DIR to /home/user/src/ITK/CMake where ITKModuleMacros
>> is, it resets back to ITK installation directory at
>> # --------------------------------------------------------
>> # Find ITK (required)
>> if(NOT ITK_SOURCE_DIR)
>> find_package(ITK 4.12.0 REQUIRED)
>> endif()
>>
>>
>> So, the only way i see is to build inside ITK, but i am not familiar with
>> this. Could anyone help me how to build RTK inside ITK.
>> _______________________________________________
>> Rtk-users mailing list
>> Rtk-users at public.kitware.com
>> https://public.kitware.com/mailman/listinfo/rtk-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20181026/fa6b84b3/attachment.html>
More information about the Rtk-users
mailing list