[ITK] [ITK-dev] Failing link on Mac after May 7 changes
Bradley Lowekamp
blowekamp at mail.nih.gov
Fri May 22 10:20:44 EDT 2015
Bill,
This compiler has known problems with visibility. These are the lines that should disable it for your compiler:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/CMake/ITKModuleMacros.cmake#L12-L15
What is the value of USE_COMPILER_HIDDEN_VISIBILITY in you CMakeCache.txt files? Does manually setting it to off resolve your issue?
Brad
On May 22, 2015, at 10:11 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> My Mac build
> i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1
> has link errors after this commit:
> commit c11b4ebd3d5f63f2ec281d31eef14f3af6dbf1d4
> Author: Hans Johnson <hans-johnson at uiowa.edu>
> Date: Thu May 7 06:56:36 2015 -0500
>
> COMP: Prefer modern CMake visibility settings
>
> When available, prefer to use the modern cmake
> set_target_property() mechanism for setting
> export visibility of libaries.
>
> The add_compiler_export_flags function is obsolete. Use the
> CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target properties
> instead.
>
> Change-Id: Ibcf8b493bd8cba021e12e14bf18a7b46ae7e6e0a
>
> The linker errors are many like the following:
> Undefined symbols for architecture x86_64:
> "itk::Object::~Object()", referenced from:
> itk::Statistics::RandomVariateGeneratorBase::~RandomVariateGeneratorBase()in
> ITKCommonHeaderTest5.cxx.o
> itk::Statistics::RandomVariateGeneratorBase::~RandomVariateGeneratorBase()in
> ITKCommonHeaderTest5.cxx.o
> itk::Statistics::MersenneTwisterRandomVariateGenerator::~MersenneTwisterRandomVariateGenerator()in
> ITKCommonHeaderTest5.cxx.o
> itk::Statistics::MersenneTwisterRandomVariateGenerator::~MersenneTwisterRandomVariateGenerator()in
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::CreateAnother() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::LightObject::Delete()", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::Register() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::UnRegister() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::SetReferenceCount(int)", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::PrintSelf(std::basic_ostream<char,
> std::char_traits<char> >&, itk::Indent) const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> "itk::LightObject::PrintHeader(std::basic_ostream<char,
> std::char_traits<char> >&, itk::Indent) const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::LightObject::PrintTrailer(std::basic_ostream<char,
> std::char_traits<char> >&, itk::Indent) const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::LightObject::InternalClone() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::DebugOn() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::DebugOff() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::GetMTime() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::GetTimeStamp() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::Modified() const", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "itk::Object::SetTimeStamp(itk::TimeStamp const&)", referenced from:
> vtable for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> "typeinfo for itk::Object", referenced from:
> typeinfo for itk::Statistics::RandomVariateGeneratorBasein
> ITKCommonHeaderTest5.cxx.o
> "itk::Statistics::MersenneTwisterRandomVariateGenerator::PrintSelf(std::basic_ostream<char,
> std::char_traits<char> >&, itk::Indent) const", referenced from:
> vtable for
> itk::Statistics::MersenneTwisterRandomVariateGeneratorin
> ITKCommonHeaderTest5.cxx.o
> ld: symbol(s) not found for architecture x86_64
> _______________________________________________
> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Powered by 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://public.kitware.com/mailman/listinfo/insight-developers
More information about the Community
mailing list