[Insight-users] Building ITK 3 on AMD Win64 with VC2005

Luis Ibanez luis.ibanez at kitware.com
Fri Dec 8 12:49:21 EST 2006


Hi Reinhold,

Thanks for pointing out this problem and for exploring
solutions for it.

We entered this issue as Bug # 4165 in the bug tracker:

http://public.kitware.com/Bug/bug.php?op=show&bugid=4165


and yesterday we committed a fix in both the ITK 3.0 branch
and the main cvs trunk:


ITK 3.0 Branch:
http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/core/vnl/vnl_math.h?root=Insight&r1=1.5&r2=1.5.2.1

HEAD:
http://www.itk.org/cgi-bin/viewcvs.cgi/Utilities/vxl/core/vnl/vnl_math.h?root=Insight&r1=1.5&r2=1.6 



The fix consisted in updating the vnl_math.h file from
its most recent version in the CVS repository of VXL.

This happens to be:

            vnl_math.h revision 1.42 (from CVS VXL)


Please update your checkout of ITK and let us know if
you still find any problems.



    Thanks


       Luis



========================
Reinhold Füreder wrote:
> Hi,
> 
> Sorry for my late response ;-) Looking at the actual source code --
> thanks to the joy of open source -- points to a pragmatic solution. The
> little fix below is not at all perfect: (a) it just falls back to the
> explicit definition consisting of several statements and is supposed to
> be therefore significantly slower (?), and (b) this fall back is
> independent of 32bit vs. 64bit mode although it is not required for
> 32bit mode. I think improving the latter would currently only (but
> luckily easily) possible by means of CMake -- if the chosen generator is
> VC2005 64bit then ...
> 
> For now we have an explicit source tree for 64bit ITK where the inline
> assembler code is guarded by checks that VCL_VC_8 is not defined, line
> 149:
> 
> #elif defined (VCL_VC) && !defined(VCL_VC_8) && !defined(__GCCXML__)
> 
> In conclusion this is the most pragmatic temporary solution, but not
> ideal.
> 	Reinhold
> 
> 
>>-----Original Message-----
>>From: insight-users-bounces+r.fureder=exeter.ac.uk at itk.org 
>>[mailto:insight-users-bounces+r.fureder=exeter.ac.uk at itk.org] 
>>On Behalf Of Reinhold Füreder
>>Sent: Wednesday, November 29, 2006 1:14 PM
>>To: insight-users at itk.org
>>Subject: [Insight-users] Building ITK 3 on AMD Win64 with VC2005
>>
>>
>>Hi,
>>
>>My goal is to "port" our Win32 application that is based on 
>>ITK and VTK
>>among others to Win64 (Microsoft Windows Server 2003, Enterprise x64
>>Edition, Service Pack1, Dual Core AMD Opteron) by means of VC2005.
>>
>>As a first naive (?) attempt I just took and installed the prebuilt
>>latest CMake release 2.4.4 (a Win32 application). Utilising 
>>its "Visual
>>Studio 8 2005 Win64" generator seemingly allowed to build VTK (5.0.2)
>>without problem, but building ITK (3.0.0) leads to this kind 
>>of errors:
>>-----
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(160) :
>>error C4235: nonstandard extension used : '_asm' keyword not supported
>>on this architecture
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(162) :
>>error C2065: 'fld' : undeclared identifier
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(162) :
>>error C2146: syntax error : missing ';' before identifier 'flt'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(162) :
>>error C2146: syntax error : missing ';' before identifier 'fistp'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(163) :
>>error C2065: 'fistp' : undeclared identifier
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(163) :
>>error C2146: syntax error : missing ';' before identifier 'intgr'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(163) :
>>error C2143: syntax error : missing ';' before '}'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(170) :
>>error C4235: nonstandard extension used : '_asm' keyword not supported
>>on this architecture
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(172) :
>>error C2146: syntax error : missing ';' before identifier 'flt'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(172) :
>>error C2146: syntax error : missing ';' before identifier 'fistp'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(173) :
>>error C2146: syntax error : missing ';' before identifier 'intgr'
>>4>D:\SwDev\InsightToolkit-3.0.0\Utilities\vxl\core\vnl/vnl_mat
>>h.h(173) :
>>error C2143: syntax error : missing ';' before '}'
>>-----
>>
>>These errors are repeating a couple of times, but assuming that the
>>compiler does not omit too much code after this error, this 
>>really seems
>>to be the only problem. According to MSDN "inline asm on 64bit
>>development is not a supported scenario by VC2005. What I 
>>would suggest
>>is keep the inline asm for 32bit development under an ifdef 
>>but use the
>>64bit intrinsics when compiling for 64bit." I am wondering if this is
>>really the (only) problem and solution, or if I miss something.
>>
>>In fact these two functions are actually introduced by:
>>-----
>> // Win32 doesn't seem to have these functions.
>> // Therefore implement inline versions of these functions here.
>>-----
>>
>>Reasons that make me think that I may miss something are:
>>(a) There are other sometimes quite recent postings if this 
>>Win64 build
>>scenario is supported without answer.
>>(b) There was an older message
>>(http://public.kitware.com/pipermail/cmake/2005-December/007693.html)
>>saying that one should build CMake from sources to have a 64bit Cmake.
>>However, there the problem was already in utilising CMake itself.
>>(c) The project properties include the compiler flag preprocessor
>>defintion /DWIN32.
>>(d) ITK's subproject itkpng also seems to use inline 
>>assembler, but its
>>usage is guarded by 
>>Special ifdefs and the corresponding lib is built successfully.
>>
>>Thanks in advance for your help/advise,
>>	Reinhold
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list