glehmann / wrapitk

Automatically exported from code.google.com/p/wrapitk
0 stars 0 forks source link

Problems updating wrapitk on Mandriva Cooker - disttag 2012.0 #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
  Recently I updated Mandriva to vtk 5.8.0 and itk 3.20.0,
but I am having trouble rebuilding wrapitk. In the past
the wrapitk package required special handling because it
did take very long to build.

  The first error I get is:

/usr/bin/c++   -O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector 
--param=ssp-buffer-size=4 -fPIC   -ftemplate-depth-50 -Wall -Wno-deprecated 
-msse2 -O3 -DNDEBUG    -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 
-Wl,--build-id -Wl,--enable-new-dtags  CMakeFiles/itkwish.dir/itkTclAppInit.o  
-o ../../bin/itkwish -rdynamic -L/usr/lib64/itk-3.20 -ltcl -ltk 
In file included from 
/usr/include/itk-3.20/Utilities/vxl/vcl/iso/vcl_complex.h:6,
                 from /usr/include/itk-3.20/Utilities/vxl/vcl/vcl_complex.h:62,
                 from /home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Libraries/VXLNumerics/wrap_vcl_complex.cxx:1:
/usr/lib64/gcc/x86_64-mandriva-linux-gnu/4.6.2/../../../../include/c++/4.6.2/com
plex: In member function 'std::complex<float>& 
std::complex<float>::operator=(float)':
/usr/lib64/gcc/x86_64-mandriva-linux-gnu/4.6.2/../../../../include/c++/4.6.2/com
plex:1097: error: cannot convert 'float' to 'float __complex__' in assignment
/usr/lib64/gcc/x86_64-mandriva-linux-gnu/4.6.2/../../../../include/c++/4.6.2/com
plex: In member function 'std::complex<double>& 
std::complex<double>::operator=(double)':
/usr/lib64/gcc/x86_64-mandriva-linux-gnu/4.6.2/../../../../include/c++/4.6.2/com
plex:1249: error: cannot convert 'double' to 'double __complex__' in assignment
/usr/lib64/gcc/x86_64-mandriva-linux-gnu/4.6.2/../../../../include/c++/4.6.2/com
plex: In member function 'std::complex<long double>& std::complex<long 
double>::operator=(long double)':
/usr/lib64/gcc/x86_64-mandriva-linux-gnu/4.6.2/../../../../include/c++/4.6.2/com
plex:1402: error: cannot convert 'long double' to 'long double __complex__' in 
assignment
make[2]: *** [Libraries/VXLNumerics/wrap_vcl_complex.xml] Error 1

I am not sure if it is a gcc 4.6 libstdc++ bug or not, if I
do a system wide patch for the sake of debugging, e.g.
changing /usr/include/c++/4.6.2/complex

      complex&
      operator=(float __f)
      {
    _M_value = __f;
    return *this;
      }

to either: __real__ _M_value = __f; __imag__ _M_value = 0.0f;
or       : _M_value = __f *1.0fj;

and apply same logic to double and long double it fails later
due to swig issues, errors in the pattern:

cd /home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Libraries/Base && 
/usr/bin/c++   -DBasePython_EXPORTS -DSWIG_GLOBAL -O2 -g -frecord-gcc-switches 
-Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC   
-ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -O3 -DNDEBUG -fPIC 
-I/home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/Libraries/Base 
-I/usr/include/itk-3.20/Review -I/usr/include/itk-3.20/gdcm/src 
-I/usr/include/itk-3.20/gdcm -I/usr/include/itk-3.20/Utilities/vxl/core 
-I/usr/include/itk-3.20/Utilities/vxl/vcl 
-I/usr/include/itk-3.20/Utilities/vxl/v3p/netlib 
-I/usr/include/itk-3.20/Utilities -I/usr/include/itk-3.20/Utilities/itkExtHdrs 
-I/usr/include/itk-3.20/Utilities/nifti/znzlib 
-I/usr/include/itk-3.20/Utilities/nifti/niftilib 
-I/usr/include/itk-3.20/Utilities/expat 
-I/usr/include/itk-3.20/Utilities/DICOMParser 
-I/usr/include/itk-3.20/Utilities/NrrdIO 
-I/usr/include/itk-3.20/Utilities/MetaIO -I/usr/include/itk-3.20/SpatialObject 
-I/usr/include/itk-3.20/Numerics/NeuralNetworks 
-I/usr/include/itk-3.20/Numerics/FEM -I/usr/include/itk-3.20/IO 
-I/usr/include/itk-3.20/Numerics -I/usr/include/itk-3.20/Common 
-I/usr/include/itk-3.20/BasicFilters -I/usr/include/itk-3.20/Algorithms 
-I/usr/include/itk-3.20/Numerics/Statistics -I/usr/include/itk-3.20 
-I/home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Typedefs 
-I/home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Languages/Tcl 
-I/usr/include/python2.7    -o 
CMakeFiles/BasePython.dir/wrap_ITKCommonBasePython.o -c 
/home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Libraries/Base/wrap_IT
KCommonBasePython.cpp
/home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Libraries/Base/wrap_it
kEventObjectsPython.cpp:3144:13: error: 'ptrdiff_t' does not name a type
/home/pcpa/mandriva/svn/wrapitk/BUILD/wrapitk-0.3.0/build/Libraries/Base/wrap_it
kEventObjectsPython.cpp:3181:21: error: expected ';' at end of member 
declaration

I attempted some hacking to the swig package to use std::ptrdiff_t,
std::size_t and/or "#include <cstddef>" in other places but my
knowledge of swig and the related issues are not that great, but
did not invest much time so far.

  The issue with complex numbers may be a bug in libdstdc++ when
using C++ constructs, but plain std::complex<type> works and
assignment from a "real" type works.

  Please consider this a minor issue, and a report to
attempt to let you know about issues with latest tools.

  Should be useful information:

$ rpm -q swig
swig-2.0.4-1-mdv2012.0.x86_64

and I updated the cableswig package to overwrite gccxml source
tree to use the same revision as used by the fedora gccxml
package, so that gccxml works with gcc 4.6. You can see how
it was packaged in 
http://svn.mandriva.com/viewvc/packages/cooker/cableswig/current/SPECS/cableswig
.spec?view=markup

Original issue reported on code.google.com by paulo.ce...@gmail.com on 26 Nov 2011 at 11:01