<div dir="ltr">Thank you, David! I've double checked on linux platform, and it works too. Already check it in the cgm system, revision 6114.<div><br></div><div>Jane</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jan 20, 2014 at 12:22 PM, David Thompson <span dir="ltr"><<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I've found a fix for the Mavericks compile issue. The new Apple libc++ uses a specialization for std::vector<bool> that prevents DLIList<bool> from re-using the std::vector<X>::const_reference typedef blindly. The following fixes things for me:<br>

<br>
--- a/util/DLIList.hpp<br>
+++ b/util/DLIList.hpp<br>
@@ -40,7 +40,7 @@ public:<br>
   friend class DLIListIterator<X>;<br>
<br>
   typedef typename std::vector<X>::reference reference;<br>
-  typedef typename std::vector<X>::const_reference const_reference;<br>
+  typedef const typename std::vector<X>::value_type& const_reference;<br>
   typedef typename std::vector<X>::pointer pointer;<br>
   typedef typename std::vector<X>::const_pointer const_pointer;<br>
<br>
<br>
and should work for other platforms.<br>
<br>
        David<br>
<br>
<br>
On Dec 10, 2013, at 1:21 PM, David Thompson <<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>> wrote:<br>
<br>
> Hi Rajeev,<br>
><br>
>> I’m getting similar error on Mavericks.<br>
>> Did you find a solution?<br>
><br>
> Not yet. My workaround is to use svn version 6078 with the patch at the start of this thread.<br>
><br>
>       David<br>
><br>
><br>
><br>
>>> From: David Thompson <<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>><br>
>>> Subject: Re: [cgma-dev] Missing include on Mavericks (+patch)<br>
>>> Date: December 2, 2013 at 6:31:03 PM CST<br>
>>> To: Jane Hu <<a href="mailto:janejhu@gmail.com">janejhu@gmail.com</a>><br>
>>> Cc: CGMA Development <<a href="mailto:cgma-dev@mcs.anl.gov">cgma-dev@mcs.anl.gov</a>><br>
<div class="HOEnZb"><div class="h5">>>><br>
>>> Hi Jane,<br>
>>><br>
>>>> Current trunk is only buildable with occ, there's a bug which prevent cubit build on cgm14.0 and I am working on it.<br>
>>><br>
>>> I am using OCC, so that's not the problem.<br>
>>><br>
>>>> ... Please let us know when you figured out the cause.<br>
>>><br>
>>> OK.<br>
>>><br>
>>>     Thanks,<br>
>>>     David<br>
>>><br>
>>>> On Mon, Dec 2, 2013 at 3:08 PM, David Thompson <<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>> wrote:<br>
>>>> Hi Jane,<br>
>>>><br>
>>>>> It's just been done. Happy coding!<br>
>>>><br>
>>>> Thanks! However, when I updated to catch this fix, I ran into another issue:<br>
>>>><br>
>>>> libtool: compile:  clang++ -I. -I/Users/dcthomp/Source/cgm/geom -I.. -I../geom/parallel -I../itaps -I/Users/dcthomp/Source/cgm/util -I. -g -Wall -mmacosx-version-min=10.9 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 -Wall -pipe -pedantic -MT CubitAttribManager.lo -MD -MP -MF .deps/CubitAttribManager.Tpo -c /Users/dcthomp/Source/cgm/geom/CubitAttribManager.cpp  -fno-common -DPIC -o .libs/CubitAttribManager.o<br>

>>>> /Users/dcthomp/Source/cgm/geom/CubitAttribManager.cpp:108:28: error: no viable conversion from 'CubitBoolean' (aka 'bool') to<br>
>>>>     'const_reference' (aka '__bit_const_reference<std::__1::vector<bool, std::__1::allocator<bool> > >')<br>
>>>> mAutoActuateFlags.append(auto_actuate_flag);<br>
>>>>                          ^~~~~~~~~~~~~~~~~<br>
>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:124:7: note:<br>
>>>>     candidate constructor (the implicit copy constructor) not viable: no known conversion from 'CubitBoolean' (aka 'bool') to<br>
>>>>     'const std::__1::__bit_const_reference<std::__1::vector<bool, std::__1::allocator<bool> > > &' for 1st argument<br>
>>>> class __bit_const_reference<br>
>>>>     ^<br>
>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__bit_reference:140:5: note:<br>
>>>>     candidate constructor not viable: no known conversion from 'CubitBoolean' (aka 'bool') to 'const<br>
>>>>     __bit_reference<std::__1::vector<bool, std::__1::allocator<bool> > > &' for 1st argument<br>
>>>>   __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT<br>
>>>>   ^<br>
>>>> /Users/dcthomp/Source/cgm/util/DLIList.hpp:448:31: note: passing argument to parameter 'new_item' here<br>
>>>> void append(const_reference new_item);<br>
>>>>                             ^<br>
>>>><br>
>>>> I haven't been able to figure out the source of this problem. Both Apple's new C++ library and the old GNU one specialize vector<bool>, so that does not appear to be the cause. If it helps, I had not updated since before you moved the cubit-14 branch to the trunk.<br>

>>>><br>
>>>>       David<br>
>>>><br>
>>>><br>
>>>>> On Mon, Dec 2, 2013 at 12:43 PM, David Thompson <<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>> wrote:<br>
>>>>> Hi all,<br>
>>>>><br>
>>>>> When I try building on OS X Mavericks using the latest Xcode, I get an error that pid_t is not defined in util/CubitProcess.h. It appears that <unistd.h> must be included for this type to be defined. A patch is below. Could someone apply it or help me revise it so I can build without patching CGM?<br>

>>>>><br>
>>>>>       Thanks,<br>
>>>>>       David<br>
>>>>><br>
>>>>> --- a/util/CubitProcess.hpp<br>
>>>>> +++ b/util/CubitProcess.hpp<br>
>>>>> @@ -20,6 +20,7 @@<br>
>>>>> #include <windows.h><br>
>>>>> typedef PROCESS_INFORMATION PidType;<br>
>>>>> #else<br>
>>>>> +#  include <unistd.h><br>
>>>>> typedef pid_t PidType;<br>
>>>>> #endif<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> Jane Hu<br>
>>>>><br>
>>>>> Asst. Researcher<br>
>>>>> Dept. of Engineering Physics<br>
>>>>> UW @ Madison<br>
>>>>><br>
>>>>> "And we know that for those who love God, that is, for those who are called according to his purpose, all things are working together for good." (Romans 8:28)<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Jane Hu<br>
>>>><br>
>>>> Asst. Researcher<br>
>>>> Dept. of Engineering Physics<br>
>>>> UW @ Madison<br>
>>>><br>
>>>> "And we know that for those who love God, that is, for those who are called according to his purpose, all things are working together for good." (Romans 8:28)<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jane Hu<br>
<br>
Asst. Researcher<br>
Dept. of Engineering Physics<br>
UW @ Madison<br>
<br>
"And we know that for those who love God, that is, for those who are 
called according to his purpose, all things are working together for 
good." (Romans 8:28)
</div>