[ITK Community] Fwd: Issues with ITK version 4.5.0

Chrystel Juan chrystel.juan at kitware.com
Wed Feb 26 18:08:41 EST 2014


Hi Brad & all,

I did git bisect on ITK and nailed the first commit [1] that makes my build
of ITK fail.

Building in verbose mode, I can see that when building ITKCommon, the flags
-fvisibility=hidden -fvisibility-inlines-hidden are passed to /usr/bin/c++
along with -DITKCommon_EXPORTS. However when building the other libraries
(e.g. ITKIOTransformBase), those flags are not passed. And the build fail
with the errors listed in my first email.

If I comment the add_compiler_export_flags  lines [2] then the build
passes.

As I don't understand what is going on, can someone explain to me what the
problem is with those flags ?

Thanks a lot for your help,
Chrystel.

[1]:
https://github.com/Kitware/ITK/commit/6d369e106262f6e9bdab4ff9dc45d27eff6502d7
[2]:
https://github.com/Kitware/ITK/blob/6d369e106262f6e9bdab4ff9dc45d27eff6502d7/CMake/ITKModuleMacros.cmake#L148-L150


---------- Forwarded message ----------
From: Matt McCormick <matt.mccormick at kitware.com>
Date: Fri, Jan 10, 2014 at 10:59 AM
Subject: Re: [ITK Community] Issues with ITK version 4.5.0
To: Chrystel Juan <chrystel.juan at kitware.com>
Cc: "community at itk.org" <community at itk.org>


Hi Chrystal,

It is possible that you have discovered a bug.  There is not a
dashboard build for Mac 10.7/GCC.  There is a Mac 10.7/Clang build:

  http://open.cdash.org/viewNotes.php?buildid=3171172

It may be worthwhile to try first see that it works.

Thanks,
Matt

On Wed, Jan 8, 2014 at 10:15 AM, Chrystel Juan
<chrystel.juan at kitware.com> wrote:
> Hi,
>
> I am trying to build the ITK folder version 4.5.0 on my Mac OS X version
> 10.7.5.
>
> But I have those errors :
>
> Linking CXX shared library ../../../../lib/libITKIOTransformBase-4.5.dylib
> Undefined symbols for architecture x86_64:
>   "itk::SmartPointerForwardReference<itk::ProcessObject>::operator
> itk::ProcessObject*() const", referenced from:
>       itk::ImageBase<3u>::UpdateOutputInformation() in
> itkTransformFactoryBase.cxx.o
>       itk::ImageBase<2u>::UpdateOutputInformation() in
> itkTransformFactoryBase.cxx.o
>
>
"itk::SmartPointerForwardReference<itk::ProcessObject>::~SmartPointerForwardReference()",
> referenced from:
>       itk::ImageBase<3u>::UpdateOutputInformation() in
> itkTransformFactoryBase.cxx.o
>       itk::ImageBase<2u>::UpdateOutputInformation() in
> itkTransformFactoryBase.cxx.o
>   "itk::SmartPointerForwardReference<itk::ProcessObject>::operator->()
> const", referenced from:
>       itk::ImageBase<3u>::UpdateOutputInformation() in
> itkTransformFactoryBase.cxx.o
>       itk::ImageBase<2u>::UpdateOutputInformation() in
> itkTransformFactoryBase.cxx.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [lib/libITKIOTransformBase-4.5.1.dylib] Error 1
> make[1]: ***
> [Modules/IO/TransformBase/src/CMakeFiles/ITKIOTransformBase.dir/all]
Error 2
> make[1]: *** Waiting for unfinished jobs....
> Linking CXX shared library ../../../../lib/libITKIOBioRad-4.5.dylib
> [ 60%] Built target ITKIOBioRad
> make: *** [all] Error 2
>
>
> Those errors happen only when DBUILD_SHARED_LIBS:BOOL is turned on. When I
> am in statics it works fine.
>
> I am using  CMake version 2.8-11, with those followings parameters :
>
> //Build the documentation (Doxygen).
> BUILD_DOCUMENTATION:BOOL=OFF
>
> //Build the Examples directory.
> BUILD_EXAMPLES:BOOL=ON
>
> //Build Shared Libraries
> BUILD_SHARED_LIBS:BOOL=OFF
>
> //Build the testing tree.
> BUILD_TESTING:BOOL=ON
>
> //CXX compiler.
> CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
>
> //Flags used by the compiler during all build types.
> CMAKE_CXX_FLAGS:STRING=
>
> //Flags used by the compiler during debug builds.
> CMAKE_CXX_FLAGS_DEBUG:STRING=-g
>
> //C compiler.
> CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
>
>
> and those compiler version :
>
> Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
> Target: x86_64-apple-darwin11.4.2
> Thread model: posix
>
> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
>
> Chrystel
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140226/9ecf01b6/attachment-0002.html>


More information about the Community mailing list