[Insight-developers] Compiling a 32bits app using ITK in a 64bits linux environment (gcc)

Williams, Norman K norman-k-williams at uiowa.edu
Wed Apr 3 10:33:13 EDT 2013


Those symbols (_mm_cvtsd_si32 and _mm_set_sd) are SSE2 intrinsics. They
are documented here: http://software.intel.com/en-us/avx/

I think there is some mismatch between the compiler flags you're using to
build ITK and to build your application.  In particular, you need to add
flags for GCC to use SSE/SSE2.

I'd look through ITK's CMakeCache.txt and see what flags it is setting in
all the CMAKE_C_FLAGS* and CMAKE_CXX_FLAGS* CMake variables.  The ITK
CMake config process uses check_cxx_source_compiles to determine if the
SSE intrinsics are supported. There's a stackoverflow topic on the subject
http://stackoverflow.com/questions/661338/sse-sse2-and-sse3-for-gnu-c


--
Kent Williams norman-k-williams at uiowa.edu






On 4/2/13 2:04 PM, "Benoit Scherrer" <benoitscherrer at gmail.com> wrote:

>Thanks for the answer!
>
>
>yes i even deleted everything (all build/install folders) twice  and
>re-run cmake (not ccmake / cmake-gui) with
>-DCMAKE_CXX_FLAGS:STRING=-m32 -DCMAKE_C_FLAGS:STRING=-m32
>-DCMAKE_EXE_LINKER_FLAGS:STRING=-m32 -DCMAKE_REQUIRED_FLAGS:STRING=-m32
>
>
>directly in the command line (so for the first CMake config)
>
>
>Rq: ITK *do* compile so it has the correct configuration
>then, my application includes itkIndex.h which includes itkMath.h which
>includes itkMathDetail.h
>and it refuses to compile.
>
>
>RQ: the x86_64 compile without any trouble.
>Maybe i missed the installation of some x86 (i686) developer package?
>
>
>B
>
>
>On Tue, Apr 2, 2013 at 11:54 AM, Bradley Lowekamp
><blowekamp at mail.nih.gov> wrote:
>
>Did you provide those command line parameter the first time CMake ran is
>configuration?
>
>
>By adding those options afterwards you are changing the architecture you
>are compiling for, so thing left in the CMakeCache may be wrong. You must
>have those the first time CMake performs it's configuration.
>
>
>Brad
>
>On Apr 2, 2013, at 11:13 AM, Benoit Scherrer <benoitscherrer at gmail.com>
>wrote:
>
>
>
>
>Hi,
>
>
>I successfully compiled ITK 4.4 (from the git repository today)
>in 32bits on my x86_64 linux.
>I'm using the cmake command line parameters:
>-DCMAKE_CXX_FLAGS:STRING=-m32 -DCMAKE_C_FLAGS:STRING=-m32
>-DCMAKE_EXE_LINKER_FLAGS:STRING=-m32
>-DCMAKE_REQUIRED_FLAGS:STRING=-m32However, when compiling an application
>using it (with the same -m32 parameters for cmake) i get the typical
>error from itkMathDetail.h
>177:38: error: '_mm_set_sd' was not declared in this scope
>177:40: error: '_mm_cvtsd_si32' was not declared in this scope
>etc..Do you know what is happening? I deleted the whole build directories
>and rebuild everything from scratch (with the -m32 parameters) to be sure
>to have a clean CMakeCache for both ITK and my app but it was not
>successful.Any idea?
>Thanks!B
>
>
>
>
>
>
>_______________________________________________
>Powered by www.kitware.com <http://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://kitware.com/products/protraining.php
>
>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-developers
>
>
>
>
>
>
>
>
>
>
>
>
>



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list