[Insight-users] intel 10.1 undefined reference

David Fuentes fuentesdt at gmail.com
Mon Jan 19 17:34:36 EST 2009


Cool thanks alot dan,
I ended up just using gcc for building the ITK lib.
For my applications code, I am building everything w/ intel.
Works for now, hopefully it won't give me any problems,
I don't like mixing compilers like that.
I will  give your suggestions a try.


thanks again,
df





On Mon, 19 Jan 2009, Blezek, Daniel J. wrote:

> David,
>
>  I've been out for a week, sorry for late response.  We have 10.1.012
> installed, but no Ubuntu.  I helpful build debug tool is to compile with
> verbose output:
>
> make VERBOSE=1
>
> This gives all sort of information.  You should look to see what defines
> hit the command line, etc.  I'd also take a look in the CMakeCache.txt
> file to see if anything looks funny there.  You could try to diff the
> cache from the CentOS and Ubuntu builds, but it may be cluttered with
> stupid things.
>
> Cheers,
> -dan
>
> -----Original Message-----
> From: fuentesdt at gmail.com [mailto:fuentesdt at gmail.com]
> Sent: Tuesday, January 13, 2009 11:07 PM
> To: Blezek, Daniel J.
> Cc: insight-users at itk.org
> Subject: RE: [Insight-users] intel 10.1 undefined reference
>
>
>
> Many thanks dan! I didn't know that you could compile ITK completely
> from the command line that.
>
>
> What version of intel are you using?
> I am able to compile ITK with intel 10.1.017 on CentOS 5 as well, but
> for some reason can't get it to link on Ubuntu 8.04...
>
>
>
> df
>
>
>
>
> On Tue, 13 Jan 2009, Blezek, Daniel J. wrote:
>
>> Hi David,
>>
>>  We use the Intel compiler under CentOS 5.1 without problem.  Did you
>> specify icc on the initial CMake command line?  If you try to change
>> it later, bad and mysterious things happen.  Here's how I run CMake to
>
>> build ITK from an empty build directory.  Give it a go and see if it
>> helps.
>>
>> env CXX=icpc CC=icc cmake -DBUILD_SHARED=OFF
>> -DCMAKE_CXX_FLAGS="-static-intel -openmp -O3"
>> -DCMAKE_C_FLAGS="-static-intel -openmp -O3" -DCMAKE_BUILD_TYPE=Release
>
>> -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF  ../Insight/
>>
>> You can skip the openmp flag if you like, doesn't hurt anything.
>>
>> -dan
>>
>> -----Original Message-----
>> From: insight-users-bounces at itk.org
>> [mailto:insight-users-bounces at itk.org] On Behalf Of David Fuentes
>> Sent: Tuesday, January 13, 2009 10:00 AM
>> To: insight-users at itk.org
>> Subject: [Insight-users] intel 10.1 undefined reference
>>
>> hello I'm trying to build ITK with icc,icpc 10.1 on Ubuntu
>>
>> usul$ uname -a
>> Linux usul.ices.utexas.edu 2.6.24-23-generic #1 SMP Thu Nov 27
>> 18:13:46 UTC 2008 x86_64 GNU/Linux usul$ lsb_release -a No LSB modules
>
>> are available.
>> Distributor ID: Ubuntu
>> Description:    Ubuntu 8.04.2
>> Release:        8.04
>> Codename:       hardy
>>
>>
>> and am getting the following linking errors
>>
>>
>> Linking CXX executable ../../bin/itkTestDriver
>> ../../bin/libITKCommon.a(itkLightObject.o): In function
>> `__gnu_cxx::__exchange_and_add(int volatile*, int)':
>> /usr/include/c++/4.2.4/ext/atomicity.h:51: undefined reference to
>> `__sync_fetch_and_add'
>> ../../bin/libITKCommon.a(itkLightObject.o): In function
>> `__gnu_cxx::__atomic_add(int volatile*, int)':
>> /usr/include/c++/4.2.4/ext/atomicity.h:55: undefined reference to
>> `__sync_fetch_and_add'
>> ../../bin/libITKCommon.a(itkTimeStamp.o): In function
>> `__gnu_cxx::__exchange_and_add(int volatile*, int)':
>> /usr/include/c++/4.2.4/ext/atomicity.h:51: undefined reference to
>> `__sync_fetch_and_add'
>> make[2]: *** [bin/itkTestDriver] Error 1
>> make[1]: *** [Code/IO/CMakeFiles/itkTestDriver.dir/all] Error 2
>> make: *** [all] Error 2
>>
>>
>> Has anyone had a similiar problem?
>>
>>
>> thank you,
>> David Fuentes
>> _______________________________________________
>> 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