[Rtk-users] ITK cmake settings
Marc Vila Oliva
marc.vila-oliva at creatis.insa-lyon.fr
Wed Feb 13 06:57:24 EST 2013
Hei Cyril,
There are known issues with ITK compiling with gcc-4.7. Can you try your
same configuration using an older version of gcc and g++?
I will try to compile ITK with your same set up and I'll let you know.
Cheers,
Marc
On Wed, 2013-02-13 at 11:04 +0000, MORY, CYRIL wrote:
> Oups. I realized that the "successful" ITK compilation had the fftw flags set to off.
> For some reason, when you change the compiler, and configure, CMAKE resets all the flags to their default values and you have to set them again. I hadn't noticed and had compiled without fftw, which is why it compiled fine.
>
> So I tried it all again. And the popped :
>
> I have used the following non-default CMAKE options :
> CMAKE_BUILDE_TYPE : Debug
> ITK_USE_64BITS_IDS : ON
> ITK_USE_FFTWD : ON
> ITK_USE_FFTWF : ON
> ITK_USE_REVIEW : ON
>
> This time I have left BUILD_SHARED_LIBRARIES set to OFF in order to stick as much as possible to your configuration.
>
> Here is the error :
>
> [ 69%] Building CXX object Modules/Filtering/DiffusionTensorImage/CMakeFiles/ITKDiffusionTensorImageHeaderTest1.dir/test/ITKDiffusionTensorImageHeaderTest1.cxx.o
> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3_threads
> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3f_threads
>
> And the build directory contains three fftw-related directories : "fftw", "fftwf" and "fftwd". The libraries seem to be all in "fftw". Here is the content of "fftw/lib64" :
>
> drwxr-xr-x 3 cyril users 4096 Feb 13 11:43 ./
> drwxr-xr-x 6 cyril users 4096 Feb 13 11:42 ../
> -rw-r--r-- 1 cyril users 2792444 Feb 13 11:42 libfftw3.a
> -rw-r--r-- 1 cyril users 2768478 Feb 13 11:43 libfftw3f.a
> -rwxr-xr-x 1 cyril users 916 Feb 13 11:43 libfftw3f.la*
> -rw-r--r-- 1 cyril users 48414 Feb 13 11:43 libfftw3f_threads.a
> -rwxr-xr-x 1 cyril users 1003 Feb 13 11:43 libfftw3f_threads.la*
> -rwxr-xr-x 1 cyril users 913 Feb 13 11:42 libfftw3.la*
> -rw-r--r-- 1 cyril users 48272 Feb 13 11:42 libfftw3_threads.a
> -rwxr-xr-x 1 cyril users 999 Feb 13 11:42 libfftw3_threads.la*
> drwxr-xr-x 2 cyril users 4096 Feb 13 11:43 pkgconfig/
>
>
> I'm running OpenSuse 12.2 64 bits, using gcc 4.7 and g++ 4.7, in case it matters.
> Cyril
>
> -----Message d'origine-----
> De : MORY, CYRIL
> Envoyé : mercredi 13 février 2013 11:10
> À : 'Simon Rit'
> Cc : rtk-users at openrtk.org
> Objet : RE: [Rtk-users] ITK cmake settings
>
> THanks for your answers Simon,
>
> Regarding the "conflict" I experienced : I have changed to only single precision FFTW, and it solved my problem, so I can't tell you more than what I remember.
> I used the FFTW shipped with ITK4, not a system fftw.
> During the compilation of ITK, the linking of some executable crashed, saying it couldn't locate "libfftw3f_threads" and "libfftw3_threads". I checked the itk build directory and these libraries were built correctly, but for some reason the linker couldn't find them. I thought that the CMAKE option to locate one could somehow be overwritten by the other, activated only the single precision one, emptied the build directory to clean the cache, and restarted the build. It built correctly.
>
> Cyril
>
>
> -----Message d'origine-----
> De : simon.rit at gmail.com [mailto:simon.rit at gmail.com] De la part de Simon Rit Envoyé : mercredi 13 février 2013 10:48 À : MORY, CYRIL Cc : rtk-users at openrtk.org Objet : Re: [Rtk-users] ITK cmake settings
>
> Hi Cyril,
> Very good questions.
>
> ITK_USE_REVIEW is ITK 3.20 related, I don't think it is required in ITK 4.
>
> It is very much advised to use FFTW because it is faster and more flexible in terms of projection dimensions. Both single and double precision can be turned on. It works for me, can you send us a report on the conflict you get? Do you use the system fftw or you let ITK4 download it?
>
> In order to track bugs in your code, yes, you need to compile ITK with debug or RelWithDebInfo because the crash might be in the itk part and even if not, the compilation might be difficult (if possible) with itk in release and rtk in debug.
>
> There is no recommendation with shared libraries except that we have encountered difficulties in the past with shared libraries and cuda.
> You'll probably have to add a -fPIC options to make it work. I am used to use static libraries by default but I don't have a real good argument for this.
>
> I would also recommend turning off BUILD_EXAMPLES and BUILD_TESTING for rapidity and ITK_BUILD_ALL_MODULES in itk4 to be sure that you have everything required.
> Don't hesitate to report any other option that we would have overlooked.
> Simon
>
> On Wed, Feb 13, 2013 at 10:21 AM, MORY, CYRIL <Cyril.Mory at philips.com> wrote:
> > Hi,
> >
> >
> >
> > I'm reinstalling ITK and RTK, and I was wondering which CMAKE options
> > in ITK were recommended for the use of RTK.
> >
> > The wiki says to switch ITK_USE_REVIEW on, which I did, but it doesn't
> > give any more advice.
> >
> >
> >
> > So here are my questions (some of which probably have nothing to do
> > with RTK, sorry) :
> >
> >
> >
> > - What about the FFTW-related options ? RTK uses FFTW to
> > ramp-filter the projections, right ? Should I activate the single
> > precision or the double precision FFTW ? (I tried activating both, it
> > lead to some kind of conflict and the linker couldn't find the
> > libraries)
> >
> > - In order to be able to track an error in my RTK code and see
> > where it crashes in ITK, do I need to compile ITK in Debug mode ?
> >
> > - Do you have recommendations about the BUILD_SHARED_LIBRARIES
> > option (other than the simple difference between shared and static
> > libraries) ?
> >
> > - Anything else ?
> >
> >
> >
> > Regards,
> >
> > ==========================================
> >
> > Cyril Mory
> >
> > PhD student at Philips Medisys and CREATIS
> >
> >
> >
> > Groupement Hospitalier Est
> >
> > Hôpital Cardiologique Louis Pradel
> >
> > Laboratoire CREATIS - Bât. B13
> >
> > CNRS UMR5220, INSERM U1044, INSA-Lyon, Univ. Lyon 1
> >
> > 28, Avenue du Doyen LEPINE
> >
> > 69677 Bron cedex FRANCE
> >
> >
> >
> > Office : +33 4 72 35 74 12
> >
> > Cell : +33 6 69 46 73 79
> >
> >
> >
> >
> > ________________________________
> > The information contained in this message may be confidential and
> > legally protected under applicable law. The message is intended solely
> > for the addressee(s). If you are not the intended recipient, you are
> > hereby notified that any use, forwarding, dissemination, or
> > reproduction of this message is strictly prohibited and may be
> > unlawful. If you are not the intended recipient, please contact the
> > sender by return e-mail and destroy all copies of the original message.
> >
> > _______________________________________________
> > Rtk-users mailing list
> > Rtk-users at openrtk.org
> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users
> >
>
> ________________________________
> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
>
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at openrtk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users
More information about the Rtk-users
mailing list