No subject


Tue Jan 15 14:41:49 EST 2013


I guess my gcc on the MAXC does not.

I'll put a patch to gerrit that adds lines like these in
Common/src/CMakeLists.txt
    if(APPLE)
      set_source_files_properties( itkArrayOutputSpecialization.cxx
PROPERTIES
        COMPILE_FLAGS -fvisibility=default )
    endif()

When I do this, my gcc build is OK.

Bill

On Fri, Mar 15, 2013 at 7:00 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> It has to do with symbol visibility. If I do nm on the ITKCommon lib, the
> undefined symbols have "t" and not "T". "t" means the symbols are local. If
> I remove the -fvisiibility=hidden flag from ITKCommon's CMakeLists.txt
> file, the tests build fine.
>
>
>
> On Fri, Mar 15, 2013 at 6:49 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>wrote:
>
>> Bill,
>>
>> Are you able to compile the release? Or is it a  change since then?
>>
>> Brad
>>
>> On Mar 15, 2013, at 7:36 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>>
>> I see why  those statements are there.
>>
>> Still need help.
>>
>> On Fri, Mar 15, 2013 at 4:25 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
>>
>>> More info. If I remove
>>> template<> std::ostream & operator<< <double> (std::ostream & os, const
>>> Array< double > & arr);
>>> template<> std::ostream & operator<< <float> (std::ostream & os, const
>>> Array< float > & arr);
>>>
>>> Both my c++ and clang build fine.
>>>
>>> What is the purpose of these lines?
>>>
>>> Bill
>>>
>>> On Fri, Mar 15, 2013 at 4:09 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
>>>
>>>> Guys,
>>>>
>>>> This is  on my Mac using:
>>>> c++ --version
>>>> c++ --version
>>>> i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
>>>> 5658) (LLVM build 2336.1.00)
>>>>
>>>> My clang version builds fine.
>>>>
>>>> Any ideas?
>>>>
>>>> Bill
>>>>
>>>>
>>>> On Fri, Mar 15, 2013 at 11:52 AM, Bill Lorensen <
>>>> bill.lorensen at gmail.com> wrote:
>>>>
>>>>> Folks,
>>>>>
>>>>> It's been a few days since itk and tried a build.
>>>>>
>>>>> Today I get Linking CXX executable ../../../../bin/ITKCommon1TestDriver
>>>>> Undefined symbols for architecture x86_64:
>>>>>   "std::basic_ostream<char, std::char_traits<char> >& itk::operator<<
>>>>> <float>(std::basic_ostream<char, std::char_traits<char> >&,
>>>>> itk::Array<float> const&)", referenced from:
>>>>>       void CheckVariableLengthArrayTraits<itk::Array<float>
>>>>> >(itk::Array<float>)in itkNumericTraitsTest.cxx.o
>>>>>       itkArrayTest(int, char**)in itkArrayTest.cxx.o
>>>>>   "std::basic_ostream<char, std::char_traits<char> >& itk::operator<<
>>>>> <double>(std::basic_ostream<char, std::char_traits<char> >&,
>>>>> itk::Array<double> const&)", referenced from:
>>>>>       void CheckVariableLengthArrayTraits<itk::Array<double>
>>>>> >(itk::Array<double>)in itkNumericTraitsTest.cxx.o
>>>>> ld: symbol(s) not found for architecture x86_64
>>>>> collect2: ld returned 1 exit status
>>>>> make[2]: *** [bin/ITKCommon1TestDriver] Error 1
>>>>> make[1]: ***
>>>>> [Modules/Core/Common/test/CMakeFiles/ITKCommon1TestDriver.dir/all] Error 2
>>>>> make: *** [all] Error 2
>>>>>
>>>>> Bill
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Unpaid intern in BillsBasement at noware dot com
>>>>
>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>  _______________________________________________
>> 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://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>



-- 
Unpaid intern in BillsBasement at noware dot com

--bcaec552402407ad8204d8018db2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

