[Insight-users] Configure ITK for 64-bit Linux

Sara Rolfe smrolfe at u.washington.edu
Tue May 24 12:57:11 EDT 2011


Update:  The external library solution does not appear to be working  
for me.  When I run ccmake it appears to find the library location,  
but I'm still getting the same error:

make[2]: *** No rule to make target `/usr/lib/libuuid.so', needed by  
`SubsampleVolume'.  Stop.
make[1]: *** [CMakeFiles/SubsampleVolume.dir/all] Error 2
make: *** [all] Error 2

Below is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.6)

PROJECT(Geo)

set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)

FIND_LIBRARY(LIBVAR NAMES libuuid.so PATHS /usr/lib64)

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
	INCLUDE( ${USE_ITK_FILE} )
ENDIF(ITK_FOUND)

FIND_PACKAGE(VTK)
IF(VTK_FOUND)
INCLUDE( ${USE_VTK_FILE} )
ENDIF(VTK_FOUND)


ADD_EXECUTABLE(SubsampleVolume SubsampleVolume.cxx )

TARGET_LINK_LIBRARIES(SubsampleVolume
	ITKNumerics ITKIO ITKBasicFilters vtkRendering vtkIO vtkWidgets 	 
vtkHybrid ${LIBVAR})

On May 24, 2011, at 9:30 AM, Sara Rolfe wrote:

