[Insight-users] LBFGSOptimizer bug (?)

Tim Allman dr.tim.allman at gmail.com
Fri Mar 8 10:44:20 EST 2013


I have been using cmake to generate unix makefiles with g++ as the 
compiler. When I switch to clang it fails.

However, I decided to generate an Xcode (4.5.2 on OSX 10.7) project with 
clang to see what would happen. In short, the bug goes away but the IDE 
indicates that I am still using LLVM 4.1.

I have been retesting my project with the new libraries and all seems well.


Tim

On 13-03-08 10:27 AM, Sean McBride wrote:
> On Thu, 7 Mar 2013 15:09:51 -0500, Tim Allman said:
>
>> Are you sure that ITK builds with clang? My attempt fails like this.
>>
>> celia:tim-[itk-build]: make
>> [  0%] Built target ITKData
>> [  0%] Building CXX object
>> Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/SystemTools.cxx.o
>> In file included from
>> /Users/tim/devel/InsightToolkit-4.3/Modules/ThirdParty/KWSys/src/KWSys/
>> SystemTools.cxx:26:
>> /Users/tim/devel/itk-build/Modules/ThirdParty/KWSys/src/itksys/ios/
>> sstream:176:29:
>> error: cannot initialize a parameter of type
>>        'iostate' (aka 'std::_Ios_Iostate') with an lvalue of type 'int'
>>      this->IStrStream::clear(flags);
>>                              ^~~~~
>> /usr/include/c++/4.2.1/bits/basic_ios.h:133:21: note: passing argument
>> to parameter '__state' here
>>        clear(iostate __state = goodbit);
>>                      ^
> ITK builds with clang, but I'm not sure it builds with llvm's libc++.  Are you using libstdc++ or libc++?  Are you using CMake's 'unix makefiles' generator or the 'Xcode' generator?   Which version of Xcode?  Xcode 4.6 switched to libc++ by default I believe.
>
> Cheers,
>

-- 
Tim Allman, Ph.D.
35 Margaret Street,
Guelph Ontario N1E 5R6
Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dr_tim_allman.vcf
Type: text/x-vcard
Size: 159 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130308/510ef612/attachment.vcf>


More information about the Insight-users mailing list