There are issues with template specializations and -fvisibility=3Dhidden. F=
rom what I read no current compilers officially support this, but most do. =
I guess my gcc on the MAXC does not.<div><br></div><div>I&#39;ll put a patc=
h to gerrit that adds lines like these in Common/src/CMakeLists.txt</div>
<div><div>=A0 =A0 if(APPLE)</div><div>=A0 =A0 =A0 set_source_files_properti=
es( itkArrayOutputSpecialization.cxx PROPERTIES</div><div>=A0 =A0 =A0 =A0 C=
OMPILE_FLAGS -fvisibility=3Ddefault )</div><div>=A0 =A0 endif()</div><div><=
br></div><div>When I do this, my gcc build is OK.</div>
<div><br></div><div>Bill</div><br><div class=3D"gmail_quote">On Fri, Mar 15=
, 2013 at 7:00 PM, Bill Lorensen <span dir=3D"ltr">&lt;<a href=3D"mailto:bi=
ll.lorensen at gmail.com" target=3D"_blank">bill.lorensen at gmail.com</a>&gt;</s=
pan> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">It has to do with symbol visibility. If I do=
 nm on the ITKCommon lib, the undefined symbols have &quot;t&quot; and not =
&quot;T&quot;. &quot;t&quot; means the symbols are local. If I remove the -=
fvisiibility=3Dhidden flag from ITKCommon&#39;s CMakeLists.txt file, the te=
sts build fine.<div class=3D"HOEnZb">
<div class=3D"h5"><div>
<br></div><div><br><br><div class=3D"gmail_quote">On Fri, Mar 15, 2013 at 6=
:49 PM, Bradley Lowekamp <span dir=3D"ltr">&lt;<a href=3D"mailto:blowekamp@=
mail.nih.gov" target=3D"_blank">blowekamp at mail.nih.gov</a>&gt;</span> wrote=
:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-word">Bill,<di=
v><br></div><div>Are you able to compile the release? Or is it a =A0change =
since then?</div>

<div><br></div><div>Brad</div><div><br><div><div><div><div>On Mar 15, 2013,=
 at 7:36 PM, Bill Lorensen &lt;<a href=3D"mailto:bill.lorensen at gmail.com" t=
arget=3D"_blank">bill.lorensen at gmail.com</a>&gt; wrote:</div><br>
</div></div><blockquote type=3D"cite"><div><div>I see why =A0those statemen=
ts are there.<div><br></div><div>Still need help.<br><br><div class=3D"gmai=
l_quote">On Fri, Mar 15, 2013 at 4:25 PM, Bill Lorensen <span dir=3D"ltr">&=
lt;<a href=3D"mailto:bill.lorensen at gmail.com" target=3D"_blank">bill.lorens=
en at gmail.com</a>&gt;</span> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">More info. If I remove<div><div>template&lt;=
&gt; std::ostream &amp; operator&lt;&lt; &lt;double&gt; (std::ostream &amp;=
 os, const Array&lt; double &gt; &amp; arr);</div>


<div>template&lt;&gt; std::ostream &amp; operator&lt;&lt; &lt;float&gt; (st=
d::ostream &amp; os, const Array&lt; float &gt; &amp; arr);</div>
<div><br></div><div>Both my c++ and clang build fine.</div><div><br></div><=
div>What is the purpose of these lines?</div><span><font color=3D"#888888">=
<div><br></div><div>Bill</div></font></span><div><div>
<br><div class=3D"gmail_quote">On Fri, Mar 15, 2013 at 4:09 PM, Bill Lorens=
en <span dir=3D"ltr">&lt;<a href=3D"mailto:bill.lorensen at gmail.com" target=
=3D"_blank">bill.lorensen at gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Guys,<div><br></div><div>This is =A0on my Ma=
c using:</div><div>c++ --version</div><div><div>c++ --version</div><div>i68=
6-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) =
(LLVM build 2336.1.00)</div>