> The library I need is actually not an external one, but should be  
> included.  However, when I moved my code to a 64-bit machine, CMake  
> will not look in /usr/lib64 instead of /usr/lib.
>
> Perhaps I could treat the missing library like an external one to  
> create a hack solution?  What I'm missing is /usr/lib64/libuuid.so.
>
> Thanks,
> Sara
>
> On May 24, 2011, at 2:52 AM, Irving Dindoyal wrote:
>
>> Hi Sara
>>
>> I know one student who is happy using Qt Creator for Linux running  
>> ITK without CMake.  He basically dumps all the ITK directory names  
>> into the appropriate library paths in QT Creator.  I know he had  
>> problems compiling the ITK and VTK using MinGW for windows but he  
>> eventually solved it, under Linux he had no trouble.
>>
>> I still think CMake is the simplest solution if you can write or  
>> modify an existing CMakeLists.txt file.  If your project depends on  
>> other libraries (e.g. OpenCV) outside ITK & VTK they can be  
>> included in the CMakeLists.txt file and it seems to work ok.
>>
>> Kind regards
>>
>> Irving
>>
>> Sara Rolfe wrote:
>>> One other question, is it worth investigating using ITK without  
>>> CMake?  After some initial google searches it seems like it could  
>>> be overly complicated.
>>>
>>> On the other hand, if I can't get this working I'll have to do my  
>>> 3D segmentation in 2D, due to memory constraints.  So I'm open to  
>>> trying alternative solutions!
>>>
>>> Thanks,
>>> Sara
>>>
>>> On May 23, 2011, at 10:49 AM, Sara Rolfe wrote:
>>>
>>>> Hi Luis,
>>>>
>>>> Thanks for your help.  The output to the commands you suggested  
>>>> was:
>>>>
>>>> $ file /usr/lib64/libuuid.so
>>>> /usr/lib64/libuuid.so: symbolic link to `/lib64/libuuid.so.1'
>>>>
>>>> $ file /lib64/libuuid.so.1
>>>> /lib64/libuuid.so.1: symbolic link to `libuuid.so.1.2'
>>>>
>>>> $ file /lib64/libuuid.so.1.2
>>>> /lib64/libuuid.so.1.2: ELF 64-bit LSB shared object, AMD x86-64,  
>>>> version 1 (SYSV), stripped
>>>>
>>>> Some background:
>>>> The system I'm using is a thirty-five node compute cluster where  
>>>> each cluster node is running a 64-bit Linux OS.  I'm attempting  
>>>> to use Condor to manage a job.  My program compiled on the head  
>>>> node, which is a 32-bit machine, but failed when Condor tried to  
>>>> use the cluster nodes.  I'm now trying to compile my code from  
>>>> one of the cluster nodes to debug.  First it appeared that the  
>>>> UUID libraries were missing.  I don't have administrator  
>>>> privileges on these machines, but the system admin was able to  
>>>> install both uuid and uuid-devel packages on the node I'm using.   
>>>> Now the libraries are there, but CMake will not link to them.   
>>>> I've also tried setting the FIND_LIBRARY_USE_LIB64_PATHS  
>>>> property, but this did not resolve the problem.
>>>>
>>>> Thanks,
>>>> Sara
>>>>
>>>>
>>>> On May 22, 2011, at 3:44 PM, Luis Ibanez wrote:
>>>>
>>>>> Hi Sara,
>>>>>
>>>>> Thanks for sending this information.
>>>>>
>>>>> You are certainly building for 64 bits,
>>>>>
>>>>> that's the good news.   :-)
>>>>>
>>>>>
>>>>> ---
>>>>>
>>>>> The libuuid.so in my 64bit system (Ubuntu 10.04)
>>>>> is installed in
>>>>>
>>>>>                   /usr/lib/libuuid.so
>>>>>
>>>>> and it is a symbolic link to
>>>>>
>>>>>                /lib/libuuid.so.1.3.0
>>>>>
>>>>>
>>>>> if you use the "file" command, we can check if your
>>>>> library is actually a 32bits or 64 bits.
>>>>>
>>>>> When I do:
>>>>>
>>>>>                file /usr/lib/libuuid.so
>>>>>
>>>>> I get:
>>>>>
>>>>> /usr/lib/libuuid.so: symbolic link to `/lib/libuuid.so.1.3.0'
>>>>>
>>>>> and then, when doing:
>>>>>
>>>>>                 file /lib/libuuid.so.1.3.0
>>>>>
>>>>> I get:
>>>>>
>>>>>
>>>>> /lib/libuuid.so.1.3.0: ELF 64-bit LSB shared object, x86-64,  
>>>>> version 1
>>>>> (SYSV), dynamically linked, stripped
>>>>>
>>>>>
>>>>> Could you please try the same in your libuuid.so file
>>>>> and let us know what you find ?
>>>>>
>>>>>
>>>>> BTW: How did you install   libuuid ?
>>>>>
>>>>> In Ubuntu, this is done with:
>>>>>
>>>>>                    sudo   apt-get   install    uuid-dev
>>>>>
>>>>>
>>>>> Also,....
>>>>>
>>>>> GDCM should use its own version of libuuid,
>>>>> (in GDCM/Utilities/gdcmuuid) when it fails to
>>>>> find a libuuid installed in your system.
>>>>>
>>>>> So, there are multiple suspicious things about
>>>>> your system...
>>>>>
>>>>>
>>>>> Is there something "special" about your system
>>>>> that you would like to share with us at this point ?
>>>>>
>>>>>
>>>>> Virtual machine ?
>>>>> Shared disk system, maybe... ?
>>>>>
>>>>>
>>>>>  Thanks
>>>>>
>>>>>
>>>>>       Luis
>>>>>
>>>>>
>>>>>
>>>>> -----------------------------------------------
>>>>> On Sat, May 21, 2011 at 8:26 PM, Sara Rolfe <smrolfe at u.washington.edu 
>>>>> > wrote:
>>>>>> Hi Luis,
>>>>>>
>>>>>> Thanks for your help with this.
>>>>>>
>>>>>> When I do ./a.out I get 8, so it looks like it is building for  
>>>>>> 64 bits.
>>>>>>
>>>>>> The output from uname -a is:
>>>>>> Linux n32.frame.cs.washington.edu 2.6.18-238.1.1.el5 #1 SMP Tue  
>>>>>> Jan 4
>>>>>> 13:32:19 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
>>>>>>
>>>>>>
>>>>>> My latest thought is that CMake is only checking the /usr/lib  
>>>>>> and not
>>>>>> /usr/lib64.  I have and use both libraries.  If this is the  
>>>>>> case, I have not
>>>>>> found any way to change this.
>>>>>>
>>>>>> Please let me know what you think.
>>>>>>
>>>>>> Thanks,
>>>>>> Sara
>>>>>>
>>>>>>
>>>>>> On May 21, 2011, at 11:02 AM, Luis Ibanez wrote:
>>>>>>
>>>>>>> uname -a
>>>>>>
>>>>>>
>>>>
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://www.kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>> -- 
>>
>> "Water flowing through the cracks" - Mark Tan
>> --
>> Irving Dindoyal
>> Medical Image Analysis
>> University of Bern
>> Institute for Surgical Technology and Biomechanics
>> Stauffacherstrasse 78
>> CH-3014 Bern
>>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list