[Insight-users] ITK will not build with shared libs enabled on the Mac

Jayme Kosior jckosior at ucalgary.ca
Sat Sep 11 13:32:41 EDT 2004


No, I have not tried the IBM compiler.

Until this problem is resolved, I probably will use a different 
computer with the previous XCode 1.2 (and gcc version) to compile the 
ITK shared libraries, and another to do my development on with XCode 
1.5.

It sounds like it's likely a gcc problem, but maybe a fix to the make 
file generated with CMake would solve the problem.  I haven't 
investigated that possibility yet.  Let me know if you have success 
with the IBM compiler (if you decide to try it).

Regards,

Jayme


On Sep 11, 2004, at 11:01, Jon H Kaspersen wrote:

> Thanks Gamal and Jayme for verifying this error.  I think Jayme you 
> might be
> right about the error, that it is introduced by Xcode 1.5.  Xcode 1.5 
> updated gcc to
> gcc 3.3, build 1666.
> My Mac reports :
> Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
> Thread model: posix
> gcc version 3.3 20030304 (Apple Computer, Inc. build 1666)
>
> Have anyone tried the commercial xlC compiler from IBM ?
>
> Regards
> Jon
> On Sep 11, 2004, at 3:46 AM, Gamal Akabani wrote:
>
>> Jon:
>>
>> I had the same problem.  I am not sure what is going on.
>>
>> This was the output while compiling:
>>
>> Building shared library 
>> /usr/local/ITK/ITKBuild/bin/libitkvnl_algo.dylib...
>> ld: Undefined symbols:
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <double>(std::basic_ostream<char, std::char_traits<char> >&, 
>> vnl_matrix<double> const&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <double>(std::basic_ostream<char, std::char_traits<char> >&, 
>> vnl_vector<double> const&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <float>(std::basic_ostream<char, std::char_traits<char> >&, 
>> vnl_matrix<float> const&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <float>(std::basic_ostream<char, std::char_traits<char> >&, 
>> vnl_vector<float> const&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <std::complex<double> >(std::basic_ostream<char, 
>> std::char_traits<char> >&, vnl_matrix<std::complex<double> >
>>  const&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <std::complex<double> >(std::basic_ostream<char, 
>> std::char_traits<char> >&, vnl_vector<std::complex<double> >
>>  const&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <std::complex<float> >(std::basic_ostream<char, 
>> std::char_traits<char> >&, vnl_matrix<std::complex<float> > c
>> onst&)
>> std::basic_ostream<char, std::char_traits<char> >& operator<< 
>> <std::complex<float> >(std::basic_ostream<char, 
>> std::char_traits<char> >&, vnl_vector<std::complex<float> > c
>> onst&)
>> /usr/bin/libtool: internal link edit command failed
>> make[11]: *** [/usr/local/ITK/ITKBuild/bin/libitkvnl_algo.dylib] 
>> Error 1
>> make[10]: *** [default_target] Error 2
>> make[9]: *** [default_target_algo] Error 2
>> make[8]: *** [default_target] Error 2
>> make[7]: *** [default_target_vnl] Error 2
>> make[6]: *** [default_target] Error 2
>> make[5]: *** [default_target_core] Error 2
>> make[4]: *** [default_target] Error 2
>> make[3]: *** [default_target_vxl] Error 2
>> make[2]: *** [default_target] Error 2
>> make[1]: *** [default_target_Utilities] Error 2
>> make: *** [default_target] Error 2
>>
>> I am not sure what is wrong as I only changed
>>> //Build ITK with shared libraries.
>>> BUILD_SHARED_LIBS:BOOL=ON
>> The rest remained the same as before for static libraries, which it 
>> compile successfully.
>>
>>
>> On Sep 10, 2004, at 3:48 PM, Jon H Kaspersen wrote:
>>
>>> Same problem is seen also on the G4, so it is not G5 specific -
>>> I have just checked.
>>>
>>> Anyone tried compiling ITK on the Mac with shared libs enabled ?
>>>
>>> Regards
>>> Jon
>>>
>>>>
>>>> I did a clean standard build of ITK,
>>>> then I used ccmake to enable shared libs - which brakes the build 
>>>> with
>>>> the following error:
>>>>
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>> Gamal Akabani, Ph.D.
>>
>>
> ========================================================
> Jon Harald Kaspersen                        Mob:	   +47 93 03 65 90
> Ph.D. Mechanical Engineering	
> Senior Scientist
> SINTEF Helse
> N-7465 Trondheim
> NORWAY			e-mail:	Jon.H.Kaspersen at sintef.no
> 				WEB:	http://www.sintef.no/medtek
> ========================================================
>
> _______________________________________________
> 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