</div>
<div><br></div><div>My clang version builds fine.</div><div><br></div><div>=
Any ideas?</div><div><br></div><div>Bill</div><div><div><br><br><div class=
=3D"gmail_quote">On Fri, Mar 15, 2013 at 11:52 AM, Bill Lorensen <span dir=
=3D"ltr">&lt;<a href=3D"mailto:bill.lorensen at gmail.com" target=3D"_blank">b=
ill.lorensen at gmail.com</a>&gt;</span> wrote:<br>




<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Folks,<div><br></div><div>It&#39;s been a fe=
w days since itk and tried a build.</div><div><br></div><div>Today I get=A0=
Linking CXX executable ../../../../bin/ITKCommon1TestDriver<div>




Undefined symbols for architecture x86_64:</div>
<div>=A0 &quot;std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt=
;&amp; itk::operator&lt;&lt; &lt;float&gt;(std::basic_ostream&lt;char, std:=
:char_traits&lt;char&gt; &gt;&amp;, itk::Array&lt;float&gt; const&amp;)&quo=
t;, referenced from:</div>





<div>=A0 =A0 =A0 void CheckVariableLengthArrayTraits&lt;itk::Array&lt;float=
&gt; &gt;(itk::Array&lt;float&gt;)in itkNumericTraitsTest.cxx.o</div><div>=
=A0 =A0 =A0 itkArrayTest(int, char**)in itkArrayTest.cxx.o</div><div>=A0 &q=
uot;std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp; itk:=
:operator&lt;&lt; &lt;double&gt;(std::basic_ostream&lt;char, std::char_trai=
ts&lt;char&gt; &gt;&amp;, itk::Array&lt;double&gt; const&amp;)&quot;, refer=
enced from:</div>





<div>=A0 =A0 =A0 void CheckVariableLengthArrayTraits&lt;itk::Array&lt;doubl=
e&gt; &gt;(itk::Array&lt;double&gt;)in itkNumericTraitsTest.cxx.o</div><div=
>ld: symbol(s) not found for architecture x86_64</div><div>collect2: ld ret=
urned 1 exit status</div>





<div>make[2]: *** [bin/ITKCommon1TestDriver] Error 1</div><div>make[1]: ***=
 [Modules/Core/Common/test/CMakeFiles/ITKCommon1TestDriver.dir/all] Error 2=
</div><div>make: *** [all] Error 2</div><span><font color=3D"#888888"><div>




<br></div><div>Bill</div><div>
<br></div>
</font></span></div>
</blockquote></div><br><br clear=3D"all"><div><br></div></div><span><font c=
olor=3D"#888888">-- <br>Unpaid intern in BillsBasement at noware dot com<br=
>
</font></span></div>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>Unpaid inter=
n in BillsBasement at noware dot com<br>
</div></div></div>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>Unpaid inter=
n in BillsBasement at noware dot com<br>
</div></div></div><div>
_______________________________________________<br>Powered by <a href=3D"ht=
tp://www.kitware.com" target=3D"_blank">www.kitware.com</a><br><br>Visit ot=
her Kitware open-source projects at<br><a href=3D"http://www.kitware.com/op=
ensource/opensource.html" target=3D"_blank">http://www.kitware.com/opensour=
ce/opensource.html</a><br>

<br>Kitware offers ITK Training Courses, for more information visit:<br><a =
href=3D"http://kitware.com/products/protraining.php" target=3D"_blank">http=
://kitware.com/products/protraining.php</a><br><br>Please keep messages on-=
topic and check the ITK FAQ at:<br>

<a href=3D"http://www.itk.org/Wiki/ITK_FAQ" target=3D"_blank">http://www.it=
k.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br=
><a href=3D"http://www.itk.org/mailman/listinfo/insight-developers" target=
=3D"_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>

</div></blockquote></div><br></div></div></blockquote></div><br><br clear=
=3D"all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot=
 com<br>
</div>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
Unpaid intern in BillsBasement at noware dot com<br>
</div>

--bcaec552402407ad8204d8018db2--


More information about the Insight-developers mailing list